Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP: Gridview Button field & AJAX

Posted on 2010-11-30
2
Medium Priority
?
679 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 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Screencast - Getting to Know the Pipeline

916 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