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

Insert/Update/Delete

4 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan C
Top achievements
Rank 1
Ryan C asked on 05 Mar 2010, 03:12 PM
Is there an example for a RadGrid with Insert/Update/Delete functions and thats not bind to any database. Basically the grid will be used to insert new data.

4 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 05 Mar 2010, 04:07 PM
Are you asking how to handle the insert/update/delete commands of the grid without using the automatic features of the RadGrid or are you asking how to handle those events to another datasource.

If it's the first one, where you want to handle the insert/update/delete commands yourself, you just need to handle the InsertCommand, UpdateCommand and DeleteCommand events of the grid.

I hope that helps.
0
Ryan C
Top achievements
Rank 1
answered on 08 Mar 2010, 09:07 AM
All I want is an interface (the RadGRid) to be able to insert/delete multiple new rows into my non existent table. So that when I click on the button "save" I have on below the page, I would be able to save all the details on the page into an actual table my database, and then save teh details in my "virtual" grid into another table binding with a foreign key with the newly created table.
0
Accepted
Radoslav
Telerik team
answered on 10 Mar 2010, 04:23 PM
Hello Ryan,

Please check out the following code library which explains how to create an Excel-Like-Grid with empty cells and DataItems set to the edit mode:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/excel-like-radgrid.aspx

To achieve the desired functionality concerning dynamically creating the tables into the database you could try creating the commands and execute an SQL statements from c# code behind. Following this approach you can create dynamically tables into the database and insert/update/delete rows to them.

Additionally please see the following blog posts which describes how to create database and table dynamically in c#.net code behind:
http://www.dotnetspider.com/forum/202939-How-create-database-table-dynamically-c-net-code-behind.aspx

I hope this helps.


Best wishes,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ryan C
Top achievements
Rank 1
answered on 11 Mar 2010, 10:13 AM

Thanks that what I was exactly looking for. All that is needed is a delete feature for the rows.
Tags
Grid
Asked by
Ryan C
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Ryan C
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or