Hi mates,
I have a radgrid and a external textbox and button to search specifics rows in the radgrid. Basically I change the SelectCommand of the RadGrid DataSource when I use the search button.
The first column of the radgrid is the following:
<telerik:GridTemplateColumn UniqueName="EditarEstado" ItemStyle-HorizontalAlign="Center" AutoPostBackOnFilter="false">
<HeaderStyle Width="50px" />
<ItemTemplate>
<asp:ImageButton ID="btnEditarEstado" CommandName="Edit" runat="server" ImageUrl="~/img/buttons/edit.png"
CommandArgument='<%# Eval("id") %>' ToolTip="Modificar" />
</ItemTemplate>
</telerik:GridTemplateColumn>
If I search an specific row using the textbox and the search button, the row is showed successfully in the radgrid. The issue happens if I try to edit that row using the btnEditarEstado ImageButton. When I clic on it, autopostback is executed and the default SelectCommand of the radgrid datasource is set, so, it's like if I try to edit the first row and not the row that I searched.
How could I edit the selected row and not the default first one, please?
Please, let me know if you have any problem to understand my problem.
Thanks a lot in advance.
Cheers.
I have a radgrid and a external textbox and button to search specifics rows in the radgrid. Basically I change the SelectCommand of the RadGrid DataSource when I use the search button.
The first column of the radgrid is the following:
<telerik:GridTemplateColumn UniqueName="EditarEstado" ItemStyle-HorizontalAlign="Center" AutoPostBackOnFilter="false">
<HeaderStyle Width="50px" />
<ItemTemplate>
<asp:ImageButton ID="btnEditarEstado" CommandName="Edit" runat="server" ImageUrl="~/img/buttons/edit.png"
CommandArgument='<%# Eval("id") %>' ToolTip="Modificar" />
</ItemTemplate>
</telerik:GridTemplateColumn>
If I search an specific row using the textbox and the search button, the row is showed successfully in the radgrid. The issue happens if I try to edit that row using the btnEditarEstado ImageButton. When I clic on it, autopostback is executed and the default SelectCommand of the radgrid datasource is set, so, it's like if I try to edit the first row and not the row that I searched.
How could I edit the selected row and not the default first one, please?
Please, let me know if you have any problem to understand my problem.
Thanks a lot in advance.
Cheers.