This is a migrated thread and some comments may be shown as answers.

get the cell velues in linkbutton clikck

2 Answers 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
San
Top achievements
Rank 1
San asked on 13 Feb 2013, 07:21 AM
Hi
how do i get  the value of a column in Edit linkbutton click.


<telerik:GridTemplateColumn DataField="Edit" UniqueName="Edit" SortExpression="Edit"
                                                    HeaderText="Edit">
                                                    <HeaderTemplate>
                                                        Edit</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:LinkButton ID="lbEdit" runat="server" Font-Underline="True" ForeColor="Black"
                                                            Text="Edit" OnClick="OpenPopup"></asp:LinkButton></ItemTemplate>
                                                </telerik:GridTemplateColumn>


OpenPopup() - this is function i have written in code behind and here i wanted to get the  cell text of first cell(Name column)

Thanks
San
                   

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Feb 2013, 07:29 AM
Hi,

I guess you want the a cell text of the row in which the LinkButton is clicked.

C#:
protected void OpenPopUp(object sender, EventArgs e)
{
    LinkButton lnk = (LinkButton)sender;
    GridDataItem ditem = (GridDataItem)lnk.NamingContainer;
    String celltext = ditem["UniqueName"].Text;
}

Thanks,
Shinu.
0
San
Top achievements
Rank 1
answered on 13 Feb 2013, 12:41 PM
Hi Srinu,
it's working ..Thank you very much..

Thanks
San
Tags
Grid
Asked by
San
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
San
Top achievements
Rank 1
Share this question
or