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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Save/Open Grid Data

Thread ID:





22573 Dec 15,2004 06:06 PM UTC Dec 15,2004 10:20 PM UTC WinForms 1
Tags: GridControl
Avrum Tilman
Asked On December 15, 2004 06:06 PM UTC

I am using the GridControl. Is there an easy way to save all the data in the grid to a file and then repopulate the grid with the data in the file later? Thanks

Administrator [Syncfusion]
Replied On December 15, 2004 10:20 PM UTC

You can use LoadBinary and SaveBinary which are members of the GridModel class. LoadBinary is static, so you use it through the class name. Here are some code snippets.
private void button2_Click(object sender, System.EventArgs e)
	//save to file

private void button1_Click(object sender, System.EventArgs e)
	//load from file
	this.gridControl1.Model = GridModel.LoadBinary(@"c:\mygrid.grd");

Private Sub button2_Click(sender As Object, e As System.EventArgs)
   ’save to file
End Sub ’button2_Click

Private Sub button1_Click(sender As Object, e As System.EventArgs)
   ’load from file
   Me.gridControl1.Model = GridModel.LoadBinary("C:\mygrid.grd")
End Sub ’button1_Click ’


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon