本文介绍了在变量中获得价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取变量中单元格的值

我的vb编码在下面给出

How to get value of cell in a variable

my vb coading is given below

Protected Sub gvShape_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvShape.RowDataBound
        If e.Row.RowType = DataControlRowType.DataRow Then
            For c As Integer = 0 To gvShape.Columns.Count - 1
                Dim shapeid As String = CType(e.Row.Cells(c).FindControl("lbl_col_" & c + 1), Label).Text
                e.Row.Cells(c).Attributes.Add("onDblClick", String.Format("popup('{0}')", shapeid))
                e.Row.Cells(c).Attributes.Add("onClick", String.Format("select({0},{1},'{2}')", e.Row.RowIndex, c, shapeid))

            Next
        End If
    End Sub

推荐答案


这篇关于在变量中获得价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 07:53