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

How to use cell selected in radgrid?

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pham
Top achievements
Rank 1
Pham asked on 04 Jun 2013, 09:03 AM
Hi everybody,
I have a problem: I have a radgrid and I want allow selected first column but others don't allow. 
I did: allow rowselected and filter by column name. However, this way is not good because radgrid 
is post back when I click in all columns.
Have any ideas ?
Thanks you very much!
function onRowSelected(sender, args)
{
       var MasterTableView = sender.get_masterTableView();
       var row = MasterTableView.get_selectedItems()[0];
       var strMA_TU = MasterTableView.getCellByColumnUniqueName(row, "MA_DV");
       var cellIndex = args.get_domEvent().target.cellIndex;       
       var colName = MasterTableView.getColumnUniqueNameByCellIndex(getHeaderRow(sender), cellIndex);      
       if(colName == "GIABQ"){
            var name = strMA_TU.innerHTML;
            Service_Test.Web_TITLE_CHITIET(name);            
            <%Session["CHILD_MADVIQLY"] = "OK";%>  
            <%Session["TEST"] = "OK"; %>      
       }
       else{
            <%Session["TEST"] = null ;%>
       }
     
}
 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Jun 2013, 11:42 AM
Hello,

You can use the following approach to cancel the selection if the clicked column is not the first one:
http://www.telerik.com/community/forums/aspnet-ajax/grid/make-column-unselectable.aspx

If you have different requirements or further instructions, please elaborate on your specific scenario.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Pham
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or