I have radgrid with itemplate for every column like below
I been trying to access each column in the grid to add a link button for each row with the same event attached to all the link button. But I am stuck at even getting the column value or adding link button to the column. I tried below,
But nothing works. I just simply want to get the value of the column first and embed a link button to the column and trigger a common event. Help me out.
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Vertical" Skin="Hay" PageSize="250" AllowSorting="True" AllowPaging="True" ShowGroupPanel="False" AutoGenerateColumns="false" Width="100%" > <PagerStyle Mode="Slider"></PagerStyle> <MasterTableView ShowGroupFooter="true" GroupsDefaultExpanded="False" HeaderStyle-HorizontalAlign="Center" GroupHeaderItemStyle-BackColor="white" GroupHeaderItemStyle-ForeColor="Black" GroupHeaderItemStyle-Font-Size="Medium" DataKeyNames="SkillID"> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldName="SkillAreaId" HeaderText=" " /> <telerik:GridGroupByField FieldName="SkillArea" HeaderText=" " /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="SkillAreaId" HeaderText="" HeaderValueSeparator=" " /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridTemplateColumn UniqueName="SkillID"> <ItemTemplate> <b> <%# Eval("SkillID")%> </b> </ItemTemplate> <FooterTemplate> </FooterTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn> <ItemTemplate> <%# Eval("Skill")%> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn> <HeaderTemplate> None<br /> 0</HeaderTemplate> <ItemTemplate> <asp:RadioButton ID="RadioButton1" runat="server" /></ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn> <HeaderTemplate> Basic<br /> 1</HeaderTemplate> <ItemTemplate> <asp:RadioButton ID="RadioButton2" runat="server" /></ItemTemplate> </telerik:GridTemplateColumn>I been trying to access each column in the grid to add a link button for each row with the same event attached to all the link button. But I am stuck at even getting the column value or adding link button to the column. I tried below,
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBoundIf TypeOf e.Item Is GridDataItem Then Dim itm As GridDataItem = CType(e.Item, GridDataItem) itm("SkillId").Controls.Add(New LiteralControl("test"))End IfBut nothing works. I just simply want to get the value of the column first and embed a link button to the column and trigger a common event. Help me out.