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

Binding to a Dataset

Thread ID:

Created:

Updated:

Platform:

Replies:

73623 May 13,2008 12:19 PM UTC May 16,2008 09:21 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: GridGroupingControl
santosh
Asked On May 13, 2008 12:19 PM UTC

hi,
How to bind the grid using a dataset.

plzz reply.

thanks.


Janagan [Syncfusion]
Replied On May 14, 2008 01:44 PM UTC

Hi Santosh,

You can bind the dataset to the grid by the following code:



protected void Page_Load(object sender, EventArgs e)
{
this.oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=" + Server.MapPath(@"nwind.mdb") + @";Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";

{
Session["Ds"] = "DS1";
this.GridGroupingControl1.DataSource = this.DSWhenSupplierIS4;



this.oleDbDataAdapter1.Fill(this.DSWhenSupplierIS4);
this.DataBind();
}
}




Please refer the sample in the link below which illustrates the above:

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.40/Grid_ASP_Dataset/main.htm


Please try running the sample and let me know if this helps.

Thanks,
Janagan.



santosh
Replied On May 15, 2008 12:37 PM UTC

Hi ,
thanks for the reply..what i did is I have added the aspx page to a new website and added the bin folder files to that.
but it is giving some error saying that
"Unknown element asp: Script manager"
what is the reason..plzz help me.

>Hi Santosh,

You can bind the dataset to the grid by the following code:



protected void Page_Load(object sender, EventArgs e)
{
this.oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=" + Server.MapPath(@"nwind.mdb") + @";Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";

{
Session["Ds"] = "DS1";
this.GridGroupingControl1.DataSource = this.DSWhenSupplierIS4;



this.oleDbDataAdapter1.Fill(this.DSWhenSupplierIS4);
this.DataBind();
}
}




Please refer the sample in the link below which illustrates the above:

http://websamples.syncfusion.com/samples/Grid.Web/6.2.0.40/Grid_ASP_Dataset/main.htm


Please try running the sample and let me know if this helps.

Thanks,
Janagan.





Janagan [Syncfusion]
Replied On May 16, 2008 09:21 AM UTC

Hi Santosh,

Thanks for the update.

The error caused is due to the absence of script resources in the web.config file.

Please refer the Web.config file in the link below:

http://www.syncfusion.com/support/user/uploads/Grid_ASP_web_d96565b.zip

Please try running the sample with the above web.config file and let me know if this helps.

Thanks,
Janagan.




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

;