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. Image for the cookie policy date
close icon

Set CurrentRecord but do not expand its Group

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

3 Replies

AD Administrator Syncfusion Team June 10, 2005 05:20 AM UTC

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


JH Jason Hales June 10, 2005 02:12 PM UTC

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


AD Administrator Syncfusion Team July 18, 2005 08:53 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon