preventing columnreordering after removing groupin |
Post Reply |
Author | |
BoboP
Groupie Joined: 21 March 2008 Status: Offline Points: 25 |
Post Options
Thanks(0)
Posted: 26 June 2008 at 8:53am |
Hi ,
I don't want columns to be reordered, I have made the property AllowColumnReordering = false, But when I group the records on clicking columns , and again for removing it when I place column somewhere else from dragged position ,It does allow column reordering. How can i prevent that , the problem is I wanted to export record list to excel sheet. but when columns reordered , reportcontrol has its rows not reordered by column, bec'z of which . In excel sheet I get different values in different columns worksheet.Cells[i , j ] = ReportControl.Rows.Record[j].Value; here Report control does not have reordered value ...... I would rather like column reordered list to export to excel sheet ....... but if not that I would at least need to prevent column reordering Any suggestion will be appreciated. |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
You can use ItemIndex of the Column. This value remains constant, and does
not depend on the current order of the columns. The ItemIndex is given
at the time the Columns are added. The ItemIndex will not change when the columns are moved (dragged and dropped
to another location). Since the Index of the
column might change frequently (dragged\grouped), the ItemIndex is used when the column needs to
be accessed.
https://forum.codejock.com/forum_posts.asp?TID=6415 |
|
Peter59
Groupie Joined: 19 July 2007 Status: Offline Points: 61 |
Post Options
Thanks(0)
|
Hi,
maybe it is a workaround to handle ColumnOrderChanged event: iterate through all columns and compare properties ItemIndex and Index. If there is a difference, use Move method to move the column to the original position. I agree, it would be better if AllowColumnReordering works as expected, even after removing a column from the grouping area... Maybe we can expect a fixing with one of the next releases? Peter |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
SuperMario,
It's nice to have the "exported" records in an order you want but the fact remains that you can still reorder columns. The same problem with DisableReorderColumnsCount: dragging a column to groupbox and back allows you to drop it anywhere you want (see my multiple issue post and sample project )
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
It sounded to me like he would rather allow column reordering.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
SuperMario,
Please look at the first line BoboP wrote (in original post)
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
I read the last line He only wanted to prevent it because it wasn't exporting to his excel sheet the way he wanted.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
SuperMario,
I look at the first sentence and I feel an issue bubbling up I tested this and it is true. Do you want me to post one or add it to my list? btw the list still has issues left and now I have to add "and growing" ....
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Yes, add it to your list. I'll make sure they are fixed in 12.1.0.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |