Solved

ASP: Gridview Button field & AJAX

Posted on 2010-11-30
2
667 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
grab and show facebook pages event calendars 6 65
JavaScript error 1 53
SQL Exceptions 3 40
how to avoid redundand ajax calls 5 11
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 …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 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

21 Experts available now in Live!

Get 1:1 Help Now