<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://xceed.com/CS/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Xceed Grid for .NET</title><link>http://xceed.com/CS/forums/76/ShowForum.aspx</link><description>Questions and Answers Relating to Xceed Grid for .NET</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Debug Build: 61120.2)</generator><item><title>How to bring a grid element into view</title><link>http://xceed.com/CS/forums/thread/28267.aspx</link><pubDate>Tue, 22 Dec 2009 15:45:21 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28267</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28267.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28267</wfw:commentRss><description>Each element in the grid can be brought to view using the BringIntoView method. This method will ensure that the grid element is brought into view no matter its state or its parent state. For example, if the grid element is in a collapsed group, the group will be expanded and the grid scrolled (if necessary) so that the grid element is made visible. The FirstVisibleRow and FirstVisibleColumn properties allow you to change the first/last visible row or column. Setting these properties will automatically bring the newly affected row or column into view. When setting the CurrentCell, CurrentColumn or CurrentRow properties as well as when calling the MoveCurrentCell, MoveCurrentRow and MoveCurrentColumn methods, the BringIntoView method must be called if you want to bring the new current object into view.&lt;br/&gt;&lt;br/&gt;The following examples demonstrates how to bring various grid elements into view. Keep in mind that although the examples mostly use rows located within the grid's DataRows, any other type of row, located in any section of the grid or group (i.e., FixedHeaderRows, FooterRows, etc.) can be brought into view in the same manner.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;GridControl1.Groups( GridControl1.Groups.Count - 1 ).BringIntoView() &lt;br/&gt;&lt;br/&gt;GridControl1.FirstVisibleRow = GridControl1.DataRows( GridControl1.DataRows.Count - 1 )&lt;br/&gt;GridControl1.FirstVisibleColumn = GridControl1.Columns( GridControl1.Columns.Count - 1 ) &lt;br/&gt;&lt;br/&gt;GridControl1.CurrentCell = GridControl1.DataRows( GridControl1.DataRows.Count - 1 ).Cells( GridControl1.Columns.Count - 1 )&lt;br/&gt;&lt;br/&gt;GridControl1.CurrentCell.BringIntoView() &lt;br/&gt;&lt;br/&gt;GridControl1.CurrentColumn = GridControl1.Columns( gridControl1.Columns.Count - 1 )&lt;br/&gt;GridControl1.CurrentColumn.BringIntoView() &lt;br/&gt;&lt;br/&gt;GridControl1.CurrentRow = GridControl1.DataRows( gridControl1.DataRows.Count - 1 )&lt;br/&gt;GridControl1.CurrentRow.BringIntoView()&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.Groups[ gridControl1.Groups.Count - 1 ].BringIntoView(); &lt;br/&gt;&lt;br/&gt;gridControl1.FirstVisibleRow = gridControl1.DataRows[ gridControl1.DataRows.Count - 1 ];&lt;br/&gt;gridControl1.FirstVisibleColumn = gridControl1.Columns[ gridControl1.Columns.Count - 1 ]; &lt;br/&gt;&lt;br/&gt;gridControl1.CurrentCell = gridControl1.DataRows[ gridControl1.DataRows.Count - 1 ].Cells[ gridControl1.Columns.Count - 1 ];&lt;br/&gt;&lt;br/&gt;gridControl1.CurrentCell.BringIntoView(); &lt;br/&gt;&lt;br/&gt;gridControl1.CurrentColumn = gridControl1.Columns[ gridControl1.Columns.Count - 1 ];&lt;br/&gt;gridControl1.CurrentColumn.BringIntoView(); &lt;br/&gt;&lt;br/&gt;gridControl1.CurrentRow = gridControl1.DataRows[ gridControl1.DataRows.Count - 1 ];&lt;br/&gt;gridControl1.CurrentRow.BringIntoView();&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description></item><item><title>Highlighting the current cell</title><link>http://xceed.com/CS/forums/thread/28269.aspx</link><pubDate>Wed, 28 Jan 2009 19:36:36 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28269</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28269.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28269</wfw:commentRss><description>&lt;p&gt;&lt;span&gt;You can use the &lt;strong&gt;CurrentCellChanged&lt;/strong&gt; event and change the background color of the current cell; however,&amp;nbsp;if you are using a Vista style, you will need to also override the UIStyle for this to works, since when choosing a style like AERO, it automatically sets many properties.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;private void Form1_Load( object sender, EventArgs e )&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; gridControl1.CurrentCellChanged += new EventHandler( gridControl1_CurrentCellChanged );&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //For a Vista theme&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; gridControl1.SelectionVisualStyle.OverrideUIStyle = true;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; gridControl1.SelectionVisualStyle.BackColor = Color.FromArgb( 40, gridControl1.SelectionBackColor );&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; private DataCell previousCell;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; void gridControl1_CurrentCellChanged( object sender, EventArgs e )&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if( previousCell != null )&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; previousCell.BackColor = gridControl1.DataRowTemplate.BackColor;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if( gridControl1.CurrentCell.GetType() == typeof( DataCell ) )&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gridControl1.CurrentCell.BackColor = Color.DeepPink;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; previousCell = gridControl1.CurrentCell as DataCell;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Is it possible to provide custom sorting criteria?</title><link>http://xceed.com/CS/forums/thread/28222.aspx</link><pubDate>Fri, 10 Oct 2008 14:35:20 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28222</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28222.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28222</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;Any class that implements the IComparer interface can be used by Xceed Grid for .NET to custom sort columns. To assign a data comparer to a column, the column's DataComparer property must be set. This data comparer will then be used when sorting the column to which it was assigned. For example:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;gridControl1.Columns[ "ShipAddress" ].DataComparer = new AddressComparer();&lt;/font&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;An example of a class that implements the IComparer interface is available below (see attachments).&lt;br/&gt;&lt;br/&gt;The AddressComparer class will first sort addresses which begin with numeric values by street name and then civic number. The remainder of the addresses in the regular alphabetical fashion.&lt;/span&gt;&lt;/body&gt;</description></item><item><title>The current cell's ValueChanged event is not raised.</title><link>http://xceed.com/CS/forums/thread/28231.aspx</link><pubDate>Fri, 10 Oct 2008 14:34:39 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28231</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28231.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28231</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;The reason why the current cell's ValueChanged event is not raised is because you only subscribed to the ValueChanged event of the cell which was current at the time when the grid was loaded.&lt;br/&gt;&lt;br/&gt;What you will need to do is to subscribe to the ValueChanged event of each cell in the grid (via the DataRowTemplate) and in the method that will handle the ValueChanged event (currentCell_ValueChanged) check to see if the sender is the current cell.&lt;br/&gt;&lt;br/&gt;For example:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;//If you are setting the DataSource property then this will need to be done between &lt;br/&gt;// calls to the grid's BeginInit and EndInit methods.&lt;br/&gt;gridControl1.BeginInit();&lt;br/&gt;&lt;br/&gt;gridControl1.DataSource = dataSet11.Tables[ 0 ];&lt;br/&gt;&lt;br/&gt;foreach( Xceed.Grid.DataCell cell in gridControl1.DataRowTemplate.Cells )&lt;br/&gt;{&lt;br/&gt;    cell.ValueChanged += new EventHandler( this.currentCell_ValueChanged );&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;gridControl1.EndInit();&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br/&gt;In the currentCell_ValueChanged method, you can then check if the cell whose value was changed is the current cell and if so do the appropriate processing.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;private void currentCell_ValueChanged( object sender, EventArgs e )&lt;br/&gt;{&lt;br/&gt;    if( ( ( Xceed.Grid.DataCell )sender ).IsCurrent )&lt;br/&gt;    {&lt;br/&gt;        //your code&lt;br/&gt;    }&lt;br/&gt;}&lt;/font&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How do I subscribe to the events of each cell?</title><link>http://xceed.com/CS/forums/thread/28221.aspx</link><pubDate>Fri, 10 Oct 2008 14:32:40 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28221</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28221.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28221</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;Subscribing to the desired events for each cell in the DataRowTemplate will, once the grid is populated, also subscribe each cell in the grid to the same events. However, in order to do this, the grid's DataSource must be set between calls to the BeginInit and EndInit methods.&lt;br/&gt;&lt;br/&gt;When binding the grid to a data source by setting the DataSource and DataMember properties or calling the SetDataBinding method during calls to BeginInit and EndInit, the column definitions (not their values) are still read from the data source. This allows you to subscribe each cell in the DataRowTemplate to the desired events. For example:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;GridControl1.BeginInit()&lt;br/&gt;&lt;br/&gt;GridControl1.DataSource = DataSet11&lt;br/&gt;GridControl1.DataMember = "Orders"&lt;br/&gt;&lt;br/&gt;Dim cell As DataCell&lt;br/&gt;For Each cell in GridControl1.DataRowTemplate.Cells&lt;br/&gt;    AddHandler cell.ValidationError, AddressOf Me.cell_ValidationError&lt;br/&gt;Next cell&lt;br/&gt;&lt;br/&gt;GridControl1.EndInit() &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.BeginInit();&lt;br/&gt;&lt;br/&gt;gridControl1.DataSource = dataSet11;&lt;br/&gt;gridControl1.DataMember = "Orders";&lt;br/&gt;&lt;br/&gt;foreach( DataCell cell in gridControl1.DataRowTemplate.Cells )&lt;br/&gt;{&lt;br/&gt;    cell.ValidationError += new ValidationErrorEventHandler( this.cell_ValidationError );&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;gridControl1.EndInit();&lt;/font&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/body&gt;</description></item><item><title>How do I resize the grid and columns when the data is modified?</title><link>http://xceed.com/CS/forums/thread/28243.aspx</link><pubDate>Fri, 10 Oct 2008 14:30:04 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28243</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28243.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28243</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;Yes. In order to do so, you will need to subscribe to each of the columns' editors (by default a GridTextBox) TextChanged event in order to resize when a character is added or removed to or from a cell.&lt;br/&gt;&lt;br/&gt;As for the resizing the grid, you would need to do the following to resize it so that all the columns are displayed:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;int totalColWidth = 0;&lt;br/&gt;&lt;br/&gt;foreach( Xceed.Grid.Column col in gridControl1.Columns )&lt;br/&gt;{&lt;br/&gt;    totalColWidth = totalColWidth + col.Width;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;gridControl1.Width = totalColWidth + gridControl1.RowSelectorPane.Width + gridControl1.ClientRectangle.Width - gridControl1.DisplayRectangle.Width;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;A that demonstrates the required implementation is available for download (see attachments).&lt;/span&gt;&lt;/body&gt;</description></item><item><title>Does the Xceed FTP Library support SSH?</title><link>http://xceed.com/CS/forums/thread/28224.aspx</link><pubDate>Fri, 10 Oct 2008 14:00:19 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28224</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28224.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28224</wfw:commentRss><description>&lt;p&gt;Unfortunately, the Xceed FTP Library does not support SSH. Xceed Ftp for .NET does however support SSL and TLS.&lt;br/&gt;&lt;/p&gt;</description></item><item><title>How do I maintain the current row when the grid is sorted?</title><link>http://xceed.com/CS/forums/thread/28242.aspx</link><pubDate>Thu, 09 Oct 2008 19:12:49 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28242</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28242.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28242</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;It is possible to maintain the current row, however you will need to provide the implementation yourself. What you will need to do is the following:&lt;br/&gt;&lt;br/&gt;1- Create a global member with a Xceed.Grid.Row datatype that will contain the current row.&lt;br/&gt;&lt;br/&gt;2- Create a boolean global member that will act as a flag to determine when the current row has been changed.&lt;br/&gt;&lt;br/&gt;3- Handle the grid's CurrentRowChanged event to set the new current row if it has changed.&lt;br/&gt;&lt;br/&gt;4- Handle the grid's Sorted event to bring the current row into view.&lt;/span&gt;&lt;/body&gt;</description></item><item><title>Unable to change or assign borders.</title><link>http://xceed.com/CS/forums/thread/28227.aspx</link><pubDate>Thu, 09 Oct 2008 17:45:02 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28227</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28227.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28227</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;The row.Borders can not be changed since it is a read-only property. However, you can derive from the row you want and then override the Border property.&lt;br/&gt;&lt;br/&gt;Don't forget to override the OnPaintBorders to paint what you want in your borders.&lt;br/&gt;&lt;br/&gt;It is true that row.Borders.Bottom = ... will affect a copy of the returned Borders.&lt;/span&gt;&lt;/body&gt;</description></item><item><title>How can I make the InsertionRow insert its datarow programmatically?</title><link>http://xceed.com/CS/forums/thread/28229.aspx</link><pubDate>Thu, 09 Oct 2008 17:42:19 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28229</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28229.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28229</wfw:commentRss><description>&lt;body&gt;&lt;p&gt;&lt;span&gt;With version 1.0 of Xceed Grid for .NET it is not possible to make the InsertionRow insert its datarow programmatically.&lt;br/&gt;&lt;br/&gt;As of version 1.1, the BeginEdit and EndEdit methods have been moved to the CellRow class rather than only the DataRow class meaning that you will only need to call the EndEdit method on the InsertionRow to commit the row.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;</description></item><item><title>How do I restrict the length and case of a cell's data?</title><link>http://xceed.com/CS/forums/thread/28241.aspx</link><pubDate>Thu, 09 Oct 2008 17:41:37 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28241</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28241.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28241</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;You can use the default TextEditor, which uses the WinTextBox underneath.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;[C#]&lt;/b&gt;&lt;br/&gt;gridControl1.Columns[ 0 ].CellEditorManager = new TextEditor( "&amp;gt;&amp;&amp;&amp;&amp;" );&lt;br/&gt;&lt;br/&gt;You can also assign the viewer in the same way :&lt;br/&gt;&lt;br/&gt;gridControl1.Columns[ 0 ].CellViewerManager = new TextViewer( "&amp;gt;&amp;&amp;&amp;&amp;" );&lt;br/&gt;&lt;br/&gt;&lt;b&gt;[VB.NET]&lt;/b&gt;&lt;br/&gt;gridControl1.Columns( 0 ).CellEditorManager = new TextEditor( "&amp;gt;&amp;&amp;&amp;&amp;" )&lt;br/&gt;&lt;br/&gt;You can also assign the viewer in the same way :&lt;br/&gt;&lt;br/&gt;gridControl1.Columns( 0 ).CellViewerManager = new TextViewer( "&amp;gt;&amp;&amp;&amp;&amp;" )&lt;/span&gt;&lt;/body&gt;</description></item><item><title>How do I change the format of the text displayed in a cell?</title><link>http://xceed.com/CS/forums/thread/28233.aspx</link><pubDate>Thu, 09 Oct 2008 17:40:47 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28233</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28233.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28233</wfw:commentRss><description>&lt;span&gt;You can change the format of text displayed in a cell (or in an entire column) by creating a class that implements the IFormatProvider interface and assigning your custom class to the FormatProvider and FormatSpecifier properties of the desired cell or column.&lt;br/&gt;&lt;br/&gt;For more information regarding the implementation of the IFormatProvider interface, go to the "Customizing Format Strings" topic of the .NET&lt;/span&gt;</description></item><item><title>How do I create my own stylesheet?</title><link>http://xceed.com/CS/forums/thread/28239.aspx</link><pubDate>Thu, 09 Oct 2008 17:40:00 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28239</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28239.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28239</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;You can create your own stylesheets by using StyleSheet class.&lt;br/&gt;&lt;br/&gt;Just create an instance of the class and set the properties to the colors, etc.. you want. Once that is done, call the grid's ApplyStylesheet method with your stylesheet.&lt;br/&gt;&lt;br/&gt;Dim styleSheet As New StyleSheet()&lt;br/&gt;&lt;br/&gt;styleSheet.DataRows.Add(New VisualGridElementStyle())&lt;br/&gt;styleSheet.DataRows.Add(New VisualGridElementStyle())&lt;br/&gt;&lt;br/&gt;styleSheet.DataRows(0).BackColor = Color.Pink&lt;br/&gt;styleSheet.DataRows(1).BackColor = Color.Green&lt;br/&gt;&lt;br/&gt;' Don't forget to call the grid's ApplyStyleSheet&lt;br/&gt;' method so that the new styles are reflected&lt;br/&gt;' in the grid.&lt;br/&gt;GridControl1.ApplyStyleSheet(styleSheet)&lt;br/&gt;&lt;br/&gt;For more information, you can refer to the&lt;b&gt;DataRowTemplate Styles&lt;/b&gt;topic in the help file.&lt;/span&gt;&lt;/body&gt;</description></item><item><title>Alternating the color of datarows.</title><link>http://xceed.com/CS/forums/thread/28238.aspx</link><pubDate>Thu, 09 Oct 2008 17:39:38 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28238</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28238.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28238</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;You can use the DataRowTemplateStyles property or a StyleSheet to alternate the appearance of the DataRows.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Using the DataRowTemplatesStyles&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.DataRowTemplateStyles.Add( new VisualGridElementStyle() );&lt;br/&gt;&lt;br/&gt;gridControl1.DataRowTemplateStyles.Add( new VisualGridElementStyle() );&lt;br/&gt;&lt;br/&gt;gridControl1.DataRowTemplateStyles[ 0 ].BackColor = Color.Blue;&lt;br/&gt;&lt;br/&gt;gridControl1.DataRowTemplateStyles[ 1 ].BackColor = Color.Red;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Using the StyleSheet&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Dim styleSheet As New StyleSheet()&lt;br/&gt;&lt;br/&gt;styleSheet.DataRows.Add(New VisualGridElementStyle())&lt;br/&gt;styleSheet.DataRows.Add(New VisualGridElementStyle())&lt;br/&gt;&lt;br/&gt;styleSheet.DataRows(0).BackColor = Color.Pink&lt;br/&gt;styleSheet.DataRows(1).BackColor = Color.Green&lt;br/&gt;&lt;br/&gt;' Don't forget to call the grid's ApplyStyleSheet&lt;br/&gt;' method so that the new styles are reflected&lt;br/&gt;' in the grid.&lt;br/&gt;GridControl1.ApplyStyleSheet(styleSheet)&lt;br/&gt;&lt;br/&gt;For more information, you can refer to the&lt;b&gt;DataRowTemplate Styles&lt;/b&gt;topic in the help file&lt;/span&gt;&lt;/body&gt;</description></item><item><title>Drag and drop operations onto the grid do not work.</title><link>http://xceed.com/CS/forums/thread/28240.aspx</link><pubDate>Thu, 09 Oct 2008 17:39:15 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28240</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28240.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28240</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;In order for the DragXYZ events to be raised when the item is dragged over a cell, each cell's AllowDrop property must be set to true.&lt;br/&gt;&lt;br/&gt;If you only want to insert new rows when the item is dropped into the sections of the grid that do not contain rows, then you only need to set the grid's AllowDrop property to true.&lt;br/&gt;&lt;br/&gt;If you want to be able to drop items anywhere on the grid, then each cell's AllowDrop&lt;b&gt;and&lt;/b&gt;the grid's AllowDrop property must be set to true.&lt;/span&gt;&lt;/body&gt;</description></item><item><title>How to synchronize the scrolling of two grids</title><link>http://xceed.com/CS/forums/thread/28268.aspx</link><pubDate>Thu, 09 Oct 2008 17:30:08 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28268</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28268.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28268</wfw:commentRss><description>&lt;body&gt;You can synchronize the scrolling of two grid's using the FirstVisibleRowChanged and FirstVisibleColumnChanged events.&lt;br/&gt;&lt;br/&gt;The following example demonstrates how to scroll the second grid ( gridControl2 ) in sync with the first grid (gridControl1). If you want to sync the scrolling of the first grid when the second grid is scrolled, then you will also need to handle the FirstVisibleRowChanged and FirstVisibleColumnChanged events of the second grid.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;AddHandler GridControl1.FirstVisibleRowChanged, AddressOf Me.GridControl1_FirstVisibleRowChanged&lt;br/&gt;AddHandler GridControl1.FirstVisibleColumnChanged, AddressOf Me.GridControl1_FirstVisibleColumnChanged &lt;br/&gt;&lt;br/&gt;Private Sub GridControl1_FirstVisibleRowChanged(ByVal sender As Object, ByVal e As System.EventArgs)&lt;br/&gt;  GridControl2.FirstVisibleRow = gridControl2.DataRows( CType( GridControl1.FirstVisibleRow, Xceed.Grid.DataRow ).Index)&lt;br/&gt;End Sub &lt;br/&gt;&lt;br/&gt;Private Sub GridControl1_FirstVisibleColumnChanged(ByVal sender As Object, ByVal e As System.EventArgs)&lt;br/&gt;  If Not GridControl1.FirstVisibleColumn Is Nothing And Not GridControl2.FirstVisibleColumn Is Nothing Then&lt;br/&gt;    GridControl2.FirstVisibleColumn = GridControl2.Columns( GridControl1.FirstVisibleColumn.Index )&lt;br/&gt;  End If&lt;br/&gt;End Sub&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.FirstVisibleRowChanged += new EventHandler( this.gridControl1_FirstVisibleRowChanged );&lt;br/&gt;gridControl1.FirstVisibleColumnChanged += new EventHandler( this.gridControl1_FirstVisibleColumnChanged ); &lt;br/&gt;&lt;br/&gt;private void gridControl1_FirstVisibleRowChanged(object sender, System.EventArgs e)&lt;br/&gt;{&lt;br/&gt;  gridControl2.FirstVisibleRow = gridControl2.DataRows[ ( ( Xceed.Grid.DataRow )ridControl1.FirstVisibleRow ).Index ];&lt;br/&gt;} &lt;br/&gt;&lt;br/&gt;private void gridControl1_FirstVisibleColumnChanged(object sender, System.EventArgs e)&lt;br/&gt;{&lt;br/&gt;  if( gridControl1.FirstVisibleColumn != null &amp;&amp; gridControl2.FirstVisibleColumn != null )&lt;br/&gt;    gridControl2.FirstVisibleColumn = gridControl2.Columns[ gridControl1.FirstVisibleColumn.Index ];                &lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How to fix (freeze) columns</title><link>http://xceed.com/CS/forums/thread/28246.aspx</link><pubDate>Thu, 09 Oct 2008 17:27:07 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28246</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28246.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28246</wfw:commentRss><description>&lt;body&gt;The following code demonstrates how to fix 2 columns programmatically. &lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Dim grid As New GridControl()&lt;br/&gt;&lt;br/&gt;grid.Dock = DockStyle.Fill&lt;br/&gt;Me.Controls.Add( grid ) &lt;br/&gt;&lt;br/&gt;grid.DataSource = dataSet11&lt;br/&gt;grid.DataMember = "Orders" &lt;br/&gt;&lt;br/&gt;grid.Columns( "OrderID" ).Fixed = True&lt;br/&gt;grid.Columns( "EmployeeID" ).Fixed = True&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;GridControl grid = new GridControl();&lt;br/&gt;&lt;br/&gt;grid.Dock = DockStyle.Fill;&lt;br/&gt;this.Controls.Add( grid ); &lt;br/&gt;&lt;br/&gt;grid.DataSource = dataSet11;&lt;br/&gt;grid.DataMember = "Orders"; &lt;br/&gt;&lt;br/&gt;grid.Columns[ "OrderID" ].Fixed = true;&lt;br/&gt;grid.Columns[ "EmployeeID" ].Fixed = true;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;&lt;/body&gt;</description></item><item><title>How to select a row(s) in code</title><link>http://xceed.com/CS/forums/thread/28266.aspx</link><pubDate>Thu, 09 Oct 2008 17:26:39 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28266</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28266.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28266</wfw:commentRss><description>&lt;body&gt;To select one or more rows in code, you can add (or remove) rows from grid's SelectedRows property. Any row can be selected and added to the grid's collection of SelectedRows as long as its CanBeSelected property is set to true. Keep in mind that the current row is not the same thing as the selected row and that the current row might not be part of the grid's selected rows. &lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;GridControl1.SelectedRows.Add( GridControl1.DataRows( 0 ) ) &lt;br/&gt;&lt;br/&gt;Dim row As New TextRow( "This is my text row" ) &lt;br/&gt;&lt;br/&gt;row.CanBeSelected = True &lt;br/&gt;&lt;br/&gt;GridControl1.FixedFooterRows.Add( row )&lt;br/&gt;GridControl1.SelectedRows.Add( row )&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.SelectedRows.Add( gridControl1.DataRows[ 0 ] ); &lt;br/&gt;&lt;br/&gt;TextRow row = new TextRow( "This is my text row" ); &lt;br/&gt;&lt;br/&gt;row.CanBeSelected = true; &lt;br/&gt;&lt;br/&gt;gridControl1.FixedFooterRows.Add( row );&lt;br/&gt;gridControl1.SelectedRows.Add( row );&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span&gt;
&lt;p&gt; &lt;/p&gt;&lt;/span&gt;&lt;/body&gt;</description></item><item><title>How to change the height of rows</title><link>http://xceed.com/CS/forums/thread/28254.aspx</link><pubDate>Thu, 09 Oct 2008 17:19:00 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28254</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28254.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28254</wfw:commentRss><description>&lt;body&gt;&lt;p&gt;The height of each row in the grid can be changed in various ways: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can change the height of each row individually using the row's Height property. 
&lt;/li&gt;&lt;li&gt;You can change the height of each DataRow using the Height property of the grid's DataRowTemplate. 
&lt;/li&gt;&lt;li&gt;You can retrieve the height necessary to display all the content of the row or just one line of content using the GetFittedHeight method. 
&lt;/li&gt;&lt;li&gt;You can adjust the height of a row to fit its editors using the FitHeightToEditors property. 
&lt;/li&gt;&lt;li&gt;You can change the way the height of the row is adjusted using the AutoHeightMode property. &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;If you want to change the height of a specific row in the grid to a predetermined value, you simply need to set that row's Height property. If you want to set the height of all the DataRows in the grid, you can set the Height property of the DataRowTemplate to the desired value. The same goes with the AutoHeightMode and FitHeightToEditors property as well as the GetFittedHeight method.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;To change the height of a specific row (using the various methods mentioned above) you can use the following code:&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;GridControl1.FixedHeaderRows[ 0 ].Height = 16&lt;br/&gt;GridControl1.FixedFooterRows[ 1 ].AutoHeightMode = AutoHeightMode.AllContent&lt;br/&gt;&lt;br/&gt;GridControl1.Groups[ 0 ].HeaderRows[ 0 ].Height = gridControl1.FixedHeaderRows[ 0 ].GetFittedHeight( AutoHeightMode.AllContent )&lt;br/&gt;GridControl1.DataRows[ 0 ].FitHeightToEditors = True   &lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;gridControl1.FixedHeaderRows[ 0 ].Height = 16;&lt;br/&gt;gridControl1.FixedFooterRows[ 1 ].AutoHeightMode = AutoHeightMode.AllContent;&lt;br/&gt;&lt;br/&gt;gridControl1.Groups[ 0 ].HeaderRows[ 0 ].Height = gridControl1.FixedHeaderRows[ 0 ].GetFittedHeight( AutoHeightMode.AllContent );&lt;br/&gt;gridControl1.DataRows[ 0 ].FitHeightToEditors = true;&lt;/font&gt;  &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;To change the height of every DataRow in the grid, the most efficient way is to use the DataRowTemplate. Of course you can use any one of the properties or methods mentioned above! For example:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;GridControl1.DataRowTemplate.Height = 16&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.DataRowTemplate.Height = 16;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;If the DataRowTemplate changes while the DataSource property is set, the changes will not automatically be reflected in the grid. In order for the modifications to be applied, the data source must be reassigned to the DataSource property. If you want to set various properties of the DataRowTemplate when you populate your grid (set the DataSource property), then this will need to be done between calls to the grid's BeginInit and EndInit methods.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;GridControl1.BeginInit()&lt;br/&gt;GridControl1.DataSource = DataSet11.Tables( 0 )&lt;br/&gt;GridControl1.DataRowTemplate.FitHeightToEditors = True&lt;br/&gt;GridControl1.EndInit()&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;gridControl1.BeginInit();&lt;br/&gt;gridControl1.DataSource = dataSet11.Tables[ 0 ];&lt;br/&gt;gridControl1.DataRowTemplate.FitHeightToEditors = true;&lt;br/&gt;gridControl1.EndInit();&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;&lt;/body&gt;</description></item><item><title>How to copy and paste rows to and from a grid</title><link>http://xceed.com/CS/forums/thread/28258.aspx</link><pubDate>Thu, 09 Oct 2008 17:15:57 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28258</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28258.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28258</wfw:commentRss><description>&lt;body&gt;The grid does not provide built-in functionality to copy and paste or drag and drop rows to and from another application such as Excel, however it is quite easy for you to implement (a sample is provided below). In order to copy rows from a grid you need to: 
&lt;ol&gt;
&lt;li&gt;Handle the keyboard shortcuts (Ctrl-C, Ctrl-V, etc.). 
&lt;/li&gt;&lt;li&gt;You need to create a DataObject that will contain a compatible DataFormat. For example plain text, CSV or HTML data formats are all supported by Excel. 
&lt;/li&gt;&lt;li&gt;Once you have your DataObject, you can place it in the ClipBoard using the ClipBoard class's SetDataObject method. &lt;/li&gt;&lt;/ol&gt;You can then paste your result into Excel or any other application that supports the data formats you provided. In order to paste rows into a grid you need to: &lt;br/&gt;&lt;br/&gt;
&lt;ol&gt;
&lt;li&gt;Retrieve the DataObject in the ClipBoard using the DataObject's GetData method. You can decide which data format you want to use. The easiest one to use with the grid is plain text (DataFormats.PlainText). 
&lt;/li&gt;&lt;li&gt;Once you have your DataObject, you will need to parse it and retrieve the data. 
&lt;/li&gt;&lt;li&gt;Once you have retrieved your data, add the new rows to the grid.&lt;/li&gt;&lt;/ol&gt;
&lt;/body&gt;</description></item><item><title>How to drag and drop rows to and from a grid</title><link>http://xceed.com/CS/forums/thread/28259.aspx</link><pubDate>Thu, 09 Oct 2008 17:15:45 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28259</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28259.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28259</wfw:commentRss><description>&lt;body&gt;The grid does not provide built-in functionality to copy and paste or drag and drop rows to and from another application such as Excel, however it is quite easy for you to implement (a sample is provided below). In order to drag rows from a grid you need to: &lt;br/&gt;&lt;br/&gt;
&lt;ol&gt;
&lt;li&gt;Handle each cell's MouseDown, MouseUp and MouseMove events. 
&lt;/li&gt;&lt;li&gt;In the MouseMove event, once you have determined that the mouse has moved while the mouse button was pressed, you need to create a DataObject that will contain a compatible DataFormat. For example plain text, CSV or HTML data formats are all supported by Excel. 
&lt;/li&gt;&lt;li&gt;Once you have your DataObject, call the grid's DoDragDrop method. &lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;You can then drag your rows into Excel or any other application that supports the data formats you provided. In order to drop rows onto a grid you need to: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Handle each cell's DragOver and DragDrop events. 
&lt;/li&gt;&lt;li&gt;You must set the AllowDrop property of each cell as well as the AllowDrop property of the grid to true. 
&lt;/li&gt;&lt;li&gt;Retrieve the DataObject being dropped using the DataObject's GetData method. You can decide which data format you want to use. The easiest one to use with the grid is plain text (DataFormats.PlainText). 
&lt;/li&gt;&lt;li&gt;Once you have your DataObject, you will need to parse it and retrieve the data. 
&lt;/li&gt;&lt;li&gt;Once you have retrieved your data, add the new rows to the grid.&lt;/li&gt;&lt;/ol&gt;
&lt;/body&gt;</description></item><item><title>How to display a description rather than an ID</title><link>http://xceed.com/CS/forums/thread/28248.aspx</link><pubDate>Thu, 09 Oct 2008 17:15:34 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28248</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28248.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28248</wfw:commentRss><description>&lt;body&gt;In order to display a description rather than an ID, you will need to use the ComboBoxViewer and the ComboBoxEditor. This is done by binding the ComboBoxViewer and ComboBoxEditor to the table that contains the ID's descriptions and to set its DisplayFormat and ValueMember properties.&lt;br/&gt;&lt;br/&gt;The following example demonstrates how to display a description (rather than an ID) using the ComboBoxViewer and ComboBoxEditor.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Dim viewer As New Xceed.Grid.Viewers.ComboBoxViewer( northwindDataSet, "Products", "ProductID", "%ProductName%" )&lt;br/&gt;Dim editor As New Xceed.Grid.Editors.ComboBoxEditor( northwindDataSet, "Products", "ProductID", "%ProductName%" ) &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;GridControl1.Columns( "ProductID" ).CellEditorManager = editor&lt;br/&gt;GridControl1.Columns( "ProductID" ).CellViewerManager = viewer&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Xceed.Grid.Viewers.ComboBoxViewer viewer = new Xceed.Grid.Viewers.ComboBoxViewer( northwindDataSet, "Products", "ProductID", "%ProductName%" );&lt;br/&gt;Xceed.Grid.Editors.ComboBoxEditor editor = new Xceed.Grid.Editors.ComboBoxEditor( northwindDataSet, "Products", "ProductID", "%ProductName%" ); &lt;br/&gt;&lt;br/&gt;gridControl1.Columns[ "ProductID" ].CellEditorManager = editor;&lt;br/&gt;gridControl1.Columns[ "ProductID" ].CellViewerManager = viewer;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How to delete a row when the Delete key is pressed</title><link>http://xceed.com/CS/forums/thread/28260.aspx</link><pubDate>Thu, 09 Oct 2008 17:15:05 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28260</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28260.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28260</wfw:commentRss><description>&lt;body&gt;Any row can be deleted from the grid using the row's Remove method, however rows will not be automatically deleted when the delete key is pressed. In order to delete rows from the grid when the delete key is pressed, you need to handle the KeyDown event of the DataRowTemplate (for each DataRow in the grid) and the KeyDown event of any other row that you want to allow your end-users to delete. In the event handler, you can then check if the key that was pressed is the delete key and then remove the row from the grid.&lt;br/&gt;&lt;br/&gt;In the following example, we check to see if it was the delete key that was pressed. If it was, we check to make sure that the row is a DataRow and then we delete the row. The validation to check if the row is a DataRow is not necessary; Any type of row can be deleted using the Remove method.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;If e.KeyData = Keys.Delete Then&lt;br/&gt;  If TypeOf sender Is Xceed.Grid.DataRow Then&lt;br/&gt;    CType(sender, Xceed.Grid.DataRow).Remove()&lt;br/&gt;  End If&lt;br/&gt;End If&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;if( e.KeyData == Keys.Delete )&lt;br/&gt;{&lt;br/&gt;  if( sender is Xceed.Grid.DataRow )&lt;br/&gt;  {&lt;br/&gt;    ( ( Xceed.Grid.DataRow )sender ).Remove();&lt;br/&gt;  }&lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How to print page numbers</title><link>http://xceed.com/CS/forums/thread/28263.aspx</link><pubDate>Thu, 09 Oct 2008 17:12:28 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28263</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28263.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28263</wfw:commentRss><description>&lt;body&gt;By default, the grid is not printed with page numbers. In order to include page numbers when printing, you will need to create a class that derives from the GridPrintDocument class and override the OnPrintPage method (to be able to custom print the header or footer in this case, or other items if desired).&lt;br/&gt;&lt;br/&gt;The following example demonstrates the minimum implementation required in order to print page numbers when printing the grid.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Imports Xceed.Grid &lt;br/&gt;&lt;br/&gt;Public Class CustomGridPrintDocument&lt;br/&gt;  Inherits GridPrintDocument &lt;br/&gt;&lt;br/&gt;Private m_grid As GridControl &lt;br/&gt;&lt;br/&gt;Public Sub New(ByVal grid As GridControl)&lt;br/&gt;  MyBase.New(grid)&lt;br/&gt;  m_grid = grid&lt;br/&gt;End Sub &lt;br/&gt;&lt;br/&gt;Protected Overrides Sub OnPrintPage(ByVal e As System.Drawing.Printing.PrintPageEventArgs)&lt;br/&gt;      Dim gc As GraphicsContainer = e.Graphics.BeginContainer() &lt;br/&gt;&lt;br/&gt;      Try &lt;br/&gt;         MyBase.OnPrintPage( e )&lt;br/&gt;      Finally&lt;br/&gt;         e.Graphics.EndContainer(gc)&lt;br/&gt;      End Try &lt;br/&gt;&lt;br/&gt;      ' Print added text boxes (header and footers)&lt;br/&gt;      If Not e.Cancel And Me.IsCurrentPrintingPageSelected Then &lt;br/&gt;        Dim brush As New System.Drawing.SolidBrush(Color.Black)&lt;br/&gt;&lt;br/&gt;        e.Graphics.DrawString("Page number " +  Me.CurrentPageNumber.ToString(), m_grid.Font, brush, New RectangleF(e.MarginBounds.X, e.MarginBounds.Y - 20, e.MarginBounds.Width, e.MarginBounds.Height))&lt;br/&gt;        brush.Dispose()&lt;br/&gt;      End If&lt;br/&gt;End Sub&lt;br/&gt;End Class&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;using Xceed.Grid;&lt;br/&gt;&lt;br/&gt;public class CustomGridPrintDocument : GridPrintDocument&lt;br/&gt;{&lt;br/&gt;  private GridControl m_grid;&lt;br/&gt;&lt;br/&gt;  public CustomGridPrintDocument( GridControl grid )&lt;br/&gt;    :base( grid )&lt;br/&gt;  {&lt;br/&gt;    m_grid = grid;&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;  protected override void OnPrintPage( System.Drawing.Printing.PrintPageEventArgs e )&lt;br/&gt;  {&lt;br/&gt;    GraphicsContainer gc = e.Graphics.BeginContainer();     &lt;br/&gt;&lt;br/&gt;    try&lt;br/&gt;    {&lt;br/&gt;      base.OnPrintPage( e );&lt;br/&gt;    }&lt;br/&gt;    finally      &lt;br/&gt;    {         &lt;br/&gt;      e.Graphics.EndContainer( gc );      &lt;br/&gt;    }      &lt;br/&gt;&lt;br/&gt;    // Print page number      &lt;br/&gt;    if( !e.Cancel )&lt;br/&gt;    {&lt;br/&gt;      using( System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush( Color.Black ) )&lt;br/&gt;      {&lt;br/&gt;        e.Graphics.DrawString("Page number " + this.CurrentPageNumber.ToString(), m_grid.Font, brush, new RectangleF( e.MarginBounds.X, e.MarginBounds.Y - 20, e.MarginBounds.Width, e.MarginBounds.Height ) );&lt;br/&gt;      }&lt;br/&gt;    }&lt;br/&gt;  }&lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;To use the custom GridPrintDocument, the following code must be used:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Dim printDocument As New CustomGridPrintDocument(GridControl1)&lt;br/&gt;printDocument.Print()&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;CustomGridPrintDocument printDocument = new CustomGridPrintDocument( gridControl1 ); &lt;br/&gt;printDocument.Print();&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;Keep in mind that if you call the grid's Print or PrintPreview methods, the grid will always be printed with the default print document.&lt;/body&gt;</description></item><item><title>How to print a range of pages</title><link>http://xceed.com/CS/forums/thread/28262.aspx</link><pubDate>Thu, 09 Oct 2008 17:12:16 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28262</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28262.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28262</wfw:commentRss><description>&lt;body&gt;If you use the grid's Print method, the entire grid will be printed unless you create a GridPrintDocument object, set its properties and call its Print method instead. By setting the GridPrintDocument's PrinterSettings.FromPage and .ToPage to define the range of pages to print. If you want to decide on a page-by-page basis, you must handle the QueryPrintPage event where you can set the IsPageSelected boolean to decide if that page should be printed.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Dim printDocument As New GridPrintDocument(GridControl1)&lt;br/&gt;&lt;br/&gt;printDocument.PrinterSettings.PrintRange = Drawing.Printing.PrintRange.SomePages&lt;br/&gt;printDocument.PrinterSettings.FromPage = 2&lt;br/&gt;printDocument.PrinterSettings.ToPage = 5&lt;br/&gt;&lt;br/&gt;printDocument.Print()   &lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;GridPrintDocument printDocument = New GridPrintDocument(GridControl1); &lt;br/&gt;&lt;br/&gt;printDocument.PrinterSettings.PrintRange = Drawing.Printing.PrintRange.SomePages;&lt;br/&gt;printDocument.PrinterSettings.FromPage = 2;&lt;br/&gt;printDocument.PrinterSettings.ToPage = 5; &lt;br/&gt;&lt;br/&gt;printDocument.Print();&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How to print the grid in landscape orientation</title><link>http://xceed.com/CS/forums/thread/28264.aspx</link><pubDate>Thu, 09 Oct 2008 17:12:05 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28264</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28264.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28264</wfw:commentRss><description>&lt;body&gt;By default, the grid will always be printed in portrait orientation. In order to print the grid in landscape orientation, you need to create a new instance of the GridPrintDocument class and set the DefaultPageSettings.Landscape property to true.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Dim print As New GridPrintDocument(GridControl1)&lt;br/&gt;&lt;br/&gt;print.DefaultPageSettings.Landscape = True&lt;br/&gt;print.Print()&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;GridPrintDocument print = new GridPrintDocument( gridControl1 );&lt;br/&gt;&lt;br/&gt;print.DefaultPageSettings.Landscape = true;&lt;br/&gt;print.Print();&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;Keep in mind that if you call the grid's Print or PrintPreview methods, the grid will always be printed with the default print document (and therefore in portrait orientation).&lt;/body&gt;</description></item><item><title>How to select the printer and page settings</title><link>http://xceed.com/CS/forums/thread/28265.aspx</link><pubDate>Thu, 09 Oct 2008 17:11:55 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28265</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28265.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28265</wfw:commentRss><description>&lt;body&gt;In order to allow you users to select the printer and page settings you must use the PageSetupDialog component provided by Microsoft and create a new instance of the GridPrintDocument class. The following example demonstrates how to allow your users to select the printer and page settings when printing the grid. It assumes that you have a PageSetupDialog component on your form.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;' Allow the user to select the page settings and the printer&lt;br/&gt;Dim oPrintDoc As New Xceed.Grid.GridPrintDocument(GridControl1) &lt;br/&gt;&lt;br/&gt;PageSetupDialog1.PageSettings = oPrintDoc.DefaultPageSettings &lt;br/&gt;&lt;br/&gt;If PageSetupDialog1.ShowDialog() = DialogResult.OK Then&lt;br/&gt;    oPrintDoc.DefaultPageSettings = PageSetupDialog1.PageSettings &lt;br/&gt;&lt;br/&gt;    Dim x As New PrintDialog()&lt;br/&gt;    x.Document = PageSetupDialog1.Document &lt;br/&gt;&lt;br/&gt;    If x.ShowDialog() = DialogResult.OK Then&lt;br/&gt;         oPrintDoc.PrinterSettings = x.PrinterSettings&lt;br/&gt;         oPrintDoc.Print()&lt;br/&gt;    End If&lt;br/&gt;End If &lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;// Allow the user to select the page settings and the printer&lt;br/&gt;Xceed.Grid.GridPrintDocument oPrintDoc = new Xceed.Grid.GridPrintDocument( gridControl1 ); &lt;br/&gt;&lt;br/&gt;pageSetupDialog1.PageSettings = oPrintDoc.DefaultPageSettings; &lt;br/&gt;&lt;br/&gt;if( pageSetupDialog1.ShowDialog() == DialogResult.OK )&lt;br/&gt;{&lt;br/&gt;  oPrintDoc.DefaultPageSettings = PageSetupDialog1.PageSettings;&lt;br/&gt;&lt;br/&gt;  PrintDialog x = new PrintDialog();&lt;br/&gt;  x.Document = pageSetupDialog1.Document;&lt;br/&gt;&lt;br/&gt;  if( x.ShowDialog() == DialogResult.OK )&lt;br/&gt;  {&lt;br/&gt;    oPrintDoc.PrinterSettings = x.PrinterSettings;&lt;br/&gt;    oPrintDoc.Print();&lt;br/&gt;  }&lt;br/&gt;}    &lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;Keep in mind that if you call the grid's Print or PrintPreview methods, the grid will always be printed with the default print document.&lt;/body&gt;</description></item><item><title>How to change the behavior of the Enter key</title><link>http://xceed.com/CS/forums/thread/28261.aspx</link><pubDate>Thu, 09 Oct 2008 17:03:00 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28261</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28261.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28261</wfw:commentRss><description>&lt;body&gt;By default, pressing Enter on a cell or row that is not being edited, will do nothing while pressing Enter on a cell or row that is being edited will commit the modifications. In order to change the default behavior of the Enter key, the grid's ProcessCmdKey method must be overridden.&lt;br/&gt;&lt;br/&gt;The following examples demonstrates how to change the behavior of the Enter key so that when enter is pressed the focus will go to the next cell:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Protected Overrides Function ProcessCmdKey ( ByRef msg As Message, ByVal keyData As Keys ) As Boolean&lt;br/&gt;&lt;br/&gt;  ' ProcessCmdKey is only used for the Enter and the Escape keys.&lt;br/&gt;  If keyData = Keys.Enter Then&lt;br/&gt;    ' Move to the next cell on the right when the enter key is pressed&lt;br/&gt;    Me.MoveCurrentCell( HorizontalDirection.Right )&lt;br/&gt;    Me.CurrentCell.BringIntoView()&lt;br/&gt;    Return True&lt;br/&gt;  End If&lt;br/&gt;&lt;br/&gt;  Return MyBase.ProcessCmdKey( msg,keyData )&lt;br/&gt;End Function&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;protected override System.Boolean ProcessCmdKey ( ref Message msg , Keys keyData)&lt;br/&gt;{&lt;br/&gt;  // ProcessCmdKey is only used for the Enter and the Escape keys.&lt;br/&gt;  if( keyData == Keys.Enter )&lt;br/&gt;  {&lt;br/&gt;    // Move to the next cell on the right when the enter key is pressed&lt;br/&gt;    this.MoveCurrentCell( HorizontalDirection.Right );&lt;br/&gt;    this.CurrentCell.BringIntoView();&lt;br/&gt;&lt;br/&gt;    return true;&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;  return base.ProcessCmdKey( ref msg,keyData );&lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How to stay in edit mode while navigating through the grid</title><link>http://xceed.com/CS/forums/thread/28257.aspx</link><pubDate>Thu, 09 Oct 2008 15:17:23 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28257</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28257.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28257</wfw:commentRss><description>&lt;body&gt;By default, when the Tab key is pressed and a cell is not being edited, the next control on the form will gain focus. If a cell is being edited, the cell that is being edited will exit edit mode and the next cell will gain focus. If you want to navigate through the grid using the Tab and arrow keys, but remain in edit mode, you will need to handle the grid's KeyPress event to handle the Tab and arrow keys and call the appropriate cell's EnterEdit method.&lt;br/&gt;&lt;br/&gt;Sample applications that demonstrate how to navigate through the grid in edit mode are available for download (see attachments).&lt;/body&gt;</description></item><item><title>How to prevent a cell from leaving edit mode</title><link>http://xceed.com/CS/forums/thread/28256.aspx</link><pubDate>Thu, 09 Oct 2008 15:15:29 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28256</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28256.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28256</wfw:commentRss><description>&lt;body&gt;To prevent the cell from leaving edit mode, you will need to handle ValidationError event of each DataCell in the grid and set the CancelEdit event argument to false.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;gridControl1.BeginInit() &lt;br/&gt;&lt;br/&gt;gridControl1.DataSource = dataSet11&lt;br/&gt;gridControl1.DataMember = "Orders" &lt;br/&gt;&lt;br/&gt;Dim cell As DataCell &lt;br/&gt;&lt;br/&gt;For Each cell in gridControl1.DataRowTemplate.Cells&lt;br/&gt;  AddHandler cell.ValidationError, AddressOf Me.cell_ValidationError&lt;br/&gt;Next cell &lt;br/&gt;&lt;br/&gt;gridControl1.EndInit() &lt;br/&gt;&lt;br/&gt;Private Sub cell_ValidationError( ByVal sender As Object, ByVal e As CellValidationErrorEventArgs )&lt;br/&gt;  ' code to prevent the cell from exiting edit mode&lt;br/&gt;  e.CancelEdit = False&lt;br/&gt;End Sub&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.BeginInit(); &lt;br/&gt;&lt;br/&gt;gridControl1.DataSource = dataSet11;&lt;br/&gt;gridControl1.DataMember = "Orders"; &lt;br/&gt;&lt;br/&gt;foreach( DataCell cell in gridControl1.DataRowTemplate.Cells )&lt;br/&gt;{&lt;br/&gt;  cell.ValidationError += new CellValidationErrorEventHandler( this.cell_ValidationError );&lt;br/&gt;} &lt;br/&gt;&lt;br/&gt;gridControl1.EndInit(); &lt;br/&gt;&lt;br/&gt;private void cell_ValidationError( object sender, CellValidationErrorEventArgs e )&lt;br/&gt;{&lt;br/&gt;  // code to prevent the cell from exiting edit mode&lt;br/&gt;  e.CancelEdit = false;&lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How to change the width of columns</title><link>http://xceed.com/CS/forums/thread/28255.aspx</link><pubDate>Thu, 09 Oct 2008 15:13:47 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28255</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28255.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28255</wfw:commentRss><description>&lt;body&gt;The width of a column can be changed using either the Width property or the GetFittedWidth method. You can also retrieve the value necessary to display the entire contents of a cell using its GetFittedWidth method.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;GridControl1.Columns( "ShipCountry" ).Width = 40&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.Columns[ "ShipCountry" ].Width = 40;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;If you want to change the width of each column in the grid, you will need to do a "for each" to iterate through each one of the grid's columns. A common use would be to set the width of each column to its fitted width (the width necessary to display the entire content of the column) using the GetFittedWidth method. For example: &lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Dim column As Column &lt;br/&gt;&lt;br/&gt;For Each column in GridControl1.Columns&lt;br/&gt;  column.Width = column.GetFittedWidth()&lt;br/&gt;Next column&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;foreach( Column column in gridControl1.Columns )&lt;br/&gt;{&lt;br/&gt;  column.Width = column.GetFittedWidth();&lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;To make sure that the width of the columns stays to their fitted widths even if, for example, the length of one of the column's cell's value changes, you will need to call the GetFittedWidth method in each cell's ValueChanged event. For example:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Dim cell As DataCell &lt;br/&gt;&lt;br/&gt;For Each cell in GridControl1.DataRowTemplate.Cells&lt;br/&gt;  AddHandler cell.ValueChanged, AddressOf Me.cell_ValueChanged&lt;br/&gt;Next cell &lt;br/&gt;&lt;br/&gt;Private Sub cell_ValueChanged( ByVal sender As Object, ByVal e As EventArgs )&lt;br/&gt;  Dim parentColumn As Column = CType( sender, DataCell ).ParentColum&lt;br/&gt;  parentColumn.Width = parentColumn.GetFittedWidth()&lt;br/&gt;End Sub&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;foreach( DataCell cell in gridControl1.DataRowTemplate.Cells )&lt;br/&gt;{&lt;br/&gt;  cell.ValueChanged += new EventHandler( this.cell_ValueChanged );&lt;br/&gt;} &lt;br/&gt;&lt;br/&gt;private void cell_ValueChanged( object sender, EventArgs e )&lt;br/&gt;{&lt;br/&gt;  Column parentColumn = ( ( DataCell )sender ).ParentColumn;&lt;br/&gt;  parentColumn.Width = parentColumn.GetFittedWidth();       &lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;If the DataRowTemplate changes while the DataSource property is set, the changes will not automatically be reflected in the grid. In order for the modifications to be applied, the data source must be reassigned to the DataSource property. If you want to set various properties of the DataRowTemplate when you populate your grid (set the DataSource property), then this will need to be done between calls to the grid's BeginInit and EndInit methods. If you are providing data manually, then you can set the values of the DataRowTemplate after you have added columns to the grid. &lt;br/&gt;&lt;/body&gt;</description></item><item><title>How to create multiple column headers</title><link>http://xceed.com/CS/forums/thread/28251.aspx</link><pubDate>Thu, 09 Oct 2008 15:13:34 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28251</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28251.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28251</wfw:commentRss><description>&lt;body&gt;The grid does support having more than one ColumnManagerRow in its headers, however it does not support (directly) having grouped column headers as demonstrated in the image below: &lt;br/&gt;&lt;br/&gt;&lt;img src="http://doc.xcd/XceedGrid/Sources/ColumnHeaders.gif"/&gt;&lt;br/&gt;&lt;br/&gt;In order to simulate column grouping you must create a custom row (that derives from the Row class and not from the ColumnManagerRow class) and use it in your grid.&lt;br/&gt;&lt;br/&gt;The following code (class) demonstrates the minimum implementation required to simulate column grouping:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Imports System&lt;br/&gt;Imports Xceed.Grid&lt;br/&gt;Imports System.Drawing&lt;br/&gt; &lt;br/&gt;Public Class CustomColumnManagerRow&lt;br/&gt;  Inherits Row&lt;br/&gt; &lt;br/&gt;  Protected Sub New( ByVal template As CustomColumnManagerRow )&lt;br/&gt;    MyBase.New( template )&lt;br/&gt;  End Sub&lt;br/&gt; &lt;br/&gt;  Public Sub New( ByVal selector As RowSelector )&lt;br/&gt;    MyBase.New( selector )&lt;br/&gt;  End Sub&lt;br/&gt;     &lt;br/&gt;  Public Sub New( ByVal columns As Integer )&lt;br/&gt;    MyBase.New()&lt;br/&gt;    m_columns = columns&lt;br/&gt;  End Sub&lt;br/&gt;     &lt;br/&gt;  Protected Overrides Function CreateInstance() As Xceed.Grid.Row&lt;br/&gt;    Return New CustomColumnManagerRow( Me )&lt;br/&gt;  End Sub   &lt;br/&gt; &lt;br/&gt;  Protected Overrides Sub PaintForeground( ByVal e As GridPaintEventArgs )&lt;br/&gt;    Dim width As Integer = 0&lt;br/&gt;    Dim lastColumn As Integer = 0 &lt;br/&gt;    Dim j As Integer&lt;br/&gt; &lt;br/&gt;    For j = 0 To Me.ParentGrid.Columns.Count \ m_columns - 1 &lt;br/&gt;&lt;br/&gt;      Dim i As Integer&lt;br/&gt;      For i = 0 To m_columns - 1&lt;br/&gt;        width += Me.ParentGrid.Columns( lastColumn ).Width&lt;br/&gt;        lastColumn = lastColumn + 1&lt;br/&gt;      Next i   &lt;br/&gt;                                 &lt;br/&gt;      e.Graphics.DrawLine( Me.ParentGrid.GridLinePen, e.DisplayRectangle.X + width - 1, 0, e.DisplayRectangle.X + width - 1, Me.Height )&lt;br/&gt;    Next j&lt;br/&gt;  End Sub&lt;br/&gt; &lt;br/&gt;  Protected Overrides ReadOnly Property DefaultHeight As Integer&lt;br/&gt;    Get&lt;br/&gt;      Return 16&lt;br/&gt;    End Get&lt;br/&gt;  End Property&lt;br/&gt; &lt;br/&gt;  Protected Overrides Readonly Property DefaultCanBeCurrent As Boolean&lt;br/&gt;    Get&lt;br/&gt;      Return False&lt;br/&gt;    End Get&lt;br/&gt;  End Property&lt;br/&gt; &lt;br/&gt;  Public Overrides ReadOnly Property IsBackColorAmbient As Boolean&lt;br/&gt;    Get&lt;br/&gt;      Return False&lt;br/&gt;    End Get&lt;br/&gt;  End Property&lt;br/&gt; &lt;br/&gt;  Protected Overrides ReadOnly Property DefaultBackColor As System.Drawing.Color&lt;br/&gt;    Get&lt;br/&gt;      Return SystemColors.Control&lt;br/&gt;    End Get&lt;br/&gt;  End Property&lt;br/&gt; &lt;br/&gt;  Private m_columns As Integer = 0 &lt;br/&gt;End Class&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;using System;&lt;br/&gt;using Xceed.Grid;&lt;br/&gt;using System.Drawing; &lt;br/&gt;&lt;br/&gt;namespace Xceed.Grid&lt;br/&gt;{&lt;br/&gt;  public class CustomColumnManagerRow : Row&lt;br/&gt;  {&lt;br/&gt;    protected CustomColumnManagerRow( CustomColumnManagerRow template )&lt;br/&gt;      :base( template ){}&lt;br/&gt;&lt;br/&gt;    public CustomColumnManagerRow( RowSelector selector )&lt;br/&gt;      :base( selector ){}   &lt;br/&gt;&lt;br/&gt;    public CustomColumnManagerRow( int columns )&lt;br/&gt;      :base()&lt;br/&gt;    {&lt;br/&gt;      m_columns = columns;&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    protected override Xceed.Grid.Row CreateInstance()&lt;br/&gt;    {&lt;br/&gt;      return new CustomColumnManagerRow( this );&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    protected override void PaintForeground( GridPaintEventArgs e )&lt;br/&gt;    {&lt;br/&gt;      int width = 0;&lt;br/&gt;      int lastColumn = 0;&lt;br/&gt; &lt;br/&gt;      for( int j = 0; j &amp;lt; this.ParentGrid.Columns.Count / m_columns; j++ )&lt;br/&gt;      {&lt;br/&gt;        for( int i = 0; i &amp;lt; m_columns; i++ ) &lt;br/&gt;        {&lt;br/&gt;          width += this.ParentGrid.Columns[ lastColumn ].Width;         &lt;br/&gt;          lastColumn++;&lt;br/&gt;        }   &lt;br/&gt;                                 &lt;br/&gt;        e.Graphics.DrawLine( this.ParentGrid.GridLinePen, e.DisplayRectangle.X + width - 1, 0, e.DisplayRectangle.X + width - 1, this.Height );&lt;br/&gt;      }&lt;br/&gt;    }&lt;br/&gt; &lt;br/&gt;    protected override</description></item><item><title>How to change a column's DateTime format</title><link>http://xceed.com/CS/forums/thread/28250.aspx</link><pubDate>Thu, 09 Oct 2008 15:13:13 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28250</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28250.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28250</wfw:commentRss><description>&lt;body&gt;In order to change the DateTime format of an entire column or a specific cell, you must set the column's/cell's FormatProvider property to the desired format and the FormatSpecifier property to the appropriate format provider. By default, the DateTime format will be the system's format. Therefore, if the system short date is yyyy/mm/dd, if you set the FormatSpecifier property to "d", without setting the FormatProvider property, the result will be a short date with the system format. &lt;br/&gt;&lt;br/&gt;If you want to change the way in which short dates are displayed (or any other date format), then you will need to create an instance of the DateTimeFormatInfo class, change its ShortDatePattern property to the desired short date format and assign the DateTimeFormatInfo object to the column's/cell's FormatProvider property.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Dim format As New System.Globalization.DateTimeFormatInfo()&lt;br/&gt;format.ShortDatePattern = "yyyy/mm/dd" &lt;br/&gt;&lt;br/&gt;GridControl1.Columns( "OrderDate" ).FormatSpecifier = "d"&lt;br/&gt;GridControl1.Columns( "OrderDate" ).FormatProvider = format&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;System.Globalization.DateTimeFormatInfo format = new System.Globalization.DateTimeFormatInfo();&lt;br/&gt;format.ShortDatePattern = "yyyy/mm/dd"; &lt;br/&gt;&lt;br/&gt;gridControl1.Columns[ "OrderDate" ].FormatSpecifier = "d";&lt;br/&gt;gridControl1.Columns[ "OrderDate" ].FormatProvider = format;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;If you want to change the DateTime format for a specific cell, you can set the cell's FormatProvider and FormatSpecifier properties rather than the column's:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Dim format As New System.Globalization.DateTimeFormatInfo()&lt;br/&gt;format.ShortDatePattern = "yyyy/mm/dd" &lt;br/&gt;&lt;br/&gt;GridControl1.DataRows( 0 ).Cells( "OrderDate" ).FormatSpecifier = "d"&lt;br/&gt;GridControl1.DataRows( 0 ).Cells( "OrderDate" ).FormatProvider = format&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;System.Globalization.DateTimeFormatInfo format = new System.Globalization.DateTimeFormatInfo();&lt;br/&gt;format.ShortDatePattern = "yyyy/mm/dd"; &lt;br/&gt;&lt;br/&gt;gridControl1.DataRows[ 0 ].Cells[ "OrderDate" ].FormatSpecifier = "d";&lt;br/&gt;gridControl1.DataRows[ 0 ].Cells[ "OrderDate" ].FormatProvider = format;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;Of course, if you create an instance of a column or cell, you can also set its FormatSpecifier and FormatProvider properties.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Dim format As New System.Globalization.DateTimeFormatInfo()&lt;br/&gt;format.ShortDatePattern = "yyyy/mm/dd" &lt;br/&gt;&lt;br/&gt;Dim column As New Column( "MyColumn", GetType( String ) )&lt;br/&gt;column.FormatSpecifier = "d"&lt;br/&gt;column.FormatProvider = form&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;System.Globalization.DateTimeFormatInfo format = new System.Globalization.DateTimeFormatInfo();&lt;br/&gt;format.ShortDatePattern = "yyyy/mm/dd"; &lt;br/&gt;&lt;br/&gt;Column column = new Column( "MyColumn", typeof( string ) );&lt;br/&gt;column.FormatSpecifier = "d";&lt;br/&gt;column.FormatProvider = format;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;&lt;/body&gt;</description></item><item><title>How to format data using mask (#) characters</title><link>http://xceed.com/CS/forums/thread/28249.aspx</link><pubDate>Thu, 09 Oct 2008 15:13:02 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28249</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28249.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28249</wfw:commentRss><description>&lt;body&gt;&lt;body&gt;&lt;p&gt;In order to format data using mask (#) characters for an entire column or a specific cell, you must use the TextViewer and TextEditor. Simply setting the column or cell's FormatSpecifier property will not function. You can also change the format of text displayed in a cell (or in an entire column) by creating a class that implements the IFormatProvider interface and assigning your custom class to the FormatProvider and FormatSpecifier properties of the desired cell or column. &lt;br/&gt;&lt;br/&gt;For more information regarding the implementation of the IFormatProvider interface, go to the "Customizing Format Strings" topic of the .NET Framework's documentation.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;GridControl1.Columns( "Phone" ).CellEditorManager = New Xceed.Grid.Editors.TextEditor( "( ### ) ###-####" )&lt;br/&gt;GridControl1.Columns( "Phone" ).CellViewerManager = New Xceed.Grid.Viewers.TextViewer( "( ### ) ###-####" )&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.Columns[ "Phone" ].CellEditorManager = new Xceed.Grid.Editors.TextEditor( "( ### ) ###-####" );&lt;br/&gt;gridControl1.Columns[ "Phone" ].CellViewerManager = new Xceed.Grid.Viewers.TextViewer( "( ### ) ###-####" );&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;/body&gt;&lt;/body&gt;</description></item><item><title>How to display a button in a cell</title><link>http://xceed.com/CS/forums/thread/28247.aspx</link><pubDate>Thu, 09 Oct 2008 15:12:49 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28247</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28247.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28247</wfw:commentRss><description>&lt;body&gt;The grid does not provide a button cell editor or viewer nor is it possible to simulate a proper working button using the ControlViewer or CustomEditor classes. It is possible however to create a button in a cell by creating your own custom cell and overriding the PaintForeground method to draw the button. &lt;br/&gt;&lt;br/&gt;This also requires the you create your own custom cell row so that you can return the appropriate cell type in the row's CreateCell method in the case where the data type of the column/cell is a button.&lt;br/&gt;&lt;br/&gt;&lt;/body&gt;</description></item><item><title>How to display tooltips</title><link>http://xceed.com/CS/forums/thread/28253.aspx</link><pubDate>Thu, 09 Oct 2008 15:02:39 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28253</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28253.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28253</wfw:commentRss><description>&lt;body&gt;The grid does not directly support tooltips, however you can use the Microsoft ToolTip component in order to display tooltips. In order to display tooltips in the grid, the SetToolTip method of the ToolTip component must be called with the desired text.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;GridControl1.BeginInit()&lt;br/&gt;&lt;br/&gt;GridControl1.DataSource = DataSet11&lt;br/&gt;GridControl1.DataMember = "Orders"&lt;br/&gt;&lt;br/&gt;' Subscribe to the MouseEnter event for each cell in the grid's DataRowTemplate.&lt;br/&gt;' so that the content of each cell will be displayed when the mouse&lt;br/&gt;' enters the cell&lt;br/&gt;&lt;br/&gt;Dim cell As DataCell&lt;br/&gt;For Each cell In GridControl1.DataRowTemplate.Cells&lt;br/&gt;  AddHandler cell.MouseEnter, AddressOf Me.ShowTip&lt;br/&gt;Next&lt;br/&gt;&lt;br/&gt;GridControl1.EndInit()&lt;br/&gt;&lt;br/&gt;Private Sub ShowTip( ByVal sender As Object, ByVal e As EventArgs )&lt;br/&gt;  ToolTip1.SetToolTip(GridControl1, CType(sender, DataCell).Value.ToString())&lt;br/&gt;End Sub&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;gridControl1.BeginInit();&lt;br/&gt;&lt;br/&gt;gridControl1.DataSource = dataSet11;&lt;br/&gt;gridControl1.DataMember = "Orders";&lt;br/&gt;&lt;br/&gt;// Subscribe to the MouseEnter event for each cell in the grid's DataRowTemplate.&lt;br/&gt;// so that the content of each cell will be displayed when the mouse&lt;br/&gt;// enters the cell&lt;br/&gt;foreach( DataCell cell in gridControl1.DataRowTemplate.Cells )&lt;br/&gt;{&lt;br/&gt;  cell.MouseEnter += new EventHandler( this.ShowTip );&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;gridControl1.EndInit();&lt;br/&gt;&lt;br/&gt;private void ShowTip( object sender, EventArgs e )&lt;br/&gt;{&lt;br/&gt;  toolTip1.SetToolTip(gridControl1, ( ( DataCell )sender ).Value.ToString() );&lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>How to hide or remove grid lines</title><link>http://xceed.com/CS/forums/thread/28252.aspx</link><pubDate>Thu, 09 Oct 2008 15:01:23 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28252</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28252.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28252</wfw:commentRss><description>&lt;body&gt;There are 2 ways to hide or remove the grid lines: Your first (and easiest) option is to set the GridLineColor and GridLineBackColor properties to Color.Transparent. Your second option is to create a class the derives from the DataCell class and override the Borders property to remove the grid lines completely.&lt;br/&gt;&lt;br/&gt;The following example demonstrates how to hide the grid lines by setting the grid's GridLineColor and GridLineBackColor properties to Color.Transparent: &lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;GridControl1.GridLineColor = Color.Transparent&lt;br/&gt;GridControl1.GridLineBackColor = Color.Transparent&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;gridControl1.GridLineColor = Color.Transparent;&lt;br/&gt;gridControl1.GridLineBackColor = Color.Transparent;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;The next example demonstrates how to derive from the DataCell class to override the Borders property and remove the grid lines completely. Keep in mind that you also need to create a class that derives from the DataRow class that will contain your custom cells.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Public Class CustomDataCell&lt;br/&gt;  Inherits DataCell &lt;br/&gt;&lt;br/&gt;Protected Sub New ( ByVal template As CustomDataCell )&lt;br/&gt;  MyBase.New( template )&lt;br/&gt;End Sub &lt;br/&gt;&lt;br/&gt;Public Sub New( ByVal parentColumn As Column )&lt;br/&gt;  MyBase.New( parentColumn )&lt;br/&gt;End Sub &lt;br/&gt;&lt;br/&gt;Protected Overrides Function CreateInstance() As Cell&lt;br/&gt;  Return New CustomDataCell( Me )&lt;br/&gt;End Function &lt;br/&gt;&lt;br/&gt;Public Overrides ReadOnly Property Borders As Borders&lt;br/&gt;  Get&lt;br/&gt;    Return Borders.Empty&lt;br/&gt;  End Get&lt;br/&gt;End Property&lt;br/&gt;End Class &lt;br/&gt;&lt;br/&gt;Public Class CustomDataRow&lt;br/&gt;  Inherits Xceed.Grid.DataRow &lt;br/&gt;&lt;br/&gt;Public Sub New()&lt;br/&gt;  MyBase.New()&lt;br/&gt;End Sub &lt;br/&gt;&lt;br/&gt;Protected Sub New( ByVal template As CustomDataRow )&lt;br/&gt;  MyBase.New( template )&lt;br/&gt;End Sub &lt;br/&gt;&lt;br/&gt;Protected Overrides Function CreateCell( ByVal parentColumn As Column ) As Cell&lt;br/&gt;  Return New CustomDataCell( parentColumn )&lt;br/&gt;End Function &lt;br/&gt;&lt;br/&gt;Protected Overrides Function CreateInstance() As Row&lt;br/&gt;  Return New CustomDataRow( Me )&lt;br/&gt;End Function&lt;br/&gt;End Class&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;public class CustomDataCell : DataCell&lt;br/&gt;{&lt;br/&gt;  protected CustomDataCell( CustomDataCell template )&lt;br/&gt;    : base( template ){}&lt;br/&gt;&lt;br/&gt;  public CustomDataCell( Column parentColumn )&lt;br/&gt;    : base( parentColumn ){}&lt;br/&gt;&lt;br/&gt;  protected override Cell CreateInstance()&lt;br/&gt;  {&lt;br/&gt;    return new CustomDataCell( this );&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;  public override Borders Borders&lt;br/&gt;  {&lt;br/&gt;    get{ return Borders.Empty; }&lt;br/&gt;  }&lt;br/&gt;} &lt;br/&gt;&lt;br/&gt;public class CustomDataRow : Xceed.Grid.DataRow&lt;br/&gt;{&lt;br/&gt;  public CustomDataRow()&lt;br/&gt;    : base(){}&lt;br/&gt;&lt;br/&gt;  protected CustomDataRow( CustomDataRow template )&lt;br/&gt;    : base( template ){}&lt;br/&gt;&lt;br/&gt;  protected override Cell CreateCell( Column parentColumn )&lt;br/&gt;  {&lt;br/&gt;    return new CustomDataCell( parentColumn );&lt;br/&gt;  }&lt;br/&gt;&lt;br/&gt;  protected override Row CreateInstance()&lt;br/&gt;  {&lt;br/&gt;    return new CustomDataRow( this );&lt;br/&gt;  }&lt;br/&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br/&gt;In order to use your new DataRow and DataCell, you must assign a new instance of your custom DataRow class to the DataRowTemplate property of the grid:&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;/strong&gt; &lt;br/&gt;&lt;br/&gt;GridControl1.DataRowTemplate = New CustomDataRow()&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;gridControl1.DataRowTemplate = new CustomDataRow();&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;</description></item><item><title>Custom grouping and sorting</title><link>http://xceed.com/CS/forums/thread/28245.aspx</link><pubDate>Wed, 08 Oct 2008 19:55:36 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28245</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28245.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28245</wfw:commentRss><description>This example demonstrates how to create a custom group description by deriving from the &lt;strong&gt;DataGridGroupDescription&lt;/strong&gt; class and overriding the &lt;strong&gt;GroupNameFromItem&lt;/strong&gt; method. The custom group description will group items according to the first letter in the value received as a parameter. &lt;br/&gt;&lt;br/&gt;The implementation for the custom sort comparer assigned to the group description's &lt;strong&gt;SortComparer&lt;/strong&gt; property is provided below.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Imports System&lt;br/&gt;Imports System.Collections.Generic&lt;br/&gt;Imports System.Text&lt;br/&gt;Imports Xceed.Wpf.DataGrid&lt;br/&gt;Imports System.Collections&lt;br/&gt;Imports System.Globalization;&lt;br/&gt;&lt;br/&gt;Namespace Xceed.Wpf.Documentation&lt;br/&gt;&amp;nbsp; Public Class AlphabeticalGroupDescription&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits DataGridGroupDescription&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub New()&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New()&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub New(ByVal propertyName As String)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New(propertyName)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Overrides Function GroupNameFromItem(ByVal item As Object, _&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal level As Integer, _&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByVal culture As CultureInfo) As Object&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim value As Object = MyBase.GroupNameFromItem(item, level, culture)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim content As String = Convert.ToString(value)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = content.ToUpper().Substring(0, 1)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch e1 As InvalidCastException&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return value&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function&lt;br/&gt;&amp;nbsp; End Class&lt;br/&gt;End Namespace&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;strong&gt;C#&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;using System;&lt;br/&gt;using System.Collections.Generic;&lt;br/&gt;using System.Text;&lt;br/&gt;using Xceed.Wpf.DataGrid;&lt;br/&gt;using System.Collections;&lt;br/&gt;&lt;br/&gt;namespace Xceed.Wpf.Documentation&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; public class AlphabeticalGroupDescription : DataGridGroupDescription&lt;br/&gt;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public AlphabeticalGroupDescription()&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : base()&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public AlphabeticalGroupDescription( string propertyName )&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : base( propertyName )&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public override object GroupNameFromItem( object item, int level,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Globalization.CultureInfo culture )&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object value = base.GroupNameFromItem( item, level, culture );&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string content = Convert.ToString( value );&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp</description></item><item><title>Programmatically toggling group expansion</title><link>http://xceed.com/CS/forums/thread/28244.aspx</link><pubDate>Wed, 08 Oct 2008 19:55:24 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28244</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28244.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28244</wfw:commentRss><description>&lt;p&gt;The following example demonstrates how to handle the &lt;strong&gt;PreviewMouseLeftButtonDown&lt;/strong&gt; event on the &lt;strong&gt;GroupHeaderControl&lt;/strong&gt; objects contained in the headers of the child groups to toggle the expansion state of child groups using the &lt;strong&gt;ToggleGroupExpansion&lt;/strong&gt; method. The group whose state is to be toggled will be retrieved using the &lt;strong&gt;GetParentGroupFromItem&lt;/strong&gt; method.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;&lt;font size="1"&gt;&amp;lt;Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"&amp;gt;&lt;br/&gt;&amp;nbsp; &amp;lt;Grid.Resources&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:DataGridCollectionViewSource x:Key="cvs_orders"&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Source="{Binding Source={x:Static Application.Current}, &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Path=Orders}"&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:DataGridCollectionViewSource.GroupDescriptions&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:DataGridGroupDescription PropertyName="ShipCountry"/&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xcdg:DataGridGroupDescription PropertyName="ShipCity"/&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xcdg:DataGridCollectionViewSource.GroupDescriptions&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xcdg:DataGridCollectionViewSource&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Style TargetType="{x:Type xcdg:GroupHeaderControl}"&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EventSetter Event="PreviewMouseLeftButtonDown"&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Handler="HeaderDown"/&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Style&amp;gt;&amp;nbsp;&amp;nbsp; &lt;br/&gt;&amp;nbsp; &amp;lt;/Grid.Resources&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;lt;xcdg:DataGridControl x:Name="OrdersGrid"&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ItemsSource="{Binding Source={StaticResource cvs_orders}}"/&amp;gt;&lt;br/&gt;&amp;lt;/Grid&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;The following code provides the implementation of the &lt;strong&gt;PreviewMouseLeftButtonDown&lt;/strong&gt; event in which we will retrieve the item represented by the &lt;strong&gt;GroupHeaderControl&lt;/strong&gt; (&lt;strong&gt;GroupHeaderFooterItem&lt;/strong&gt;) using the &lt;strong&gt;GetItemFromContainer&lt;/strong&gt; method, which will then be used to retrieve the parent group (&lt;strong&gt;GetParentGroupFromItem&lt;/strong&gt;) whose state is to be toggled.&lt;br/&gt;&lt;br/&gt;
&lt;table cellspacing="2" cellpadding="2" width="100%" bgcolor="#e8e8e8" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;&lt;font size="1"&gt;&lt;strong&gt;VB.NET&lt;br/&gt;&lt;/strong&gt;&lt;br/&gt;Private Sub HeaderDown( ByVal sender As Object, ByVal e As MouseButtonEventArgs )&lt;br/&gt;&amp;nbsp; Dim headerControl As GroupHeaderControl = TryCast( sender, GroupHeaderControl );&lt;br/&gt;&amp;nbsp; If headerControl Is Nothing Then&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;br/&gt;&amp;nbsp; End If&lt;br/&gt;&lt;br/&gt;&amp;nbsp; Dim context As DataGridContext = DataGridControl.GetDataGridContext( headerControl )&lt;br/&gt;&amp;nbsp; Dim item As Object = context.GetItemFromContainer( headerControl ) )&lt;br/&gt;&lt;br/&gt;&amp;nbsp; If Not item Is Nothing Then&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim group As CollectionViewGroup = context.GetParentGroupFromItem( item )&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not group Is Nothing&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; context.ToggleGroupExpansion( group )&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br/&gt;&amp;nbsp; End If&lt;br/&gt;End Sub&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;
&lt;p&gt;&lt;font size=</description></item><item><title>How can I rename a file before it is added to the zip file?</title><link>http://xceed.com/CS/forums/thread/28237.aspx</link><pubDate>Fri, 05 Sep 2008 18:32:31 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28237</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28237.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28237</wfw:commentRss><description>&lt;span&gt;You can use the CopyTo method to rename the destination file.&lt;br/&gt;&lt;br/&gt;The AbstractFile passed as a parameter is the destination file, therefore if you call CopyTo on a file called one.txt and copy it to two.txt, the contents of the file will be the same but the name of the file will have changed.&lt;br/&gt;&lt;br/&gt;If you want to rename the file on disk permanently, then you will need to create a reference to a DiskFile object and change the Name propert&lt;/span&gt;</description></item><item><title>LastAccessDateTime is not modified.</title><link>http://xceed.com/CS/forums/thread/28236.aspx</link><pubDate>Fri, 05 Sep 2008 18:27:14 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28236</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28236.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28236</wfw:commentRss><description>&lt;span&gt;This is a known issue when using the Framework's System.IO.File.SetLastAccessDate method which is called when setting the LastAccessDateTime property.&lt;br/&gt;&lt;br/&gt;In somes cases, antivirus software such as Norton Anti-Virus, accesses the file and causes the access time to be updated.&lt;/span&gt;</description></item><item><title>Varied results when encrypting the same string with the same key.</title><link>http://xceed.com/CS/forums/thread/28235.aspx</link><pubDate>Fri, 05 Sep 2008 18:26:52 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28235</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28235.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28235</wfw:commentRss><description>&lt;span&gt;The reason why you get different results with the same key, same string, is because of the PadingMethod property.&lt;br/&gt;&lt;br/&gt;Rijndael will encrypt 16 bytes of data at a time. Lets say your data is 40 bytes. The first 32 bytes will be encrypted with the same result. But, your final 8 bytes will be padded with an extra 8 (a resulting 16 bytes). These padded 8 bytes will always be different, unless you set the PaddingMethod Property to epmRFC1423 (see the help file under PaddingMethod Property). Your final result will now be of 48 bytes. 16 + 16 + 8 + 8 final 8 being your padded result.&lt;br/&gt;&lt;br/&gt;If you use the Chained Blocks encryption mode and you provide a different initialization vector each time (recommended), then the entire resulting encrypted string will be different.&lt;/span&gt;</description></item><item><title>How do I change the user without disconnecting?</title><link>http://xceed.com/CS/forums/thread/28234.aspx</link><pubDate>Fri, 05 Sep 2008 18:26:06 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28234</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28234.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28234</wfw:commentRss><description>&lt;span&gt;As long as the FTP server supports the REIN command, you can use the ChangeUser method to change user without disconnecting.&lt;br/&gt;&lt;br/&gt;If the FTP server does not support the REIN command, then it is not possible to change the user without disconnecting.&lt;br/&gt;&lt;br/&gt;Note : It is not possible to use the SendCommand method to send the USER and PASS commands since these commands return intermediate replies (in the 300s) which are not supported by the SendCommand method.&lt;/span&gt;</description></item><item><title>How can I improve the performance of my grid?</title><link>http://xceed.com/CS/forums/thread/28232.aspx</link><pubDate>Fri, 05 Sep 2008 18:24:49 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28232</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28232.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28232</wfw:commentRss><description>&lt;span&gt;The following is a list of things you should take into consideration if you do not want to diminish the performance of your grid:&lt;br/&gt;&lt;br/&gt;1- Do not use a GridLineStyle other than Solid. Using another GridLineStyle can substantially reduce performance (by about 30% according to our test results).&lt;br/&gt;&lt;br/&gt;2- Do not use a background image.&lt;br/&gt;&lt;br/&gt;3- Subscribe only to the necessary events and do not put code that is long to execute in the event handlers. This applies especially to the Cell.ValueChanged event.&lt;br/&gt;&lt;br/&gt;4- If the grid is bound, the size of the dataset can greatly influence performance. The new general philosophy in .NET is to work "disconnected" with small datasets.&lt;br/&gt;&lt;br/&gt;5- Use AutoHeightMode.None rather than Minimum or AllContent.&lt;/span&gt;</description></item><item><title>FormatException when setting the FormatSpecifier property to "d"</title><link>http://xceed.com/CS/forums/thread/28230.aspx</link><pubDate>Fri, 05 Sep 2008 18:23:22 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28230</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28230.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28230</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;Xceed Grid for .NET uses the built-in formatting of the .NET Framework. "d" is for Decimal and, according to Microsoft documentation (you can search for "standard numeric format strings"), it only supports integral types. That's why you cannot apply it to a "double" data type.&lt;/span&gt;&lt;/body&gt;</description></item><item><title>Does Xceed Grid for .NET function in ASP.NET / Web Matrix?</title><link>http://xceed.com/CS/forums/thread/28228.aspx</link><pubDate>Fri, 05 Sep 2008 18:22:10 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28228</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28228.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28228</wfw:commentRss><description>&lt;body&gt;&lt;p&gt;&lt;span&gt;Xceed Grid for .NET is a Windows Form control. It will not function in ASP.NET / Web Matrix.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;</description></item><item><title>Does the grid support card views?</title><link>http://xceed.com/CS/forums/thread/28226.aspx</link><pubDate>Fri, 05 Sep 2008 18:20:53 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28226</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28226.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28226</wfw:commentRss><description>&lt;body&gt;&lt;p&gt;&lt;span&gt;Xceed Grid for .NET does not support card views; however they are supported by Xceed DataGrid for WPF.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;</description></item><item><title>An internal error has occurred in the Grid Designer.</title><link>http://xceed.com/CS/forums/thread/28225.aspx</link><pubDate>Fri, 05 Sep 2008 18:19:55 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28225</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28225.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28225</wfw:commentRss><description>&lt;body&gt;&lt;span&gt;This error usually occurs when the Copy Local property of the Xceed.Grid reference is set to true. Setting it to false should correct the issue.&lt;br/&gt;&lt;br/&gt;&lt;img src="http://www.xceedsoft.com/cs/download/Images/Grid/copylocal.gif"/&gt;&lt;br/&gt;&lt;br/&gt;This error can also occur in the designer if you compiled a custom DLL from the Blueprint edition of the grid. Unfortunately, if you compile a custom DLL from the Blueprint edition, the designer will not functio&lt;/span&gt;&lt;/body&gt;</description></item><item><title>I'm using AddNew(), but it seems to only place the new DataRow at the end of the grid. I need the ability to insert a new DataRow between two existing DataRows. Is it possible?</title><link>http://xceed.com/CS/forums/thread/28223.aspx</link><pubDate>Fri, 05 Sep 2008 18:14:25 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:28223</guid><dc:creator>Xceed admin</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/28223.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=76&amp;PostID=28223</wfw:commentRss><description>&lt;span&gt;It is not possible to insert datarow's into a grid other than by using AddNew.&lt;br/&gt;&lt;br/&gt;As a workaround to simulate insertion, create an invisible column that contains an index and sort by that column. When AddNew is called, place the desired number in the cell corresponding to the invisible column and the datarow will appear to be inserted.&lt;/span&gt;</description></item></channel></rss>