Hi ,
I have a grid and the thing i need is i need to make one row unselectable.. If the row index is two i need to disable delete and update option...this i did.. but i have enable multi row selection and edit and delete button is there in command item.When i click any row ,then its getting selected and i can delete and edit from command item.. I need to make that row as unselectable.. please give a solution
I have a grid and the thing i need is i need to make one row unselectable.. If the row index is two i need to disable delete and update option...this i did.. but i have enable multi row selection and edit and delete button is there in command item.When i click any row ,then its getting selected and i can delete and edit from command item.. I need to make that row as unselectable.. please give a solution
4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 13 May 2009, 10:02 AM
Hello,
You can check for the rowindex in the onRowSelecting client event and cancel the event as shown in the code below:
aspx:
js:
Thanks
Princy.
You can check for the rowindex in the onRowSelecting client event and cancel the event as shown in the code below:
aspx:
| <ClientSettings> |
| <ClientEvents OnRowSelecting="RowSelecting"/> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
js:
| function RowSelecting(sender, eventArgs) |
| { |
| if(eventArgs.get_itemIndexHierarchical()== 2) |
| { |
| eventArgs._cancel = true; |
| } |
| } |
Thanks
Princy.
0
vin
Top achievements
Rank 1
answered on 13 May 2009, 10:11 AM
Thanks for ur reply.. Please give me one more solution. I need , If that rows second columns text is "Hi" i need to make it unselectable ..
eg :
col 1 col2
1 row : hello hellooossssss
2 row : hi hiiiiiiiiiiiiiiiiiiiii
when it come "hi" i need to make that row unselectable..
pl;ease give a soln
eg :
col 1 col2
1 row : hello hellooossssss
2 row : hi hiiiiiiiiiiiiiiiiiiiii
when it come "hi" i need to make that row unselectable..
pl;ease give a soln
0
vin
Top achievements
Rank 1
answered on 13 May 2009, 10:20 AM
My another requirement is the grid is a user details table. And my username is stored in the Session("Username"). And in that user grid Session value also there. If that two values matches i want to make it as unselectable.can i do this using client side event
0
vin
Top achievements
Rank 1
answered on 13 May 2009, 12:32 PM
i resolved it