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.

Set CurrentRecord but do not expand its Group

Thread ID:

Created:

Updated:

Platform:

Replies:

30059 Jun 9,2005 01:41 PM Jul 18,2005 04:53 PM Windows Forms 3
loading
Tags: Grouping
Jason Hales
Asked On June 9, 2005 01:41 PM

Hi I''m using v3.2.1.0 of grouping grid and I am setting the currentRecord using: int index = grid.Table.PrimaryKeySortedRecords.FindRecord(primaryKeyValue); if (index != -1) { Record foundRecord = grid.Table.PrimaryKeySortedRecords[index]; if (foundRecord != null) { foundRecord.SetCurrent(); } } That all works fine - but in my case I do not want the Group that this record is in to be autoexpanded - which setting to I use to set this Thanks...as ever...again

Administrator [Syncfusion]
Replied On June 10, 2005 01:20 AM

Hi Jason, it is at the moment not possible to make a record to be the current record and avoid expanding the group it belongs to. We need to make changes in our source base in order to support this. But what is the reason why you want to do this? Maybe there is a better solution you could use right away. Stefan >Hi > >I''m using v3.2.1.0 of grouping grid and I am setting the currentRecord using: > >int index = grid.Table.PrimaryKeySortedRecords.FindRecord(primaryKeyValue); >if (index != -1) >{ > Record foundRecord = grid.Table.PrimaryKeySortedRecords[index]; > if (foundRecord != null) > { > foundRecord.SetCurrent(); > } >} > >That all works fine - but in my case I do not want the Group that this record is in to be autoexpanded - which setting to I use to set this > >Thanks...as ever...again

Jason Hales
Replied On June 10, 2005 10:12 AM

Thanks for your help again Stefan The only reason I don''t want the group to be auto expanded is because a user can collapse all of the groupings and then recalc our grid using different formula and we''ve had a couple of users say they want the grid to look the same as before - albeit with different numbers - petty heh? I''m just going to call CollapseAll after setting the current Record >Hi Jason, > >it is at the moment not possible to make a record to be the current record and avoid expanding the group it belongs to. > >We need to make changes in our source base in order to support this. > >But what is the reason why you want to do this? Maybe there is a better solution you could use right away. > >Stefan > >>Hi >> >>I''m using v3.2.1.0 of grouping grid and I am setting the currentRecord using: >> >>int index = grid.Table.PrimaryKeySortedRecords.FindRecord(primaryKeyValue); >>if (index != -1) >>{ >> Record foundRecord = grid.Table.PrimaryKeySortedRecords[index]; >> if (foundRecord != null) >> { >> foundRecord.SetCurrent(); >> } >>} >> >>That all works fine - but in my case I do not want the Group that this record is in to be autoexpanded - which setting to I use to set this >> >>Thanks...as ever...again

Administrator [Syncfusion]
Replied On July 18, 2005 04:53 PM

Jason, we add this property to the Engine class: /// /// Gets or sets whether the engine should ensure that a record is visible and all its parent /// elements are expanded when setting the current record. The default setting is true. /// public bool ForceShowCurrentRecord If you set Engine.ForceShowCurrentRecord = false; you should get the behavior you wanted. Stefan >Thanks for your help again Stefan > >The only reason I don''t want the group to be auto expanded is because a user can collapse all of the groupings and then recalc our grid using different formula and we''ve had a couple of users say they want the grid to look the same as before - albeit with different numbers - petty heh? > >I''m just going to call CollapseAll after setting the current Record > >>Hi Jason, >> >>it is at the moment not possible to make a record to be the current record and avoid expanding the group it belongs to. >> >>We need to make changes in our source base in order to support this. >> >>But what is the reason why you want to do this? Maybe there is a better solution you could use right away. >> >>Stefan >> >>>Hi >>> >>>I''m using v3.2.1.0 of grouping grid and I am setting the currentRecord using: >>> >>>int index = grid.Table.PrimaryKeySortedRecords.FindRecord(primaryKeyValue); >>>if (index != -1) >>>{ >>> Record foundRecord = grid.Table.PrimaryKeySortedRecords[index]; >>> if (foundRecord != null) >>> { >>> foundRecord.SetCurrent(); >>> } >>>} >>> >>>That all works fine - but in my case I do not want the Group that this record is in to be autoexpanded - which setting to I use to set this >>> >>>Thanks...as ever...again

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.

;