Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Datagrid ClientID Numbering Problem

Reply
Thread Tools

Datagrid ClientID Numbering Problem

 
 
Aminoplacid
Guest
Posts: n/a
 
      08-17-2006
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

 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      08-26-2006
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.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Aminoplacid" <> wrote in message
news: oups.com...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get ClientID of a control added in the DataGrid ItemCreated event? DC ASP .Net 3 11-09-2006 12:33 AM
Setting Focus on Edit Row in Datagrid - how do I reference new clientid name??? jason@cyberpine.com ASP .Net 1 07-15-2005 08:16 PM
getting ClientID of control inside datagrid item Alexandre Soares ASP .Net 0 10-03-2004 04:54 PM
[ASP. NET VB .NET] clientID and ClientID Maras ASP .Net 1 10-15-2003 02:04 PM
Datagrid Template Column - Problem with ClientID John Wallace ASP .Net Datagrid Control 3 07-14-2003 07:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57