Looking for a better solution

  • Thread starter Thread starter Ing. Rajesh Kumar
  • Start date Start date
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
 
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
 
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
 
Back
Top