The article Understanding NetAdvantage for Visual Studio LightSwitch - Dealing with Charts (Part 1) has described the work with Series based LightSwitch controls like Infragistics Data Chart control.
A major milestone in the development of applications for Visual Studio LightSwitch is understanding the fundamental principle of the binding data to controls.
Visual Studio LightSwitch control extensions are 3 main groups defined by the type of the bound data
- Value based controls
- Group based controls
- Collection based controls
Infragistics Inc. offers in NetAdvantage for Visual Studio LightSwitch 2011.1 Range Sliders, Bullet Graph and Gauges, which are implemented as group based controls.
This article is about how to use LightSwitch group based controls, and in particular Infragistics DateTime Range Slider.
As a basis for the example application program will be used in the previous part of this post that could be found here:
Look at the Orders table:
This table contains several from DateTime type.
- Order Date
- Required Date
- Shipped Date
Selected Item from the Orders list is represented with Infragistics DateTime Range Slider.
Infragistics DateTime Range Slider is a multi thumb slider, that can be used with data type DateTime.
Value in each of these fields:
is represented via thumb. You just need to select for the specified filed “Value” control.
Some properties could be set from the property grid.
Full information about Infragistics DateTime Range Slider properties you could find here:
In this case some properties like Min Value and Max Value are set by Property Grid.
When you start the application you will see that the positions of the thumbs on the slider is changed when you change the selected item
Using Data Source against Property Grid.
Add in the OrdersListDetail screen again “Selected Item” and represent it via Infragistics DateTime Range Slider.
Add twice fields “Required Date” and “Order Date” and use the second time “Required Date” for the slider Min Value and “Order Date” for the slider Max Value.
In this slider Min Value and Max Value are set two times – from data source and from property grid.
When you have this case value with data source is the actual one. Value from property grid is not used when you have value from data source.
Run the application again and see how to change positions of thumbs in the slider when changing the selected item from the collection.
Sample application you could download here IgLighrSwitchDemo_part2.zip: