I have an Ultrawebgrid with a valuelist column (statically loaded with values at Page_Load). When the user selects a value (captured at AfterCellUpdated event), another ValueList is loaded (based on the first valuelist's selected value) and populated for the user to also select.
My problem is that when the grid is loaded, while the second column values are displayed, when clicking on the cells themselves, no valuelist dropdown is shown, because this is not created until the first column dropdownlist is updated.
What I would like to do is to have both value lists loaded and available at page_load, so as to enable editing of the second valuelist without having to change the first column's value first.
Any ideas on how this can be achieved? Which event should I hook this up to?
Hi cloucas,
Can you share your code, used to create the second drop-down? You could try to create both drop downs on page load.
Hi Nikolay
Thanks for your response;
Would you like the code in the code behind or the code in the aspx? They are quite long files, do you want the entire files or the sections relevant to the question?
Hello Nikolay
I have prepared a small sample for you to test; it is reproducing a couple of issues I am facing, and hopefully you can hep me resolve both. Please see attached a small solution and database.
When you start the application, you can click on the button to load data into the grid. After you do that, if you click on the Work Sub Category column, you can see that no drop down is shown.
Another question I have is, once you update the Work Type column and move the focus to the Work Sub category, the drop down is created and loaded with values, with the first value selected.
My question is that the text appears twice separated by a comma (e.g Preparation For Audit,Preparation For Audit when AUDIT is selected in the Work Type).
Let me know if you have any questions on this example.
Thanks
Chris
Hello Chris,
I’m still looking into this, but it seems that the dropdown value list is populated before the request to the server is complete. And this is the reason that the first time you enter edit mode of the last column, the value list is empty. You can also see that when entering edit mode of another cell from that column, the values returned from the server are not correct – they are the values for the previous cell that was in edit mode. And this is for the same reason – the ValueList is populated with the values from the previous request, because the current is not complete.
I will update you when I have more information.
Thanks for your continuing support. I will be waiting for your update.
Hi Chris,
The only thing I can suggest is to create the ValueList completely on the client, without using page methods.
function BeforeEnterEditMode(tableName, cellName) { if (col.Key == "SubWorkTypeId") { var row = window.igtbl_getRowById(cellName); var col = row.getCell(2).Column;
if (row.getCell(1).getValue() == "1") { valueList = new Array(["Option1", "Option1"], ["Option2", "Option2"]); }
//Do this for the other options in WorkType column
col.ValueList = valueList; } }
If you have further questions, please feel free to contact me.
Hello,
I'm just checking if you managed to resolve your issue.
I will close this question; thank you very much for your help.
I'm following up to see if you have been able to resolve your issue.
I could not understand what is exactly the issue. Could you please clarify, and explain the steps to reproduce this behavior? Thank you.
Nikolay Hi
Thanks for your input. At this time I have no other questions on this matter; another issue I am facing is that I have a number of users complaining that whenever the grid is loaded with more and more rows, the time to refresh the totals while jumping from one cell to the other in entering data increases. They claim that after 30 or so rows, they notice a large delay (more than a few seconds). Do you know if there are any limitations?
Hello cloucas,
I'm just checking if you have any other questions.