Reputation: 1630
I have an ultrawingrid from Infragistics which binds itself to a dataset. What I want to do is, for one of the columns I want to apply a converter. That means, for a column that displays abbreviations for example, I want to display full names for each. Is there a nice way to do such this in here. I know in WPF I could use converters.
Upvotes: 0
Views: 1874
Reputation: 3228
You could use a DataFilter. The following is an overview of data filters: http://help.infragistics.com/NetAdvantage/WinForms/current/CLR2.0/?page=WinGrid_About_Data_Filters.html
The following blog post has an example: http://blogs.infragistics.com/winforms/articles/using-an-wingrid-datafilter-to-convert-strings-to-bools-and-vice-versa-for-a-checkbox-column.aspx
Upvotes: 0
Reputation: 216323
In your InitializeLayout event you should place something like this
Infragistics.Win.ValueList vlAbbrevs = new Infragistics.Win.ValueList();
vlAbbrevs.ValueListItems.Add("F", "Female");
vlAbbrevs.ValueListItems.Add("M", "Male");
vlAbbrevs.Key = "_ABBVS_";
e.Layout.Bands[0].Columns["Gender"].ValueList = vlAbbrevs;
Upvotes: 3