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.
Unfortunately, activation email could not send to your email. Please try again.

Enable to Focus (Scroll) on the selectedRecord !!!

Thread ID:

Created:

Updated:

Platform:

Replies:

70042 Nov 23,2007 03:52 PM Nov 23,2007 06:48 PM Windows Forms 1
loading
Tags: GridControl
Frank
Asked On November 23, 2007 03:52 PM

SelectedRecordsCollection selectedRecords = grid.Table.SelectedRecords; // Keep selected records

records = new List(); // After refresh Data grid
if (selectedRecords.Count > 0)
{
foreach (SelectedRecord selectedRecord in selectedRecords)
{
Record r = new Record(grid.Table);
r = selectedRecord.Record;
records.Add(r);
}
}


foreach (Record record in records)
{
grid.Table.SelectedRecords.Add(record);
record.SetCurrent();
}


// PROBLEM

The selected records has no Focus on it...
When debugging, I Found that indexOf(record) return 0 ??

It seems to happen only when new records are added in the grid.

Please help me to Understand this.



haneefm [Syncfusion]
Replied On November 23, 2007 06:48 PM

Hi Franck,

You need to call the CurrentRecord.SetCurrent( arg) method after adding the SelectedRecords in a GridTable. Please try these code and let me know if this helps.

this.gridGroupingControl1.Table.CurrentRecord.SetCurrent("ColumnName");
this.gridGroupingControl1.Table.CurrentRecordManager.ForceShowCurrentRecord = true;

Best regards,
Haneef.


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.

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.

;