Solved

ASP: Gridview Button field & AJAX

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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