Custom Column Widths

Discussion in 'ASP .Net Building Controls' started by cbanks@bjtsupport.com, Dec 28, 2005.

  1. Guest

    I have a datagrid which displays five columns of data. Since several
    columns display "Y" or "N" or 1-9 I have modified all the column widths
    to display my data. Under normal viewing, the grid looks great when
    filled with data. When I go into an edit mode on a row, everything
    get's messed up. Some columns go narrow, while others go wider (not
    like a 'default' grid).
    Is there a way to maintain custom widths when you go into an edit mode?
    I have two buttons at in the last two columns; Edit and Delete, which
    become Update and Cancel.

    Thanks
    Charles
    , Dec 28, 2005
    #1
    1. Advertising

  2. cbanks,
    when you edit a row, custom html is written to handle editing that
    could possibly skew a table with strictly sized column widths. try
    overriding the EditItemStyle property of the DataGrid control to
    provide your own style for the edit controls.

    hope this helps,
    Mike MacMillan


    wrote:
    > I have a datagrid which displays five columns of data. Since several
    > columns display "Y" or "N" or 1-9 I have modified all the column widths
    > to display my data. Under normal viewing, the grid looks great when
    > filled with data. When I go into an edit mode on a row, everything
    > get's messed up. Some columns go narrow, while others go wider (not
    > like a 'default' grid).
    > Is there a way to maintain custom widths when you go into an edit mode?
    > I have two buttons at in the last two columns; Edit and Delete, which
    > become Update and Cancel.
    >
    > Thanks
    > Charles
    Mike MacMillan, Dec 28, 2005
    #2
    1. Advertising

  3. Guest

    Mike,

    I looked at html before writing to the board, which is why I thought I
    was missing something. I saw the styles for select, edit and
    alternating items, which all match what I want. I also only saw one
    entry for each of my columns that also had all the correct settings.
    My edit item matches all other settings:
    <ItemStyle Font-Size="Smaller" Font-Names="Arial"></ItemStyle>
    <EditItemStyle Font-Size="Smaller" Font-Names="Arial"></EditItemStyle>
    Could you please tell me if I need something more?

    Thanks
    , Dec 28, 2005
    #3
    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. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    More Elegant Column Widths in ASP:Table Objects?

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, May 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    552
    Jason DeFontes
    May 14, 2004
  2. sck10

    Data Grid Column Widths

    sck10, Nov 8, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    7,727
    Steven Cheng[MSFT]
    Nov 15, 2004
  3. wh1974
    Replies:
    1
    Views:
    1,574
    =?Utf-8?B?RmVybmFuZG8gSHVudGg=?=
    Jan 11, 2005
  4. =?Utf-8?B?RWxtZXI=?=

    Datagrid column widths in edit mode

    =?Utf-8?B?RWxtZXI=?=, Apr 8, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,427
    =?Utf-8?B?RWxtZXI=?=
    Apr 19, 2005
  5. Rachel Devons

    Setting column widths in DataList?

    Rachel Devons, Jun 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    998
    Eliyahu Goldin
    Jun 19, 2005
Loading...

Share This Page