Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

Deactivate an item in a valuelist based on a tag property

I have some items in an Infragistics (using 2008 volume 3 WinForms) valuelist which are active and some are inactive but need to be displayed for historical records purposes.  

My ideal situation would be to display them but not select the item.  The second best scenario would be to do a strikethrough on the text of the Inactive records.
0
busapps
Asked:
busapps
  • 3
  • 3
1 Solution
 
PlatoConsultantCommented:
there is a before drop down event you can handle it and then depend upon the data present in the grid row u will handle the enabling or disabling of this drop down...





0
 
busappsAuthor Commented:
Not quite what I'm looking for.  I need to allow some ValueListItems to be selected within a ValueList, but other ValueListItems within the ValueList to be not selected.  
0
 
PlatoConsultantCommented:
can u use the filter items, if u want to disable some items in the valuelist there need to do too much programming.

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
busappsAuthor Commented:
not sure what you mean, please expound.
0
 
PlatoConsultantCommented:
it is difficult to enable / disable  items in the value list at run time ... change the popluating of value list logic as shown in the infragisitcs sample.




    private void PopulateSpacePortsValueList()
	{
        if ( this.gridValueLists.DisplayLayout.ValueLists.Exists("SpacePorts") )
			return;
 
        ValueList objValueList = this.gridValueLists.DisplayLayout.ValueLists.Add("SpacePorts");
 
        DataTable ds = new SpaceFlightsData().SpacePorts;
 
        for ( int i = 0; i < ds.Rows.Count; i++ )
            objValueList.ValueListItems.Add((int)(ds.Rows[i].ItemArray[0]), ds.Rows[i].ItemArray[1].ToString());
 
	}

Open in new window

0
 
busappsAuthor Commented:
The 2 valuelists is a good idea.  Just change them on the before dropdown event and set it back on the afterExitEntryMode event.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now