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?
Yes, you should manualy edit your javascript when you add new items to your database. I could also suggest you to try the WebDataGrid control - http://es.infragistics.com/products/aspnet/data-grid/.
Nikolay
I have tried this solution; it seems that it is working; this however makes it necessary to update the aspx file whenever a new work category/subcategory is added to the system.
Hello Nikolay
Thanks for your email. I have not had a chance to try your proposed solution, but I am planning on doing it this week, and I will keep you posted on the progress.
Chris
Hello,
I'm just checking if you managed to resolve your issue.
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.