|
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
|
|
|
April 1st, 2005, 08:51 AM
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
April 1st, 2005, 09:26 AM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I doubt you can refresh the grid without postback.
|
April 6th, 2005, 07:48 AM
|
Registered User
|
|
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi
how can it be done?
I beleieve 99% it cant be done..
Regards
finny
|
April 6th, 2005, 08:08 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
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.
======================================
|
April 7th, 2005, 04:31 PM
|
|
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
April 7th, 2005, 07:52 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
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.
======================================
|
April 8th, 2005, 12:09 AM
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
April 8th, 2005, 03:59 AM
|
|
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I am not sure what you're asking here. What work around do you need? What's wrong with the XML object?
Imar
|
April 8th, 2005, 04:54 AM
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
April 10th, 2005, 03:16 PM
|
|
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|
|