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

Prevent FullRowSelect

2 Answers 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Basel Nimer
Top achievements
Rank 2
Basel Nimer asked on 02 May 2010, 01:04 PM
Hi,

I have a grid with a GridClientSelectColumn, i had a problem of selecting the row when clicking anywhere on it (even a button with a different action <<file download in my case>>), so i had to hack this so that the row is selected only when the check box is clicked, the following code works:

<ClientEvents OnRowSelecting ="RowSelecting"  />


function RowSelecting(sender, eventArgs)   
            {    
             
              var e =  window.event;   
              if(e.srcElement.tagName == "INPUT")   
              {    
                eventArgs.set_cancel(false); 
              }   
              else 
              {   
               eventArgs.set_cancel(true); 
              }   
            }   

the problem i am having now is that window.event does not work on firefox,

any help?







2 Answers, 1 is accepted

Sort by
0
Basel Nimer
Top achievements
Rank 2
answered on 02 May 2010, 01:18 PM
i tried to use
var e=eventArgs._domEvent; instead of windows.event. and that worked for IE again but not FF.

0
Basel Nimer
Top achievements
Rank 2
answered on 02 May 2010, 01:30 PM
Found it

http://www.telerik.com/community/forums/aspnet-ajax/grid/detect-the-trigger-for-row-selection-in-onrowselecting-event.aspx

Thanks!






Tags
Grid
Asked by
Basel Nimer
Top achievements
Rank 2
Answers by
Basel Nimer
Top achievements
Rank 2
Share this question
or