We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Event to capture that a new line is added to a GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

69941 Nov 19,2007 05:01 PM UTC Nov 19,2007 05:36 PM UTC WinForms 2
loading
Tags: Grouping
José Manuel
Asked On November 19, 2007 05:01 PM UTC

Hello,

I'm looking for an event in a GridGroupingControl to inform me about a new row added because it has turned up in the datasource, other than the CurrencyManager's ListChanged event, which doesn't work for me, because record collections in the grid are not committed at that stage and I have incorrect results.

I want then to call SetCurrent on a cell of that row, to make the triangled black arrow appear on it.

Thank you very much for your help.

J.M.


Administrator [Syncfusion]
Replied On November 19, 2007 05:20 PM UTC

Try the SourceListListChangedCompleted event and check for e.ListChangedType = ItemAdded.


//subscribe to the event
this.grid.SourceListListChangedCompleted += new TableListChangedEventHandler(grid_SourceListListChangedCompleted);

//the handler code
void grid_SourceListListChangedCompleted(object sender, TableListChangedEventArgs e)
{
if (e.ListChangedType == ListChangedType.ItemAdded)
{

}
}



Administrator [Syncfusion]
Replied On November 19, 2007 05:36 PM UTC

To actually easily track the new record and set it current, you can use the SourceListRecordChanged event in addition to the SourceListListChangedCompleted event.


Record changedRecord = null;
void gridGroupingControl1_SourceListRecordChanged(object sender, Syncfusion.Grouping.RecordChangedEventArgs e)
{
changedRecord = e.Record;
}

void gridGroupingControl1_SourceListListChangedCompleted(object sender, Syncfusion.Grouping.TableListChangedEventArgs e)
{
if (e.ListChangedType == ListChangedType.ItemAdded && changedRecord != null)
changedRecord.SetCurrent();
}



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;