Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
How to Get Group Name wile dragging column in group area with new version InfragisticsWPF4.DataPresenter.v18.2 ?
posted

Hi team ,

I need to get Group Name while grouping using dragging columns in group by area section  with new version i.e InfragisticsWPF4.DataPresenter.v18.2

previously it  was working fine when i was using  v9.2.but after upgradation of infragistic version its not working .  Could you plese help for this issue 

But now i am unable to get group name after upgrading infragistic version i.e InfragisticsWPF4.DataPresenter.v18.2

Below i mentioned 

private void DraggedGroupByCommandExecute(object parameter) //This Event is drag and drop groups
{
XamDataGrid dg = parameter as XamDataGrid;
if (dg == null) return;

var data = dg.GroupByArea.GroupedFieldLabels; //picking favorite group name 

}

Parents
  • 1560
    Offline posted

    Hello Sachin,

    Thank you for posting in our community.

    From the description provided I assume that you want to get the name of the column you are currently grouping by while you dragging. My suggestion for achieving your requirement is handling “Grouping” event where the column name is accessible via the event argument. Depending on your scenario, the name of this column can be stored in a global variable, which will be accessible in any method within your application.

    For example:

    string nameOfGroupByColumn = null;
    
    private void DataGrid_Grouping(object sender, Infragistics.Windows.DataPresenter.Events.GroupingEventArgs e)
    
    {
    
    nameOfGroupByColumn = e.Groups[0].FieldName;
    
    MessageBox.Show(nameOfGroupByColumn);
    
    }

    Attached you will find small sample illustrating my suggestion.

    Please test it on your side and let me know if you need any further assistance.

    1106.XamDataGrid_GetGroupNameWhileDragging.zip

Reply Children