- gridstep2.zip
- GOAOpen
- Extensions
- Grid
- GoaControls
- HandyContentControl
- HandyDataPresenter
- HandyDropDown
- HandyList
- HandyList
- HandyLocatedBorder
- HandyScroller
- HandySizers
- GoaOpen.csproj
- LICENSE.txt
- Properties
- ReadMe.txt
- ResourceHelper.cs
- SLControls
- Data
- DataGrid
- Extended
- Calendar
- DatePicker
- GridSplitter
- TabControl
- Standard
- Button
- CheckBox
- HandySlider
- HandyStyler
- HyperlinkButton
- ListBox
- ProgressBar
- RadioButton
- TextBox
- ToggleButton
- ToolTip
- themes
- ReadMe.txt
- Tutorials
- GridBody
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using Open.Windows.Controls;
namespace GridBody
{
public partial class Page : UserControl
{
//private GObservableCollection<Person> personCollection;
private GObservableCollection<Country> countryCollection;
public Page()
{
InitializeComponent();
//personCollection = new GObservableCollection<Person>();
//for (int personIndex = 0; personIndex < 1000; personIndex++)
// personCollection.Add(new Person("FirstName" + personIndex, "LastName" + personIndex, "Address" + personIndex, "City" + personIndex, "ZipCode" + personIndex, personIndex % 2 == 0, "Comment" + personIndex));
//MyGridBody.ItemsSource = personCollection;
countryCollection = new GObservableCollection<Country>();
for (int countryIndex = 0; countryIndex < 100; countryIndex++)
{
Country country = new Country("CountryName" + countryIndex);
for (int personIndex = 0; personIndex < 10; personIndex++)
country.Children.Add(new Person("FirstName" + personIndex, "LastName" + personIndex, "Address" + personIndex, "City" + personIndex, "ZipCode" + personIndex, personIndex % 2 == 0, "Comment" + personIndex));
country.IsExpanded = true;
countryCollection.Add(country);
}
MyGridBody.ItemsSource = countryCollection;
}
private void MyGridBody_CurrentCellValidating(object sender, Open.Windows.Controls.CellValidatingEventArgs e)
{
if (MyGridBody.CurrentCellName == "FirstName")
{
string newValue = e.NewValue as string;
if (string.IsNullOrEmpty(newValue))
e.Cancel = true;
}
}
private void MyGridBody_CurrentItemValidating(object sender, ItemValidatingEventArgs e)
{
Person currentPerson = HandyContainer.GetItemSource(e.Item) as Person;
if ((currentPerson != null) && (!currentPerson.Validate()))
e.Cancel = true;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.