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

[Solved] Select and Deselect

1 Answer 166 Views
Grid
This is a migrated thread and some comments may be shown as answers.
lhalfon
Top achievements
Rank 1
lhalfon asked on 04 Jun 2008, 04:27 PM

Actually i have the grid with

<telerik:GridButtonColumn Text="Taskear" CommandName="Select" HeaderStyle-Width="75px"></telerik:GridButtonColumn>                       
<telerik:GridButtonColumn Text="Des-Taskear" CommandName="Deselect" HeaderStyle-Width="75px"></telerik:GridButtonColumn> 


How can i do this 2 funcionalities all in one ?
I mean.. every time I select a row, this row will be selected, but if the row is selected and I select this row again, the row will be deselected..

I tried in the event OnItemCommand setting e.Item.Selected = false but nothing happend..

Thanks and sorry for my english :) !


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Jun 2008, 05:41 AM
Hi,

You can use a GridTemplateColumn with two LinkButtons placed in its ItemTemplate to achieve the desired effect.

ASPX:
<telerik:GridTemplateColumn UniqueName="TempCol" HeaderText="TempCol" > 
<HeaderStyle  Width="75px" /> 
  <ItemTemplate> 
      <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select" Text="Taskear" ></asp:LinkButton> 
      <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Deselect" Text="Des-Taskear" ></asp:LinkButton> 
  </ItemTemplate> 
</telerik:GridTemplateColumn> 


Thanks
Princy.
Tags
Grid
Asked by
lhalfon
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or