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

Get uniquename of column to group it

2 Answers 112 Views
Grid
This is a migrated thread and some comments may be shown as answers.
EBS
Top achievements
Rank 1
EBS asked on 30 Jul 2008, 02:42 PM
I am attempting to create a client-side grid toolkit (export, print to pdf, group by column, expand/collapse all, reset grid).  All features wor except the group by column.  I can get the column index, but the groupcolumn clientside function requires the uniquename.  How can I get this?  The following code allows me to opposite-click on the grid and get the col index:

function ColumnContextMenu(sender, eventArgs)  
        {  
            alert(eventArgs.get_gridColumn().get_element().cellIndex);  
            GroupByColumn(eventArgs.get_gridColumn().get_element().cellIndex);  
            eventArgs.get_domEvent().cancelBubble = true;  
        }  
          
function GroupByColumn(cellindex)  
        {  
            var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();  
            masterTable.groupColumn("MyColumnName");  
        }  

2 Answers, 1 is accepted

Sort by
0
Vladimir
Top achievements
Rank 1
answered on 30 Jul 2008, 07:16 PM
Hi,

You can use get_uniqueName() method to achieve this:

alert(eventArgs.get_gridColumn().get_uniqueName());

Vlad
0
EBS
Top achievements
Rank 1
answered on 30 Jul 2008, 07:33 PM
Perfect.  Thank you!
Tags
Grid
Asked by
EBS
Top achievements
Rank 1
Answers by
Vladimir
Top achievements
Rank 1
EBS
Top achievements
Rank 1
Share this question
or