Datagrid with AJAX

C

CC

Hello to everyone. First of all excuse my very poor english. This comes from
Spain.

I´ve a datagrid with textboxes and checkboxes. User makes changes, but
changes are made only when user press a button.

Now i´ve to change it, and make changes (updates in database) in
'background' each time user makes a change (lostfocus of a textbox).

This changes have to be as invisible as possible for user. I´ve achieved
this, but each change has its correspondent page 'reload'.

Is possible to make changes but without 'refreshing' pages.

A friend has talk me about AJAX or ATLAS, but i´ve no idea about this.

Any help, example will be wellcome.


Carlos
 
B

Bruno Alexandre

Hola,

I already posted here a message about ATLAS... and I think that's what you
need, but remember!
While you are Updating the DB the user can't do anything! unless you turn
that assyncronaly, and that I never did, so I can't help you with that.

to use ATLAS, all you need to do is:

1. go to http://atlas.asp.net/ download teh framework, and installed
2. open VS2k5 and create a new ATLAS Website
3. copy the web.config file and paste it in your own web.config
4. copy the BIN folder and paste it to your project

now the code:

5. after you have everything running as you need/wanted using normal
PostBacks, add a ScriptManager tag to the code (fisrt lines after <form>
like this:

<atlas:ScriptManager runat="server" id="sm"
EnablePartialRendering="true" />

6. involve your GRIDVIEW tag with atlas:UpdatePanel tag, like:

<atlas:updatepanel runat="server" ID="up1" Mode="Always">
<ContentTemplate>
<asp:DataGrid ...
</ContentTemplate>
</atlas:updatepanel>

7. RUN the code :-D

8. if you want to have a label shoowing for example "updating..."
everytime you are performing a request to the Database from your GridView,
just add the code:

<atlas:UpdateProgress runat="server" ID="pp">
<ProgressTemplate>
<div style="background-color:Gray; color: Red; font-weight:
bold;">loading...</div>
</ProgressTemplate>
</atlas:UpdateProgress>

where you want to show the label...

any quesstion, just ask :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top