Click here to Skip to main content
Sign Up to vote bad
good
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:58
kia.sos317

Comments
satishgv1985 - 21 Sep '12 - 11:26
have you got any solution for this? Any idea that the recent rad grid supports this functionality?

2 solutions

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:16
What's your mind about temp location? DB, Ram, Or another place? I want just save to radgrid, and at client side.
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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 8,356
1 OriginalGriff 6,571
2 CPallini 3,533
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid