Datagrid ClientID Numbering Problem

Discussion in 'ASP .Net Datagrid Control' started by Aminoplacid, Aug 17, 2006.

  1. Aminoplacid

    Aminoplacid Guest

    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
    Aminoplacid, Aug 17, 2006
    #1
    1. Advertising

  2. Aminoplacid

    Teemu Keiski Guest

    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:...
    > 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
    >
    Teemu Keiski, Aug 26, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. buran

    numbering rows in datagrid

    buran, Jul 7, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    462
    Saravana
    Jul 7, 2003
  2. Maras
    Replies:
    1
    Views:
    3,098
    Cowboy \(Gregory A. Beamer\)
    Oct 15, 2003
  3. buran

    numbering rows in datagrid

    buran, Oct 15, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    514
    Cowboy \(Gregory A. Beamer\)
    Oct 15, 2003
  4. buran

    numbering rows in datagrid

    buran, Jul 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    171
    Saravana
    Jul 7, 2003
  5. John Wallace

    Datagrid Template Column - Problem with ClientID

    John Wallace, Jul 10, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    221
    Per Hornshøj-Schierbeck
    Jul 14, 2003
Loading...

Share This Page