Looking for a better solution

I

Ing. Rajesh Kumar

Hi Everybody
I have a web application where i am reading data into a Dataset from a *.xml file and binding it to a datagrid so i can edit it in the web form.
The same Dataset i am entering into a Textbox so a JavaScript function can read it every 30 seconds and check some status and pop up a message if needed.

Everything is working fine, but i don't think that entering the same data into two different controls is a good idea so i just wanted to ask if there is an elegent way of doing this so I can remove the textbox and read data from the DataGrid at the client side or do something similar ?

Thanks in advance
Raja
 
Z

Zuzar Lakdawala

Hi Rajesh,
What alternatively you could do is that at the time of binding your data to the datagrid you can trap the item data bound event of the datagrid, and in this event handler you can set a hidden fields, and then read it from the client side and do whatever you want to do.


Regards,
Zuzar L.

Hi Everybody
I have a web application where i am reading data into a Dataset from a *.xml file and binding it to a datagrid so i can edit it in the web form.
The same Dataset i am entering into a Textbox so a JavaScript function can read it every 30 seconds and check some status and pop up a message if needed.

Everything is working fine, but i don't think that entering the same data into two different controls is a good idea so i just wanted to ask if there is an elegent way of doing this so I can remove the textbox and read data from the DataGrid at the client side or do something similar ?

Thanks in advance
Raja
 
N

Natty Gur

Hi,

DataGrid render as Table to the browser so you can decently use DHTML +
Java script to get values out of that table. You can use
RegisterClientSideScript together with control ClientID (return control
ID that will be render on client side) to render client side script that
get values from Grid table.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 

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,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top