Link to home
Start Free TrialLog in
Avatar of fosiul01
fosiul01Flag for United Kingdom of Great Britain and Northern Ireland

asked on

How to change Height and width of text filed under dataview1 contorl

Hi, i have attached a picture to explain what i want.

its a filed under dataview1, Since its a comments filed. i want the width of this one to big. but dont know how.
any  advise would be realy  helpful.

Avatar of Velio
Flag of South Africa image

you can set the rows and cols properties, and set the TextMode to MultiLine.
do this either in your mark up or in the RowCreated event.
Avatar of fosiul01


Hi, thanks
but problem :
dataview is not giving me option to change any attributes for particuler filed from design mode

now if you say from markup

here is the code

<asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="ObjectDataSource1"
        Height="104px" Width="304px" AutoGenerateRows="False" DefaultMode="Insert">
            <asp:CommandField ShowInsertButton="True" />
            <asp:BoundField DataField="name" HeaderText="Name" SortExpression="name" />
            <asp:BoundField DataField="Entry_date" HeaderText="Date" SortExpression="Entry_date" />
            <asp:BoundField DataField="comments"  HeaderText="Comments" SortExpression="comments" />

I want to change the comments data filed. but here either i am not seeing any options

or it becuause, i dont know how to do this .

so please tell me how i will do that ?
ok convert the comments field to a template field (if you open up the Columns property editor there will be a link to do it for you).

presuming you only want the text-box when editting the item, apply the changes i suggested in the textbox that you'll find in the <EditItemTemplate> tag.
Avatar of Velio
Flag of South Africa image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
HI thanks its done as you said.
i will close this question now.
but i just opended another question related to this one,
if you can , give me some advise on that aswell please