Click here to Skip to main content
12,452,083 members (25,070 online)
Rate this:
 
Please Sign up or sign in to vote.
I want to add record on fly by radgrid at client side.
I have some textbox and two buttons (Insert and Submit) to add information in radgrid.

My senario is:
When user enter her/his info into textbox and click on the insert button, value of textbox must be inserted into a new row of radgrid at client side without save them into database or postback. In the final user click on the submit button, then all rows in radgrid save in database.

I see this and this demo online, but in both of them using webservice and bind grid from database.
How I can do my senario?
Thank's
Posted 4-Jul-11 21:58pm
kia.sos461
Comments
satishgv1985 21-Sep-12 11:26am
   
have you got any solution for this?
Any idea that the recent rad grid supports this functionality?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Teleric has forums. However, at the core, it makes more sense to make webservice/AJAX calls, even if you store them to a temp location and then store in your DB at the end. It's hard to create values dynamically and then read them on postback, much easier to send them with AJAX.
  Permalink  
Comments
kia.sos 5-Jul-11 5:16am
   
What's your mind about temp location? DB, Ram, Or another place?
I want just save to radgrid, and at client side.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

I got a solution for this. After much research I found a way that helps to acheive the desired functionatlity.
Use a AJAX modal popup on click of "Add New Row". In the popup display all the fields on click of "Add" in popup close the popup write a button click event write a logic to add a new row to the radgrid and rebind the grid. For the newly added rows use the ID column with -1.
In the next addition of rows use the incremental -1 for all the added rows. Finally you can push all the newly added rows into the DB.

All of this is done inside ajax panel, so I didnt see any delay in row additions.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100