I have a DataBoundGrid(220.127.116.11) with around 50 columns. They are hidden using gridModel.HideCols[nn] = true method. When I set model.Options.DisplayEmptyColumns to true, it is giving me a visual effect that I want. But, when I drag my last column to the right, it is letting me drop into the empty column. Somehow it is thinking those invisible columns are visible. Then my draged column becomes invisible and get lost.
I tried handling grid.ColsMoving event handler. It is giving me e.From = 11 and e.Target = 37 when I am seeing only two columns.
Can you please help me?
ADAdministrator Syncfusion Team September 16, 2003 01:19 AM
I think I was able to avoid the bad drop in the attached sample using a ColsMoving handler. But I do not know of a way of not showing the drop cursor past the good columns. If you just wanted to drop the column to the right of teh last column if the user tried to drop the col past the good columns, then I think you could cancel teh current drop in ColsMoving, and call MoveCols to position the column correctly. Here is sample code:
ADAdministrator Syncfusion Team September 16, 2003 08:59 AM
Your workaround has a problem.
1. Run your application.
2. Select Col0, Col1 and Col2.
3. Drag and Drop after last column (col 8).
4. Notice that now col0, col1 and col2 are missing.
How can we fix this problem?
FYI, Windows Explorer (view detail grid on right side) implements a nice feature where you can drop any column past the last column and it will simply move it to the last. This would be nice to have.
ADAdministrator Syncfusion Team September 16, 2003 02:57 PM