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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to clear GridDataBoundGrid in c#

Thread ID:





117433 Oct 20,2014 11:28 AM UTC Oct 24,2014 11:29 AM UTC WinForms 1
Tags: GridDataBoundGrid(Classic)
Asked On October 20, 2014 11:28 AM UTC

Hi viewers ,

 I am very new to Syncfusion controls  let you help please 
 How I will clear Data in the GridDataBoundGrid using c#  in the "New" button click ;
( I am trying gdbgdata.datasource =null;,gdbgdata.model.rows.clear()) but its not working 
how i will finish this one please help me 
                                                        thank you in Advance 

Anish George [Syncfusion]
Replied On October 24, 2014 11:29 AM UTC

Hi Venkaiah,


Thank you for using syncfusion products.


We would like to suggest you to use the ClearCells method for clearing the particular range of cells. Please make use of the below code snippet in you button click event for clearing a particular cell or range of cells.



//Clear the whole grid.

//Clear the 2th Row.
this. gridDataBoundGrid1.Model.ClearCells(GridRangeInfo.Row(2),true); 

//Clear the 2th Column
this. gridDataBoundGrid1.Model.ClearCells(GridRangeInfo.Col(2),true);

//Clear the (2,2) cell
this. gridDataBoundGrid1.Model.ClearCells(GridRangeInfo.Cell(2,2),true);



Please let us know if you need any further assistance.





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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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