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.

What''s the simple solution to convert a .NET Data Grid to Syncfusion Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

11529 Mar 9,2004 10:05 AM Mar 10,2004 06:32 AM Windows Forms 2
loading
Tags: GridControl
Mark Hu
Asked On March 9, 2004 10:05 AM

Hi, All, I wrote my own grid that inherits from .NET DataGrid and some event handling on the grid level, also wrote my own grid text column / table style / collections with column level event handling and row level painting - now it''s about the time to think about how to convert my data grid to Syncfusion based Grid, any one got some sample and ideas how this would work ?? Lot of thanks. regards, mark

Administrator [Syncfusion]
Replied On March 9, 2004 12:01 PM

DataGrid and GridDataBoundGrid are two very different things. DataGridColumnStyles serve some of the same functionality as GridBoundColumns. The order and inclusion of the columns in both grids are determined by the order the columns are added to these collections. In DataGrid, you normally derived a COlumnStyle to implement functionality like setting a backcolor or using a special font in that column. Well, in a GridDataBoundGrid, you do not have to override anything to set such properties on a column basis. You just set the GridBoundCOlumn.StyleInfo property for that column. If you want to do something at a cell level (like color a cell based on its value), then this would be another reason to derive a DataGridColumnStyle. But again, this is not necessary in a GridDataBoundGrid. Instead, you would handle the PrepareViewStyleInfo event, and there conditionally set e.Style.backColor based on, say e.Style.CellValue (or e.ColIndex or e.RowIndex or ???). The point I am trying to make is that I think you will essentially have to set gridDataBoundGrid1.DataSource, and then either set properties or handle particular events to get the functionality you had in DataGrid. I think it will be much less work than deriving DataGridColumnsStyles. Depending upon exactly what you did, you may have to do other things. When you run into a problem, you can use our Direct Trac support system to get help with the task

Administrator [Syncfusion]
Replied On March 10, 2004 06:32 AM

thanks a lot for ur suggestion, man, I did spent quite a mount of time to write my own column style and cell event handling, etc - now to be consistent with others, I have to convert to syncfusion grid if the amount of work is smaller and easier than I did by using .NET datagrid, etc - I''ll give a shot first and see how it goes, thanks again. >DataGrid and GridDataBoundGrid are two very different things. > >DataGridColumnStyles serve some of the same functionality as GridBoundColumns. The order and inclusion of the columns in both grids are determined by the order the columns are added to these collections. > >In DataGrid, you normally derived a COlumnStyle to implement functionality like setting a backcolor or using a special font in that column. Well, in a GridDataBoundGrid, you do not have to override anything to set such properties on a column basis. You just set the GridBoundCOlumn.StyleInfo property for that column. > >If you want to do something at a cell level (like color a cell based on its value), then this would be another reason to derive a DataGridColumnStyle. But again, this is not necessary in a GridDataBoundGrid. Instead, you would handle the PrepareViewStyleInfo event, and there conditionally set e.Style.backColor based on, say e.Style.CellValue (or e.ColIndex or e.RowIndex or ???). > >The point I am trying to make is that I think you will essentially have to set gridDataBoundGrid1.DataSource, and then either set properties or handle particular events to get the functionality you had in DataGrid. I think it will be much less work than deriving DataGridColumnsStyles. Depending upon exactly what you did, you may have to do other things. When you run into a problem, you can use our Direct Trac support system to get help with the task

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.

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.

;