
<telerik:RadGrid runat="server" ID="RadGridMemberBoardPosition" Width="350px" Height="460px" AutoGenerateColumns="false" > <MasterTableView DataKeyNames="MemberId" > <Columns> <telerik:GridClientSelectColumn ItemStyle-Width="10%"/> <telerik:GridBoundColumn DataField="Name" DataType="System.String" HeaderText="Name" UniqueName="Name" /> </Columns> <DetailTables > <telerik:GridTableView DataKeyNames="MemberId"> <Columns> <telerik:GridBoundColumn DataField="FullName" DataType="System.String" HeaderText="FullName" UniqueName="FullName" /> <telerik:GridBoundColumn DataField="EmailAddress" DataType="System.String" HeaderText="EmailAddress" UniqueName="EmailAddress" /> </Columns> </telerik:GridTableView> </DetailTables> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="MemberId" MasterKeyField="MemberId" /> </ParentTableRelation> </MasterTableView> <ClientSettings Selecting-AllowRowSelect="true" Scrolling-AllowScroll="true" /></telerik:RadGrid>Protected Sub RadTreeViewGroups_NodeClick(sender As Object, e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeViewGroups.NodeClick If Me.m_cMyManager Is Nothing Then Me.m_cMyManager = New cMyManager End If ' get the board positions and the members for those postions - hierarchical grid Me.RadGridMemberBoardPosition.DataSource = Me.GetGroupBoardPositionDT(Me.m_cMyManager, e.Node.Attributes("GroupId")) Me.RadGridMemberBoardPosition.Rebind()End SubProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Me.m_cMyManager Is Nothing Then Me.m_cMyManager = New cMyManager End If ' get the sql datasource for the detail of the datagrid Dim mySqlDataSource As New SqlDataSource("System.Data.SqlClient", Me.m_cMyManager.MyDb.ConnectionString(), Me.GetBoardPositionMembersQuery(Me.m_cMyManager)) ' add the parameters Dim myParameter As New UI.WebControls.Parameter("MemberId", DbType.Int64) mySqlDataSource.SelectParameters.Add(myParameter) Me.RadGridMemberBoardPosition.MasterTableView.DetailTables(0).DataSource = mySqlDataSourceEnd Sub<
telerik:GridBoundColumn DataField="phonenumber" HeaderText="phone number " UniqueName="phonenumber" AllowFiltering="false" />
<telerik:GridTemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Text="get phone number" OnClick="getphone"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
Protected
Sub getphone(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dataItem As GridDataItem
Dim cell As TableCell = dataItem("phonenumber")
Dim itemValue As String = dataItem["phonenumber"].Text --------this gives error: Identifier expected.
I also try the following and still cannot get the value of the phonenumber field:
RadGrid1.MasterTableView.GetColumn(
"phonenumber").ToString())
End Sub