Does anyone know whether it is possible to use SavePreset and LoadPreset to save and restore column specific settings? In other words, I want to allow a user to resize columns, change sort order, change column order, group, etc, then save those settings via SavePreset. The next time the user comes back, LoadPreset would restore the most recent settings.
Thanks
anybody got the missing methods?
Great post! This is exactly what I need my grid to do.
Would you be able to post the code for the following methods?
DoPreset_ColumnOrder
DoGrid_GroupBy
DoGroupBy_GetColumns
DoGroupBy_SetColumns
DoSortOrder_GetColumns
DoSortOrder_SetColumns
I haven't been able to find a good example of "forcing" the sort order in a code behind method. I just want the default behavior to function (just like a user "clicked" on the heading of the grid).
Unfortunately, unless I missed it, this is not a feature in the grid. So, I rolled my own Save and LoadPreset methods into our view control (manages an UltraWebGrid). The SavePreset method dumps out the format of the grid to an XML file and the LoadPreset method restores the settings from the XML file. In this manner, we can allow the user to reorder, resize, group, etc and save those settings. Or, an administrator can tweak the XML file for the particular view rendered for a given instance.
At the risk of information overkill, the cut and paste below provides:
Hope this helps. Wish there was a feature of the grid I could point you at instead.
Randy
Public Sub DoPreset_Save _ (ByVal fileName As String, _ Optional ByVal viewName As String = "Add Name Here", _ Optional ByVal isSaveAll As Boolean = True)
Dim writer As New System.Xml.XmlTextWriter(fileName:=fileName, Encoding:=System.Text.Encoding.UTF8)
'Use indenting for readability. writer.Formatting = System.Xml.Formatting.Indented
writer.WriteComment("Avrio View Control Presets. ViewName=" & viewName)
writer.WriteStartElement("EngineDS") writer.WriteAttributeString(prefix:="xmlns", localName:=Nothing, ns:=Nothing, value:="http://tempuri.org/WebViewDS.xsd")
' **************************************************************************** ' Write a "VIEW" element to describe the general behavior of the grid. ' ****************************************************************************
writer.WriteStartElement("View")
writer.WriteElementString("ViewName", viewName)
writer.WriteElementString("AllowColumnMoving", Me.ig.DisplayLayout.AllowColumnMovingDefault) writer.WriteComment("AllowColumnMoving choices are: 0=Not Set, 1=None, 2=Allow from server, 3=Allow from client")
writer.WriteElementString("AllowColumnSizing", Me.ig.DisplayLayout.AllowColSizingDefault) writer.WriteComment("AllowColumnSizing choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)")
writer.WriteElementString("AllowGroupBy", IIf(Me.allowsGroupBy, 1, 0)) writer.WriteComment("AllowGroupBy choices are: 0=False, 1=True")
writer.WriteElementString("ExpandAll", "0") writer.WriteComment("ExpandAll forces all the nodes of each grouped subset to expand: 0=DoNotExpand, 1=Expand")
writer.WriteElementString("AllowRowFiltering", Me.ig.DisplayLayout.FilterOptionsDefault.AllowRowFiltering) writer.WriteComment("AllowRowFiltering choices are: 0=Not Set, 1=None, 2=Allow from server, 3=Allow from client")
writer.WriteElementString("AllowRowNumberingDefault", Me.ig.DisplayLayout.AllowRowNumberingDefault) writer.WriteComment("AllowRowNumberingDefault determines whether the grid generates row numbers per row.") writer.WriteComment("Choices are: 0=NotSet, 1=None, 2=Continous, 3=ByDataIsland, 4=ByBandLevel")
writer.WriteElementString("HeaderClickActionDefault", Me.ig.DisplayLayout.HeaderClickActionDefault) writer.WriteComment("HeaderClickActionDefault choices are: 0=Not Set, 1=Select, 2=MultiColumnSort, 3=SingleColumnSort")
If Me.ig.DisplayLayout.Pager.AllowPaging = False Then writer.WriteElementString("ItemsPerPage", "-1") Else writer.WriteElementString("ItemsPerPage", Me.ig.DisplayLayout.Pager.PageSize.ToString) End If writer.WriteComment("Indicates the number of rows per page. Any value <= 0 indicates no paging (i.e., all rows are retrieved on page 1). All other values indicate the number of items per web page. A value >= 1 sets the grid's pager.AllowPaging property to True.") writer.WriteComment("It is important to note that rows per page does not include grouped rows, instead it refers to the number of items at what is called Band 0. If items are grouped, there would be 10 groups at the top level on the page along with all their child rows.")
writer.WriteElementString("PagerStyleMode", Me.ig.DisplayLayout.Pager.StyleMode)
writer.WriteElementString("PagerAlignment", Me.ig.DisplayLayout.Pager.Alignment)
writer.WriteElementString("PagerPattern", Me.ig.DisplayLayout.Pager.Pattern)
writer.WriteElementString("RowHeightDefault", Me.ig.DisplayLayout.RowHeightDefault.ToString) writer.WriteComment("RowHeightDefault indicates the height of a grid row. Uses html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).")
writer.WriteElementString("RowSizingDefault", Me.ig.DisplayLayout.RowSizingDefault) writer.WriteComment("RowSizingDefault choices are: 0=NotSet, 1=Fixed (i.e., row cannot be resized), 2=Free (i.e., row can be resized by the user)")
writer.WriteElementString("ColumnWidthDefault", Me.ig.DisplayLayout.ColWidthDefault.ToString) writer.WriteComment("ColumnWidthDefault indicates the width of a grid column. Uses html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).")
writer.WriteElementString("RowSelectType", Me.ig.DisplayLayout.SelectTypeRowDefault) writer.WriteComment("RowSelectType choices are: 0=Not Set, 1=None, 2=Single row select, 3=Extended/multi row select")
writer.WriteElementString("GroupByColumns", Me.DoGroupBy_GetColumns()) writer.WriteComment("GroupByColumns identifies those columns that are to be grouped and the order in which they are grouped (e.g., Type~Category~Status would indicate grouping using columns with a BaseColumnName of Type, then of Category, then of Status")
writer.WriteElementString("SortByColumnsOrder", Me.DoSortOrder_GetColumns()) writer.WriteComment("SortByColumnsOrder identifies the columns that are to be sorted the direction of the sort (i.e., Ascending or Descending)") writer.WriteComment("The format is as follows: BaseColumnName~Order,BaseColumnName~Order where Order is 1 for Ascending and 2 for Descending.") writer.WriteComment("An example would be: Type~1,Category~2. This would indicate that Type is the primary ascending sort element, and a secondary sort on Category descending.")
writer.WriteElementString("SortCaseSensitiveDefault", Me.ig.DisplayLayout.SortCaseSensitiveDefault) writer.WriteComment("SortCaseSensitiveDefault specifies whether to respect or ignore the capitalisation of the values in the cells when sorting.") writer.WriteComment("Choices are: 0=NotSet, 1=True, 2=False")
writer.WriteElementString("Description", "Enter description here.")
writer.WriteEndElement()
' **************************************************************************** ' Write COLUMN elements to describe the behavior of each column ' ****************************************************************************
If isSaveAll Then Dim igColumn As Infragistics.WebUI.UltraWebGrid.UltraGridColumn Dim igColumns As Infragistics.WebUI.UltraWebGrid.ColumnsCollection = Me.ig.Columns For Each igColumn In igColumns With igColumn writer.WriteComment("Column=" & igColumn.BaseColumnName) writer.WriteStartElement("Columns")
' ??? Add comments for each item ??? writer.WriteElementString("BaseColumnName", .BaseColumnName()) writer.WriteComment("BaseColumnName is the underlying DataSource name and is the primary key for the column.")
writer.WriteElementString("AllowGroupBy", .AllowGroupBy) ' (yes/No/Not Set) writer.WriteComment("AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)")
writer.WriteElementString("AllowResize", .AllowResize) ' (Free/Fixed/Not Set) writer.WriteComment("AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)")
writer.WriteElementString("AllowRowFiltering", IIf(.AllowRowFiltering, 1, 0)) ' boolean writer.WriteComment("AllowRowFiltering on this column. 0=False, 1=True")
writer.WriteElementString("DataType", .DataType) ' string writer.WriteComment("DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)")
writer.WriteElementString("Mask", .Format) ' string writer.WriteComment("Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.") writer.WriteComment("As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.") writer.WriteComment("Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.")
writer.WriteElementString("Caption", .Header.Caption) writer.WriteComment("Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.")
writer.WriteElementString("HorizontalAlignment", .CellStyle.HorizontalAlign) writer.WriteComment("HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)")
writer.WriteElementString("CellMultiLine", .CellMultiline) '(yes/no/notset) writer.WriteComment("CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No")
writer.WriteElementString("Tooltip", .Header.Title) 'tooltip for the header writer.WriteComment("Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.")
writer.WriteElementString("Hidden", IIf(.Hidden, 1, 0)) ' boolean writer.WriteComment("Hidden allows the administrator to hide a column from view.")
writer.WriteElementString("IsBound", IIf(.IsBound, 1, 0)) ' boolean writer.WriteComment("IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)")
writer.WriteElementString("Width", .Width.ToString) writer.WriteComment("Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.") writer.WriteComment("Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).") writer.WriteComment("As of this writing, only supports pixel configuration.")
' ??? How do we determine column ordering ??? ' ??? How to determine sorting and grouping ordering ???
writer.WriteEndElement() End With Next
End If
'Write the XML to file and close the writer. writer.Flush() writer.Close()
''Read the file back in and parse to ensure well formed XML. 'Dim doc As New System.Xml.XmlDocument() ''Preserve white space for readability. 'doc.PreserveWhitespace = True ''Load the file. 'doc.Load(fileName)
''Write the XML content to the console. 'Console.Write(doc.InnerXml)
End Sub Public Sub DoPreset_Load(ByVal fileName As String) Dim webViewDS As Avrio.Intellego.WebViewDS = AppProperties.Engine.GetWebViewXML(fileName:=fileName) Dim view As Avrio.Intellego.WebViewDS.View = webViewDS.Views(0)
' ********************************************************* ' Establish the column order ' ********************************************************* Me.DoPreset_ColumnOrder(webViewDS:=webViewDS)
' ********************************************************* ' Apply View Behavior presets ' ********************************************************* If view.ItemsPerPage >= 1 Then Me.ig.DisplayLayout.Pager.AllowPaging = True Me.ig.DisplayLayout.Pager.PageSize = view.ItemsPerPage Else Me.ig.DisplayLayout.Pager.AllowPaging = False End If
Me.ig.DisplayLayout.Pager.StyleMode = view.PagerStyleMode Me.ig.DisplayLayout.Pager.Alignment = view.PagerAlignment Me.ig.DisplayLayout.Pager.Pattern = view.PagerPattern
Me.ig.DisplayLayout.AllowColumnMovingDefault = view.AllowColumnMoving Me.ig.DisplayLayout.AllowColSizingDefault = view.AllowColumnSizing Me.DoGrid_GroupBy(igColumns:=Me.iG.Columns, isGrouped:=view.AllowGroupBy) Me.iG.DisplayLayout.AllowRowNumberingDefault = view.AllowRowNumberingDefault Me.iG.DisplayLayout.HeaderClickActionDefault = view.HeaderClickActionDefault Me.iG.DisplayLayout.FilterOptionsDefault.AllowRowFiltering = view.AllowRowFiltering Me.iG.DisplayLayout.ColWidthDefault = System.Web.UI.WebControls.Unit.Parse(view.ColumnWidthDefault) Me.iG.DisplayLayout.RowHeightDefault = System.Web.UI.WebControls.Unit.Parse(view.RowHeightDefault) Me.iG.DisplayLayout.RowSizingDefault = view.RowSizingDefault Me.iG.DisplayLayout.SelectTypeRowDefault = view.RowSelectType If iG.DisplayLayout.SelectTypeRowDefault = Infragistics.WebUI.UltraWebGrid.SelectType.Extended _ Or iG.DisplayLayout.SelectTypeRowDefault = Infragistics.WebUI.UltraWebGrid.SelectType.Single Then iG.DisplayLayout.RowSelectorsDefault = Infragistics.WebUI.UltraWebGrid.RowSelectors.Yes Else iG.DisplayLayout.RowSelectorsDefault = Infragistics.WebUI.UltraWebGrid.RowSelectors.No End If Me.iG.DisplayLayout.SortCaseSensitiveDefault = view.SortCaseSensitiveDefault
If view.ExpandAll Then Me.iG.ExpandAll()
Dim column As Avrio.Intellego.WebViewDS.ColumnsRow Dim igColumn As Infragistics.WebUI.UltraWebGrid.UltraGridColumn
' ********************************************************* ' Apply Column Presets ' ********************************************************* For Each column In webViewDS.Columns.Rows With column Try igColumn = Me.iG.Columns.FromKey(.BaseColumnName) igColumn.AllowGroupBy = .AllowGroupBy igColumn.AllowResize = .AllowResize igColumn.AllowRowFiltering = .AllowRowFiltering igColumn.DataType = .DataType If Not .Mask Is Nothing Then igColumn.Format = .Mask End If If Not .Caption Is Nothing Then igColumn.Header.Caption = .Caption End If igColumn.CellStyle.HorizontalAlign = .HorizontalAlignment igColumn.CellMultiline = .CellMultiLine igColumn.Header.Title = .Tooltip igColumn.Hidden = .Hidden igColumn.IsBound = .IsBound
If Not .Width = Nothing And .Width <> String.Empty Then igColumn.Width = System.Web.UI.WebControls.Unit.Parse(.Width) End If Catch exp As Exception '??? For now, I am going to ignore, but probably need to at least report the info somewhere ??? System.Diagnostics.Debug.WriteLine("Failed DoPreset_Load at column=" & .BaseColumnName & ". Error=" & exp.Message) End Try End With Next
' Apply GroupBy Settings If webViewDS.Views(0).GroupByColumns <> String.Empty Then Me.DoGroupBy_SetColumns(columnsAsCsv:=webViewDS.Views(0).GroupByColumns, clearOldGroups:=True) End If
' Apply SortOrder Settings If webViewDS.Views(0).SortByColumnsOrder <> String.Empty Then Me.DoSortOrder_SetColumns(columnsAsCsv:=webViewDS.Views(0).SortByColumnsOrder, clearOldSorts:=False) End If
End Sub
The resulting XML file looks like this:
<!--Avrio View Control Presets. ViewName=IssuesPerCategory--><EngineDS xmlns="http://tempuri.org/WebViewDS.xsd"> <View> <ViewName>IssuesPerCategory</ViewName> <AllowColumnMoving>1</AllowColumnMoving> <!--AllowColumnMoving choices are: 0=Not Set, 1=None, 2=Allow from server, 3=Allow from client--> <AllowColumnSizing>2</AllowColumnSizing> <!--AllowColumnSizing choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=False, 1=True--> <ExpandAll>1</ExpandAll> <!--ExpandAll forces all the nodes of each grouped subset to expand: 0=DoNotExpand, 1=Expand)--> <AllowRowFiltering>0</AllowRowFiltering> <!--AllowRowFiltering choices are: 0=Not Set, 1=None, 2=Allow from server, 3=Allow from client--> <AllowRowNumberingDefault>1</AllowRowNumberingDefault> <!--AllowRowNumberingDefault determines whether the grid generates row numbers per row.--> <!--Choices are: 0=NotSet, 1=None, 2=Continous, 3=ByDataIsland, 4=ByBandLevel--> <HeaderClickActionDefault>3</HeaderClickActionDefault> <!--HeaderClickActionDefault choices are: 0=Not Set, 1=Select, 2=MultiColumnSort, 3=SingleColumnSort--> <ItemsPerPage>-1</ItemsPerPage> <!--Indicates the number of rows per page. Any value <= 0 indicates no paging (i.e., all rows are retrieved on page 1). All other values indicate the number of items per web page. A value >= 1 sets the grid's pager.AllowPaging property to True.--> <!--It is important to note that rows per page does not include grouped rows, instead it refers to the number of items at what is called Band 0. If items are grouped, there would be 10 groups at the top level on the page along with all their child rows.--> <PagerStyleMode>4</PagerStyleMode> <PagerAlignment>1</PagerAlignment> <PagerPattern>Goto [default]. You are viewing page [currentpageindex] of [pagecount]. [page:first:First] [page:prev:Previous] [page:next:Next] [page:last:Last]</PagerPattern> <RowHeightDefault>15px</RowHeightDefault> <!--RowHeightDefault indicates the height of a grid row. Uses html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <RowSizingDefault>2</RowSizingDefault> <!--RowSizingDefault choices are: 0=NotSet, 1=Fixed (i.e., row cannot be resized), 2=Free (i.e., row can be resized by the user)--> <ColumnWidthDefault>100px</ColumnWidthDefault> <!--ColumnWidthDefault indicates the width of a grid column. Uses html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <RowSelectType>3</RowSelectType> <!--RowSelectType choices are: 0=Not Set, 1=None, 2=Single row select, 3=Extended/multi row select--> <GroupByColumns>QueryFilter</GroupByColumns> <!--GroupByColumns identifies those columns that are to be grouped and the order in which they are grouped (e.g., Type~Category~Status would indicate grouping using columns with a BaseColumnName of Type, then of Category, then of Status--> <SortByColumnsOrder>QueryFilter~1</SortByColumnsOrder> <!--SortByColumnsOrder identifies the columns that are to be sorted the direction of the sort (i.e., Ascending or Descending)--> <!--The format is as follows: BaseColumnName~Order,BaseColumnName~Order where Order is 1 for Ascending and 2 for Descending.--> <!--An example would be: Type~1,Category~2. This would indicate that Type is the primary ascending sort element, and a secondary sort on Category descending.--> <SortCaseSensitiveDefault>0</SortCaseSensitiveDefault> <!--SortCaseSensitiveDefault specifies whether to respect or ignore the capitalisation of the values in the cells when sorting.--> <!--Choices are: 0=NotSet, 1=True, 2=False--> <Description>Enter description here.</Description> </View> <!--Column=ID--> <Columns> <BaseColumnName>ID</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.Int32</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>ID</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>24px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=Category--> <Columns> <BaseColumnName>Category</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>Category</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>49px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=Type--> <Columns> <BaseColumnName>Type</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>Type</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>66px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=Status--> <Columns> <BaseColumnName>Status</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>Status</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>75px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=Priority--> <Columns> <BaseColumnName>Priority</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.Int16</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>Priority</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>48px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=IsNow--> <Columns> <BaseColumnName>IsNow</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.Boolean</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>IsNow</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>41px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=CreateDate--> <Columns> <BaseColumnName>CreateDate</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.DateTime</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>CreateDate</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>129px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=Description--> <Columns> <BaseColumnName>Description</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>Description</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width>172px</Width> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=Notes--> <Columns> <BaseColumnName>Notes</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>Notes</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width /> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=Solution--> <Columns> <BaseColumnName>Solution</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>Solution</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width /> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=FileName--> <Columns> <BaseColumnName>FileName</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>FileName</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width /> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns> <!--Column=QueryFilter--> <Columns> <BaseColumnName>QueryFilter</BaseColumnName> <!--BaseColumnName is the underlying DataSource name and is the primary key for the column.--> <AllowGroupBy>1</AllowGroupBy> <!--AllowGroupBy choices are: 0=Not Set, Yes=1, No=2)--> <AllowResize>0</AllowResize> <!--AllowResize choices are: 0=Not Set, 1=Fixed (i.e., no sizing), 2=Free (i.e., allow sizing)--> <AllowRowFiltering>1</AllowRowFiltering> <!--AllowRowFiltering on this column. 0=False, 1=True--> <DataType>System.String</DataType> <!--DataType indicates the .NET assigned System.Type (e.g., System.String, System.Int32, System.Int16, System.DateTime, System.Boolean, etc.)--> <Mask /> <!--Mask provides a means of formatting numbers, string, datetimes, etc. The function is based on the MS Format function.--> <!--As of this writing, documentation can be found at: http://msdn.microsoft.com/en-us/library/26etazsy.aspx.--> <!--Look in the section entitled 'Format Specifiers' for links to formats for each of the various data types.--> <Caption>QueryFilter</Caption> <!--Caption allows the column title to be changed to be better understood by the reader. If left blank, the BaseColumnName is used.--> <HorizontalAlignment>0</HorizontalAlignment> <!--HorizontalAlignment choices are: 0=NotSet, 1=Left, 2=Center, 3=Right, 4=Justify, text is aligned at both the left and the right of the object)--> <CellMultiLine>0</CellMultiLine> <!--CellMultiLine choices are: 0=NotSet, 1=Yes, 2=No--> <Tooltip /> <!--Tooltip allows for the configuration of a tooltip when the user mouses over the column heading.--> <Hidden>0</Hidden> <!--Hidden allows the administrator to hide a column from view.--> <IsBound>1</IsBound> <!--IsBound indicates whether the column is data bound to the dataSource or is added as a custom column (e.g., button column for launching doc display)--> <Width /> <!--Indicates a custom width for the column. If blank, View.ColumnWidthDefault is used.--> <!--Supports html syntax (e.g. 15px=15 pixels, 10%=10 percent of available space, 25pt=25 points).--> <!--As of this writing, only supports pixel configuration.--> </Columns></EngineDS>
An answer to this would be greatly appreciated because we are having the same problems. I would assume that using SavePreset and LoadPreset would do this, but we have not found out a solution other than having to hand code the column order, column size, column visible and whether the column is pinned.