I have a grid where I dynamically insert two or move columns based on user input.
Than after binding the grid, I set column fixing for the first four columns overall. Note that the dynamically inserted columns begin at column 8.
However, after setting column fixing for the first four columns, my inserted columns--which start at column 8--get moved to the very end of the grid (starting at column 13 instead).
Is there any explainable reason for this? Has anyone else encountered this issue?
That of course should have been, "dynamically insert two or more columns...".
Hi FireStorm12,
Have you tried to set the VisibleIndex of the inserted columns? Let me try and understand the scenario. You bind the grid and have X number of columns at the start. Then at some later point (let's say on a button click), you add two more columns. Then you fix columns? Is that via the UI, client code, or server code? And upon doing that, the inserted columns appear as the last columns?
regards,David Young
Hello,Please let me know if you have any further questions regarding this issue.
Hello Steven,It occurs to be a issue with the sample. The original code was setting the VisibleIndex to j+2. But this can be out of bounds near the end of the collection. An index counter is needed. I also had to reset the existing columns before inserting the new columns. Please take a look at the sample. Looking forward to hearing from you.
You can also add that you can no longer change the CssClass settings after dynamically inserting columns either.
...this is becoming increasingly dysfunctional. I am not sure how the new WebDataGrid is better than the old UltraWebGrid. Sorry, just had to say it. This new grid seems to be consuming time needlessly, rather than saving time.
Hello Steven,
I have investigated your issue (Exception thrown when try to set visible index of manually added columns after some column fixed) and, I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 96709. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by going to the “My IG” tab on our website, hovering to the "My Support Activity" dropdown and selecting the "Development Issues" tab.
Please let me know if you need more information.
The only real difference I see is that I am inserting up to 20 columns, and I am doing that at the same time as changing values in the DataSource.