Hi All,
I am dynamically populating the UltraList View with values by creating UltraListviewItem.The ValueList property under any column always seems to be null in my case. Is the valuelist property will be available only if it is set with some datasource?
Thanks in Advance,
Manikandan
The ValueList property will only return a non-null value when you explicitly set it. Typical use is to set it to an instance of the Infragistics.Win.ValueList class (which exposes a ValueListItems collection, to which items can be added), and assign an Infragistics.Win.EditorWithCombo instance to the Editor property, so that you can display a dropdown when the item is edited. If you repost with some more details about what information you are looking for, we can try to point you to the correct property.
I am new to the Infragistics components is it therefore possible to place a small example or explain to me where I can find an example. I working on a listview with three columns. The user shall be able to set the checkbox for a listview item. And then select a value in the second and third column by using a dropdown box.
So I need to ad a Infragistics.Win.UltraWinListView.UltraListViewItem and two instances of Infragistics.Win.UltraWinListView.UltraListViewSubItem to the listview. You are talking about the editor property but I cannot find this property?
Sub-items cannot be edited, so you can't get a dropdown in a sub-item column. You can still use the ValueList to define what gets displayed for those sub-items (see below).
// Set the View to 'Details'this.listView.View = UltraListViewStyle.Details;
// Display checkboxesthis.listView.ViewSettingsDetails.CheckBoxStyle = CheckBoxStyle.CheckBox;
// Change the caption for the main columnthis.listView.MainColumn.Text = "One";
// Add columnsthis.listView.SubItemColumns.Add( "Two" );this.listView.SubItemColumns.Add( "Three" );
// Create a ValueList and add some itemsValueList vl = new ValueList();vl.ValueListItems.Add( 0, "Zero" );vl.ValueListItems.Add( 1, "One" );vl.ValueListItems.Add( 2, "Two" );vl.ValueListItems.Add( 3, "Three" );
// Assign the ValueList to both sub-item columns; note that// you could also assign a separate instance to each column.this.listView.SubItemColumns["Two"].ValueList = vl;this.listView.SubItemColumns["Three"].ValueList = vl;
// Add items with sub-itemsfor ( int i = 0; i < 10; i ++ ){ UltraListViewItem item = this.listView.Items.Add( null, string.Format("Item {0}", i) ); item.SubItems[0].Value = i % 2; item.SubItems[1].Value = i % 3;}