This is a migrated thread and some comments may be shown as answers.

Ho do I save changes to a datasource ...

4 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 1
Henrik asked on 29 Dec 2010, 09:53 PM

... i binded to in codebehind?

I Have started to get up and running with my small test-projekt for evaluating Telerik ...

I have managed to bind a datattable through NeedDatasource. Like this:

'Set datasource
ProductGrid.DataSource = New Products.Table(Client.ConnectionString)

The tableobject is a custom object wich inherit a Data.DatatTable wich has connection and adapter objects etc. Insert, Update and delete commands are generated and I can save all changes by simply calling

ProductTable.Save()
 
Nothing fancy about it ... When building WinForm I just bind to my table make some chnages in grid and then call save and voila ... Done!

But can I do this way too when working with RadGrid? Or do I have to retrieve all values and do a manual update?

//h

4 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 30 Dec 2010, 09:23 AM
Hello Henrik,

Yes you must extract that values and update them into the DataTable. RadGrid does not persist it's data source on postbacks. You can find more details how manually perform Update operations on the links bellow:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editmodes/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/extractvalues/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/grdupdatingvaluesusercontrolformtemplate.html

Regards,
Nikolay
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Henrik
Top achievements
Rank 1
answered on 30 Dec 2010, 10:09 AM
Problem is that I try to build up my grid dynamicly and as soon as I get something working something else is not working ...

Giving me gray hair :D

I really need to get in touch with someone in Telerik team to get some boost to see if RadGrid is right for us wich it does look to be but soooo hard to get going...

//h
0
Nikolay Rusev
Telerik team
answered on 04 Jan 2011, 05:42 PM
Hello Henrik,

What kind of problems you are creating RadGrid dynamically? Can you elaborate a bit more?

Greetings,
Nikolay
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Henrik
Top achievements
Rank 1
answered on 04 Jan 2011, 06:14 PM
Hi Nikolay!
Well I have got everything going now I think.
I have just posted some threads about UserControl-validations and that is our last part before we make a decision.

I build up grid dynimicly after a template we store in a table.

In short i have tablenames in a dropdown. When I select a tablename I look up template wich shows what column we are going to show to our customers.

We never use dataconnection-objects and all of your samples use them ...

I will post a sample-project for you to look at in a few days!

From what I have saeen this product has everything we need...

//h


Tags
Grid
Asked by
Henrik
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Henrik
Top achievements
Rank 1
Share this question
or