Hi All,
I am trying to disabled selection for some rows base on my condition. I can successfully disabled the checkbox column. But when i click the row, i got the row.Index is underfined in function Selecting(row). Here is my code. Please let me know how can i get the row index to compare with my disabled index.
Thanks,
Alex
I am trying to disabled selection for some rows base on my condition. I can successfully disabled the checkbox column. But when i click the row, i got the row.Index is underfined in function Selecting(row). Here is my code. Please let me know how can i get the row index to compare with my disabled index.
Thanks,
Alex
<
ClientSettings>
<Selecting AllowRowSelect="True" />
<ClientEvents OnRowSelecting="Selecting" />
</ClientSettings>
| <script type="text/javascript"> |
| var a = Array; |
| window.onload = function () |
| { |
| var inp = document.getElementById('Sel'); |
| var data = inp.value; |
| if(data != "") |
| { |
| var rowsData = data.split(":"); |
| var i=0; |
| while(typeof(rowsData[i]) != "undefined") |
| { |
| if (rowsData[i] != "") |
| { |
| a[i] = rowsData[i]; |
| } |
| i++; |
| } |
| } |
| } |
| function Selecting (row) |
| { |
| var i = 0; |
| while(typeof(a[i]) != "undefined") |
| { |
| if (a[i++] == row.Index) |
| { |
| return false; |
| } |
| } |
| } |
| </script> |