Hi!
I hope someone here can help me besides "you can't get there from here".
I am importing data into an data table then setting a grid to use the data table as a data source.
I have a ultracombo that I am setting as the editor component for one of the columns. I pre-fill the combo (display member is a string, value member is a guid) and set allownull to true and limittolist to false. Then load the data table with values form my import source and set it as the datasource for the grid. I look up the the import text value to see if it is already contained in my database. If it is, I set the value in the import table to the guid value and everything is perfect (the correct text is displayed in the grid). If I do not already have the text value in my look up table, I set the id column in the table to nothing and put the text value in a separate hidden column. In the InitializeRow event I have the following code:
If CType(e.Row.Cells("ItemTypeId").EditorComponentResolved, Infragistics.Win.UltraWinGrid.UltraCombo).SelectedRow Is Nothing Then CType(e.Row.Cells("ItemTypeId").EditorComponentResolved, Infragistics.Win.UltraWinGrid.UltraCombo).Text = e.Row.GetCellValue("ItemType").ToString End If
This does not display the text value in the grid. I get an empty cell. I need the cell to display the text while not have a corresponding value in the the combo.
Any ideas?
Hello ,
You could achieve your goal with a simple implementation of IUIElementCreationFilter interface. More information about this interface you could find on the following link:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Win_Creation_Filter.html
Also I have created a small sample in order to demonstrate you this approach.
Please let me know if you have any further questions.
Thanks, While I have not put this into my app yet, I have tested and it will work perfectly.