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

Row Selectio MastertableView only

1 Answer 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Het
Top achievements
Rank 1
Het asked on 19 Sep 2008, 02:43 PM
Telerik Support,

I have a hierarchy grid with master and detail table view. I have row selection and context menu in my Mastertableview, but thing is I don't want either of them in my Detailtables.

Is there a way to achieve this ?

Thanks,
Het

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 22 Sep 2008, 03:48 AM
Hello Het,

This can be done using the Name property of  the MasterTable. Check out the code below to show the ContextMenu only for the MasterTable.
aspx:
<MasterTableView DataSourceID="SqlDataSource1" AutoGenerateColumns="False" Name="Master"
</MasterTableView> 

js:
function RowContextMenu(sender, eventArgs) 
        { 
               if(eventArgs.get_tableView().get_name() == "Master") 
             { 
              
                var menu = $find("<%=RadContextMenu1.ClientID %>");                 
                var evt = eventArgs.get_domEvent();                
                if(evt.target.tagName == "INPUT" || evt.target.tagName == "A") 
                { 
                  return; 
                }                 
                menu.show(evt);  
           
             }                           
       } 

 You can go through the following link which explains how to enable multi-row selection only for the MasterTable.
Multi-row edit/selection only for master table in hierarchical grid

Thanks,
Princy

Tags
Grid
Asked by
Het
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or