Hi all. This one might be a little hard for me to explain, I'll try my best.
I have an UltraWebGrid with some of it's ColumnEditors set as Custom. Then I set the EditorControlID to a WebCombo. The problem here is that I'm trying to populate my WebCombo by first reading the values I have for the cells belonging to that column and then querying the DB to get the 'text field' related to ta ID value within the cell.
What I'd like to know is what could I do so that the grid would display the text field that I have set in the WebCombo working as an editor for that column. So far, I have the ID displayed in the cell and when I enter to edit it, the combo is shown and the text displayed is actually the Description field. I'd like the grid to show this field instead of the related ID.
My guess is that it has to do with the order of the events that are being fired. In this case I have to populate the combo after DataBinding the grid as I have to get those values to then populate the combo and set this populated control as the EditorControl.
Hope my post is not too messy. Thanks for your help.
Have you set the DataTextField property of your WebCombo to the Key of the WebCombo column for what you want displayed in the grid cells?
I don't think that the order of events should have much to do with this, so long as you have the editor control set and the combo populated before the page renders.
Hi, Vince. Thanks for your reply.
I have set this property already. I thought it could be a matter regarding the order of the events since I'm binding the webGrid before I have populated the combo (the combo is populated with the values I get from the grid). I'm not sure how the relation between IDs and Texts is done, but I thought the problem could be that the grid cannot find any values in the combo to relate to.
I have been trying other ways to achieve what I want and I found out that if I add a TempleatedColumn instead of a UltraGridColumn, everything seems to work fine. It's the same combo, populated the same way and everything. But this was just a test and changing those columns to TemplatedColumns would be quite hard. So, is there anything special in the TemplatedColumn that I could configure in a regular UltraGridColumn to get this behavior I'm gettin with the TC? Thnaks again.