Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2005, 08:51 AM
Authorized User
 
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Baby_programmer Send a message via MSN to Baby_programmer Send a message via Yahoo to Baby_programmer
Default Updating DataGrid without PostBack/Refresh

Hi!
friends i have a serious problem ... i want to refresh the grid without postback please help me ... if any budy have some sample code please tell me ....
i'll be thankfull for your response
Bye

ashfaq
__________________
Baby Prgrammer
 
Old April 1st, 2005, 09:26 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

I doubt you can refresh the grid without postback.

 
Old April 6th, 2005, 07:48 AM
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi
how can it be done?
I beleieve 99% it cant be done..

Regards
finny

 
Old April 6th, 2005, 08:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

A datagrid represents data from a datasource.
The datasource is on the server.
If you wish to refresh it then I assume the data for the grid is to change.

You can not change the data in the datasource or rebind the grid on the client.

Tell us why you dont want to do postback.

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old April 7th, 2005, 04:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, you can, using client side callbacks. Search Google for client side callbacks .NET and you'll find some useful results:

http://www.google.com/search?hl=en&l...lbacks%22+.NET

It's not easy to get it cross-browser, and it can be a bit tricky, but once it works, it's a wonderful concept.

Cheers,

Imar
 
Old April 7th, 2005, 07:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I stand corrected, my apologies.
I was aware of the js call back function but had not really considered updating an entire datagrid with it.
Thanks Imar for that, I have a use for that myself.

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old April 8th, 2005, 12:09 AM
Authorized User
 
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Baby_programmer Send a message via MSN to Baby_programmer Send a message via Yahoo to Baby_programmer
Default

Hi!
friends i know that it can be done in asp2.2 but i want it in asp.net1.x which is possible by some object HTTPXML or what ever..
if some of you have any work around about this problem....
(PROBLEM: i have a massive datagrid and when i will update the row the page will post back and will cause performance hit ...)

ashfaq
 
Old April 8th, 2005, 03:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am not sure what you're asking here. What work around do you need? What's wrong with the XML object?

Imar
 
Old April 8th, 2005, 04:54 AM
Authorized User
 
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Baby_programmer Send a message via MSN to Baby_programmer Send a message via Yahoo to Baby_programmer
Default

Dear imar!
Actually datagrid is having huge data and updating each row causes data bnding which is tooooo expensive..can u help in a work around that if i use the iframe which will only contain the message like "record saved sucessfully etc" and i postback that page in iframe instead of page having datagrid...in this way database will update...and the grid will be updated at client side...
i have a code which updates the label after 3 seconds without post back but i dont know what should i do with datagrid binding at client side.


ashfaq
 
Old April 10th, 2005, 03:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

First of all, I wouldn't bind huge amounts of data to a datagrid.
Displaying all that data once causes usability and performance issues. Why not have a smart stored procedure that only retrieves, say 10 rows and then display those rows in a DataGrid with paging?

Otherwise, client side call backs are the answer. They allow you to "post back" to the server, update the database. Then you can manually update the row in the grid with the data the user provided (as opposed to the true data stored in the database).

Did you experiment with client side call backs? Did you try any of the examples? Are you having specific questions, or problems with certain code?

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
F5 (Refresh) adds a new record after postback krainov BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 20th, 2007 10:10 AM
Page Refresh on first postback slim182 ASP.NET 2.0 Basics 4 February 20th, 2007 08:22 PM
Custom Postback and Gridview refresh wirerider ASP.NET 2.0 Basics 5 February 28th, 2006 04:33 PM
Refresh DataGrid without PostBack Baby_programmer Classic ASP XML 1 April 2nd, 2005 04:22 AM
Refresh a combobox without postback Eddy ASP.NET 1.x and 2.0 Application Design 1 March 10th, 2004 12:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.