edit/update in Datagrid

Discussion in 'ASP .Net Web Controls' started by Ignacio Martinez, Sep 5, 2003.

  1. Hey group!
    I created a Datagrid with Edit/update commands, and it works great, but I
    need to change the size of the textbox's that are shwon on my non-readonly
    columns.
    Is this possible? and Is it possible to get a binded dropdownlist instead of
    a textbox on edit mode?

    thanx in advance!
    Ignacio
     
    Ignacio Martinez, Sep 5, 2003
    #1
    1. Advertising

  2. Ignacio Martinez

    vMike Guest

    Try something like this (snip). you will have to play with it a bit as one
    box seems to effect the size of the other.

    Public Sub Display2_ItemDataBound(sender As Object, e As
    DataGridItemEventArgs)

    if display2.EditItemIndex > -1 then
    if display2.EditItemIndex = e.item.itemindex then
    ctype(e.Item.Cells(3).controls(0),textbox).Width = Unit.Pixel(35)
    ctype(e.Item.Cells(6).controls(0),textbox).Width = Unit.Pixel(45)
    ctype(e.Item.Cells(7).controls(0),textbox).Width = Unit.Pixel(35)
    .....


    "Ignacio Martinez" <> wrote in message
    news:...
    > Hey group!
    > I created a Datagrid with Edit/update commands, and it works great, but I
    > need to change the size of the textbox's that are shwon on my non-readonly
    > columns.
    > Is this possible? and Is it possible to get a binded dropdownlist instead

    of
    > a textbox on edit mode?
    >
    > thanx in advance!
    > Ignacio
    >
    >
     
    vMike, Sep 6, 2003
    #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. Hartmut Schroth
    Replies:
    3
    Views:
    3,543
    Hartmut Schroth
    Dec 1, 2003
  2. Schultz
    Replies:
    3
    Views:
    597
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 14, 2005
  3. Andreas Klemt
    Replies:
    0
    Views:
    334
    Andreas Klemt
    Oct 8, 2003
  4. Kostia
    Replies:
    1
    Views:
    286
    Scott Mitchell [MVP]
    Feb 26, 2004
  5. Replies:
    1
    Views:
    353
Loading...

Share This Page