I Have a grid with two dropdownlist, the value list of the second drop down is loaded as a function of the value of the first dropdown.
In the AfterCellUpdate event I load the ValueList for the second dropdown.
Is all ok, but if i use a UltraGridRowEditTemplate i do not see, in the second dropdown, the value list, I see only normal textbox not a dropdownlist.
Seems to be the same problem described in http://es.infragistics.com/community/forums/p/55212/284387.aspx, where can I find the solution?
Hi,
What version of NetAdvantage are you using?
Without seeing the problem first-hand, my best guess would be that this is a timing issue. Perhaps the problem occurs because AfterCellUpdate fires while the second dropdown is in the process of entering edit mode or doing some other processing.
Can you post a small sample project demonstrating what you are doing and the behavior you are getting?
Thank for your reply.
I'm using Infragistics 2012 vol1, I have attached a simple project.
If you try to add a new row at the grid you can view the problem!
Thanks
Thanks to your advice I solved my problem!
Thanks!
Okay, I think I was right, this is a timing problem. You are using the AfterCellUpdate event to set the ValueList on the second column. The problem is that this event doesn't fire until after the second cell (proxy) is already in edit mode. Setting the ValueList here would end up changing the editor used by the column and you can't change the editor while the cell is already in edit mode.
In fact, it's worse than that. You really can't change the editor once the RowEditTemplate is displayed, because it has already created the editor proxy.
So what you need to do here is let the grid know that this column will be using a ValueList up front. Essentially, the problem is that the grid doesn't know this column will eventually be using a ValueList, so it's using a normal text editor for the cell and by the time the RET is displayed, it's too late the change it.
So all you have to do is assign an empty ValueList to the column initially and it works fine.
private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e) { ValueList vl = new ValueList(); e.Layout.Bands[0].Columns["Column2"].ValueList = vl; }