Solved

ASP: Gridview Button field & AJAX

Posted on 2010-11-30
2
666 Views
Last Modified: 2012-05-10
Hi all,

More a hypothetical question at this stage; I am building a job-logging app in visual Studio using asp.net 4.0 C# (both of which I am new to having come from asp.net 2.0 vb & dreamweaver 8). So I  am now coming to the main screen that will enable the people processing the jobs to keep track of new jobs coming in and jobs in progress.

the jobs all follow the same life cycle so initially when the details are added the jobs appear at the top as "Job waiting" with a start button enabling someone to pick  that job up - this has in a previous version of the app redirected to a confirm start page - just to enable the transfer of info to the database before returning to the main screen where the job then appears as "in progress" and has been assigned a "start time" and an "operator" name.

So all I'm thinking is can this process be refined by using a single asp:gridview within an AJAX update panel where the button fields become the triggers? Or would I need to use a template field with asp:buttons inside it? Or am I asking the impossible. What I'd like to achieve is a button click i.e. the start job button which then adds the starttime, operator and refreshes the job in the gridview as being "In progress" with the start button gone and a pause & complete button in its place? I feel as though it is possible and then I doubt myself and think no its not...

Can anyone tell me if this is possible?

0
Comment
Question by:forsters
2 Comments
 
LVL 3

Accepted Solution

by:
svarogg earned 500 total points
ID: 34238809
Generally speaking, this is possible.

However, placing a GridView inside an UpdatePanel is not that trivial, and registering the buttons as triggers is pretty annoying to say the least.

Also, even if you do it, on each postback the whole grid will be refreshed - which is quite a big overhead.

What I'd suggest you do is use jQuery to send an AJAX request, and update only the affected row.
0
 

Author Closing Comment

by:forsters
ID: 34239521
Thanks for the response your comment supports what I was beginning to realise from looking at the .net & AJAX sites.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now