/// <summary>
/// Loads grid definition data from the reader
/// </summary>
protected override void LoadFromReader()
{
_uiGrid = _defClassFactory.CreateUIGridDef();
_reader.Read();
_uiGrid.SortColumn = _reader.GetAttribute("sortColumn");
_reader.Read();
if (_reader.Name == "filter")
{
XmlFilterLoader filterLoader = new XmlFilterLoader(DtdLoader, _defClassFactory);
_uiGrid.FilterDef = filterLoader.LoadFilterDef(_reader.ReadOuterXml());
}
while (_reader.Name == "column")
{
XmlUIGridColumnLoader propLoader = new XmlUIGridColumnLoader(DtdLoader, _defClassFactory);
_uiGrid.Add(propLoader.LoadUIProperty(_reader.ReadOuterXml()));
}
if (_uiGrid.Count == 0)
{
throw new InvalidXmlDefinitionException("No 'column' " +
"elements were specified in a 'grid' element. Ensure " +
"that the element " +
"contains one or more 'column' elements, which " +
"specify the columns to appear in the grid.");
}
}