Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Custom Column Widths

Reply
Thread Tools

Custom Column Widths

 
 
cbanks@bjtsupport.com
Guest
Posts: n/a
 
      12-28-2005
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

 
Reply With Quote
 
 
 
 
Mike MacMillan
Guest
Posts: n/a
 
      12-28-2005
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


http://www.velocityreviews.com/forums/(E-Mail Removed) 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


 
Reply With Quote
 
 
 
 
cbanks@bjtsupport.com
Guest
Posts: n/a
 
      12-28-2005
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

 
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
Setting column widths in DataList? Rachel Devons ASP .Net 1 06-19-2005 09:56 AM
Datagrid column widths in edit mode =?Utf-8?B?RWxtZXI=?= ASP .Net 4 04-19-2005 12:25 AM
datagrid column widths - remember after postback wh1974 ASP .Net 1 01-11-2005 04:13 PM
Data Grid Column Widths sck10 ASP .Net 3 11-15-2004 12:39 PM
More Elegant Column Widths in ASP:Table Objects? =?Utf-8?B?QWxleCBNYWdoZW4=?= ASP .Net 1 05-14-2004 07:38 PM



Advertisments