Hello, I have a grid with more than 150 Colums in Grid which is bound via Linq-Datasource.
When I open the CustomizationWindow and add Column e.g. 99, the list is move to Column 1, after that.
How can I stay on Position in CustomizationWindow, to add other Column?
Is it posible to add multiple Column from CustomizationWindow to Grid at once?
regards,
Dirk
Hello Dirk,
Your requirements are not completely clear to me. Would you please describe them in greater detail? It would be helpful if you send us a couple of screenshots illustrating actual and expected results.
We look forward to your reply.
In Image you see then CustomizationWindow.
When I add a Column from the midle of the list. The Columnlist jump back to top (First) of Columnlist.
See result im Imge2, after I add one Column.
Or in other words:
I want that the scrollbar position will be saved in CustomizationWindow after add a Column and/or add more than one column at once to grid and not:
- scroll down from Column 1 to Column 98 , drop it to Grid
- scroll down from Column 1 to Column 99 , drop it to Grid
- scroll down from Column 1 to Column 100 , drop it to Grid
Hope that make it clear for you.
Hello Dirk,
Please accept my sincerely apologies for the delayed response.
From what I gather, you wish to avoid scrolling to the top when a column is added.
I have reproduced this behavior and forwarded this issue to our developers. We will update this thread once any news regarding this subject is available.
In the meantime, you can implement the following scenario to overcome the issue:
var scroll; function OnBeginCallback(s, e) { if (e.command == "COLUMNMOVE") { var customWindow=$(s.GetMainElement()).find(".dxgvCustomization"); if (customWindow) scroll = customWindow.scrollTop(); } } function OnEndCallback(s, e) { var customWindow = $(s.GetMainElement()).find(".dxgvCustomization"); if (scroll && customWindow) { customWindow.scrollTop(scroll); } }
Attached are a project and screenshot demonstrating how the project operates on my side.
When I try this, I get an error. see attachment.
But I`m not so fit in java. I like more vb serverside…so i hope for other solution.
Is the command COLUMNMOVE used when i add and remove a column ?
Or only remove like in your example?
Hello Dirk,
>> When I try this, I get an error. see attachment.
My solution uses theJQuery library, please ensure that your project contains the jquery-2.1.4.js file and the following script element:
<script src="Scripts/jquery-2.1.4.js"></script>
>> Is the command COLUMNMOVE used when i add and remove a column ?
Yes, the same command is used.
See also: How to enable script debugging
After adding the row <script src="Scripts/jquery-2.1.4.js"></script> in contentpage
and copy comlete script folder to project I get same error.
Hello Dirk,
We need to test the problem on our side to determine its cause. Please modify my project to reproduce the issue and provide me with it. This information will allow me to find the cause of the JavaScript runtime error.
Hi Jenny, two minutes after your Comment I get this information by mail:
******************************************************************************
REPRODUCED - We have reproduced the behavior described in this ticket and are looking for its cause.
Please bear with us. We will send you an automatic notification as soon as we have any updates. If this is a matter of urgency for you, please let us know by contacting us through this ticket online.
******************************************************************************
So, do you need any information from my side?
Hello Dirk ,
We have enough information related to the main problem.
If you need further assistance with a workaround that uses JQuery, please provide me with a runnable project reproducing the problem.