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

Change GridBoundColumn value to LinkButton when in Row Edit

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Blake
Top achievements
Rank 1
Blake asked on 09 Apr 2011, 01:54 AM
Hi,

I was hoping to to change a GridBoundColumn row value to be a LinkButton when the Edit button is clicked.

Here's the column:
<rad:GridBoundColumn DataField="FileName"  UniqueName="NameColumn" />

Then I'm guessing the change needs to take place when the EditCommand event is raised
void ListGrid_EditCommand(object source, GridCommandEventArgs e)

So how would I find the "NameColumn" and change its value to a LinkButton on Edit?

Also, is it possible to get the Row DataItem on the EditCommand event? I wasn't able to find a way to do this. 

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 09 Apr 2011, 12:33 PM
Hi Blake

Thanks,
Jayesh Goyani
<telerik:GridTemplateColumn HeaderText="Status" DataField="Status" UniqueName="Status">
                                   <ItemTemplate>
                                       <asp:Label ID="Label1" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                                   </ItemTemplate>
                                   <EditItemTemplate>
                                       <asp:LinkButton ID="LinkButton1" runat="server"></asp:LinkButton>
                                   </EditItemTemplate>
                               </telerik:GridTemplateColumn>
Tags
Grid
Asked by
Blake
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or