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

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

Thread ID:

Created:

Updated:

Platform:

Replies:

70042 Nov 23,2007 08:52 PM UTC Nov 23,2007 11:48 PM UTC WinForms 1
loading
Tags: GridControl
Frank
Asked On November 23, 2007 08:52 PM UTC

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 11:48 PM UTC

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.

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

;