We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl and DataSource

Thread ID:

Created:

Updated:

Platform:

Replies:

6660 Aug 21,2003 02:25 PM UTC Aug 25,2003 02:55 PM UTC Windows Forms 2
loading
Tags: GridControl
Shulin He
Asked On August 21, 2003 02:25 PM UTC

Hi, I am new to the Essential Grid stuff. I have a couple of questions. 1. How do I use a DataTable object with a GridControl? The DataTable object is created from an XML file. I'd like to have the same behavior like to the DataSet and DataGrid objects in the .NET framework. In addition, I want to be able to undo/redo things. The latter is the whole reason I bought the Essential Grid stuff. Microsoft's DataGrid and DataSet objects have worked very well for me until I need this undo/redo thing. Is there any way to automatically add a new row to the data grid when I enter data in the current row just like the Microsoft stuff? 2. Is the undo/redo capability also available in the GridDataBoundGrid object? It seems that the GridDataBoundGrid is more or less like the DataGrid object in the .NET framework. But how can I have undo/redo capability? Thanks Sam

Administrator [Syncfusion]
Replied On August 21, 2003 02:40 PM UTC

> Hi, I am new to the Essential Grid stuff. I have a couple of questions. > > 1. How do I use a DataTable object with a GridControl? The DataTable object is created from an XML file. I'd like to have the same behavior like to the DataSet and DataGrid objects in the .NET framework. In addition, I want to be able to undo/redo things. The latter is the whole reason I bought the Essential Grid stuff. Microsoft's DataGrid and DataSet objects have worked very well for me until I need this undo/redo thing. Is there any way to automatically add a new row to the data grid when I enter data in the current row just like the Microsoft stuff? > > 2. Is the undo/redo capability also available in the GridDataBoundGrid object? It seems that the GridDataBoundGrid is more or less like the DataGrid object in the .NET framework. But how can I have undo/redo capability? > > Thanks > Sam > 1) You have two options. You can actually move the data from the DataTable to the GridControl, say using the PopulateValues method on the grid. (See the Syncfusion\Essential Suite\Grid\Samples\In Depth\GridPopulationSample for some code using this method). Or, you could use the grid in a virtual mode, where you handle QueryCellInfo, QueryColCount, QueryRowCount and maybe SaveCellInfo to provide the data from the datatable to the grid on demand. (Check section 4.3 in the users guide for more info on virtual grids). 2) In a GridDataBoundGrid, you can get at the CopmmandStack to enable undo through the Model property. this.gridDataBoundGrid1.Model.CommandStack.Enabled = true;

Shulin He
Replied On August 25, 2003 02:55 PM UTC

Thanks for the info. I have got it work by using GridDataBoundGrid. Sam > > Hi, I am new to the Essential Grid stuff. I have a couple of questions. > > > > 1. How do I use a DataTable object with a GridControl? The DataTable object is created from an XML file. I'd like to have the same behavior like to the DataSet and DataGrid objects in the .NET framework. In addition, I want to be able to undo/redo things. The latter is the whole reason I bought the Essential Grid stuff. Microsoft's DataGrid and DataSet objects have worked very well for me until I need this undo/redo thing. Is there any way to automatically add a new row to the data grid when I enter data in the current row just like the Microsoft stuff? > > > > 2. Is the undo/redo capability also available in the GridDataBoundGrid object? It seems that the GridDataBoundGrid is more or less like the DataGrid object in the .NET framework. But how can I have undo/redo capability? > > > > Thanks > > Sam > > > > 1) You have two options. > > You can actually move the data from the DataTable to the GridControl, say using the PopulateValues method on the grid. (See the Syncfusion\Essential Suite\Grid\Samples\In Depth\GridPopulationSample for some code using this method). > > Or, you could use the grid in a virtual mode, where you handle QueryCellInfo, QueryColCount, QueryRowCount and maybe SaveCellInfo to provide the data from the datatable to the grid on demand. (Check section 4.3 in the users guide for more info on virtual grids). > > 2) In a GridDataBoundGrid, you can get at the CopmmandStack to enable undo through the Model property. > > this.gridDataBoundGrid1.Model.CommandStack.Enabled = true; >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;