Datagrid ClientID Numbering Problem

A

Aminoplacid

Hi,
I had been working on a highly customized .NET 1.1 datagrid for a
project with lots of javascript iterating through my datagrid. I had
installed .NET 2.0 a while back and no problems. I had installed SQL
Server Management Studio: no problems. I had just installed Visual
Studio 2005 yesterday (for Reporting Services) and now when I run my
application (from VS 2003), the datagrid numbering format is all
screwy. For rows 1-9, the format was
[datagridid]__ctl[rownum]_[itemid]. Now it is
[datagridid]__ctl0[rownum]_[itemid]. For example,
grdDataGrd__ctl2_ItemName is now grdDataGrd__ctl02_ItemName.
I had installed my app on my managers laptop (2 weeks prior) and got
the same behavior, too.
Any ideas why this is? What can I do short of rewriting all my
javascript to accomodate this? Anyone else come across this?
Thanks for the ideas.
Derek Baker
 
T

Teemu Keiski

Hi,

ClientID property of a control gives you the ID which is used at client-side
as id for scripting. It mean you should design your javascript so that they
can take in references to DOM objects (or ida) and these references(or ids)
are passed by generating scripts at server-side utilizing ClientID property
of a control. For example to output a javascript array consisting of all ids
of TextBoxes located in a gridView.
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top