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.

Inserting rows

Thread ID:

Created:

Updated:

Platform:

Replies:

132605 Sep 11,2017 09:38 PM Sep 18,2017 09:04 AM Windows Forms 7
loading
Tags: GridDataBoundGrid(Classic)
Joseph Williamson
Asked On September 11, 2017 09:38 PM

I have 3 functions i was using with `DataGridView` and when switching over to `GridDataBoundGrid` these functions no longer work and i cant seem to understand why



Mohanraj Gunasekaran [Syncfusion]
Replied On September 12, 2017 09:45 AM

Hi Joseph, 

Thanks for using Syncfusion product. 

We can understand your scenario. In DataGridView, RowIndex(0) has considered from first record row but GridDataBoundGrid has considered the RowIndex(0) from column header. So, if you want to add the new row after/ before based on the current row index, please make use of the below code and refer the attached sample, 

Code example 
GridDataBoundGrid grid = this.tabControl1.SelectedTab.Controls.OfType<GridDataBoundGrid>().First(); 
//Insert after 
index = grid.CurrentCell.RowIndex; 
 
//Insert before 
index = grid.CurrentCell.RowIndex - 1; 
 
DataRow dr = ds.Tables[tabindex].NewRow(); 
ds.Tables[tabindex].Rows.InsertAt(dr, index); 
 
 
Sample link: GridDataBoundGrid 
 
Note:   
Moreover, you can use the GridGroupingControl instead of GridDataBoundGrid. GridGroupingControl has more features and support. It is used to display the binding source with more flexible manipulation like sorting, grouping, filtering.  
 
Please let us know, if you have any concerns. 
 
Regards, 
Mohanraj G 
 


Joseph Williamson
Replied On September 12, 2017 07:21 PM

I must say this software is highly disappointing after using telerik I'm just very disappointed at how horrible this add on is 


Mohanraj Gunasekaran [Syncfusion]
Replied On September 13, 2017 10:35 AM

Hi Joseph,  
 
Sorry for the inconvenience caused. 
 
In our GridDataBoundGrid, we have calculated the row and column index based on the visible cells. So, if you want to add the new row before/after the current row using bounded collection(DataTable), you should calculate the row index using below code. This is our current architecture of GridDataBoundGrid. 
 
Code example 
//Insert Row before 
int count = this.gridDataBoundGrid1.ShowColumnHeaders ? 1 : 0; 
index = grid.CurrentCell.RowIndex - count; 
 
 
Screenshot 
 
 
 
Please let us know, if you facing any other difficulties to use our GridDataBoundGrid. 
 
Regards, 
Mohanraj G 
 


Joseph Williamson
Replied On September 14, 2017 11:33 AM

When I downloaded syncfusion I was looking for something visually appealing like teleriks RadGridView out of the box however syncfusion doesn't have any gridviews that are visually appealing out of the box plus telerik their RadGridView works directly with all my functions that were made for DataGridView so I believe I'm gonna be uninstalling syncfusion but thand anyways


Mohanraj Gunasekaran [Syncfusion]
Replied On September 15, 2017 10:15 AM

Hi Joseph, 
 
Sorry for the inconvenience caused. 
 
Query 
Solution 
 visually appealing like teleriks RadGridView out of the box however syncfusion doesn't have any gridviews that are visually appealing out of the box 
GridDataBoundgrid having more appearance which can be achieved by using GridVisualStyles property. Please refer to the below code example, 
 
The following appearances are available for GridDataBoundGrid, 
  • Metro
  • Office2003Black
  • Office2007Black
  • Office2007Blue
  • Office2007Silver
  • Office2010Black
  • Office2010Blue
  • Office2010Silver
 
Code example 
this.gridDataBoundGrid1.GridVisualStyles = GridVisualStyles.Metro;  
 
Please let us know what kind of appearance do you want for the  GridDataBoundGrid 
 
Note: 
This support also available for GridGroupingControl. Please refer the below UG link, 
 
telerik their RadGridView works directly with all my functions that were made for DataGridView so I believe I'm gonna be uninstalling syncfusion but thand anyways 
We have provided the solution based on our GridDataBoundGrid current architecture. We are maintaining the column header in index due to maintaining the all visible cellstyles and Visible cells details. So, this is our default behavior and we cannot change this behavior. 
 
 
 
Regards, 
Mohanraj G 


Joseph Williamson
Replied On September 16, 2017 02:04 AM

Your reply is much appreciated after looking over the styles I am very pleased with the outcome(maybe this should be mentioned more in the docs) I am still not happy about the functionality but I believe I may be able to put up with it now :)


While here perhaps you can provide a solution for this issue as well...

https://stackoverflow.com/questions/46124436/synfusion-winforms-griddataboundgrid-what-events-are-they-for-detecting-header



Mohanraj Gunasekaran [Syncfusion]
Replied On September 18, 2017 09:04 AM

 Hi Joseph,  
 
Sorry for the inconvenience caused. 
 
GridDataBoundGrid has marked as a classic control. Since the GridDataBoundGrid is classic control, the development is no longer for this control was not provided. So, that we have suggested to use the GridGroupingControl for your requirements. You can use the GridGroupingControl instead of GridDataBoundGrid. GridGroupingControl have more features and support compare than GridDataBoundGrid(Classic). And, GridGroupingControl has proper documentation for all features and support. Please refer the following UG links, 
 
 
Note: 
We have considered your feedback and we will update our documentation for GridDataBoundGrid(Classic). It will be available on any of our upcoming release. 
 
Please let us know, if you have any concerns. 
 
Regards, 
Mohanraj G 
 
 
 


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.

;