EditCommandColumn Question

V

Victor

Hi,

I'm using EditCommandColumn in my Datagrid. When I click Edit on certain
row, row shows textboxes. However, the width of text boxes is much larger
than I need to have.
Is there a way to specify width of textbox(es) in DataGrid during edit?

Thanks,
Victor
 
A

Arthur

if you create the column using a template field you can
control all aspects of the text box..

in this case I set columns=6 maxlength=3 and the
css="standard-text"

<asp:TemplateColumn SortExpression="Department"
headerText="CIC">
<ItemTemplate>
<asp:label ID="lblDepartment" Text='<%# DataBinder.Eval
(Container, "DataItem.Department") %>' Runat="server" />
</ItemTemplate>
<edititemtemplate>
<asp:textbox AutoPostBack=false CssClass="Standard-text"
Columns=6 Runat="server" ID="Department" Text='<%#
DataBinder.Eval(Container, "DataItem.Department") %>'
MaxLength="3"></asp:textbox>
</edititemtemplate>
 
D

dotnetway

I am having the same issue.

How can I customize the width of the text boxes / columns, in Edit Mode
(UpdateCommand event), when using AutoGenerateColumns?

Thanks
 
D

dotnetway

I am having the same issue.

How can I customize the width of the text boxes / columns, in Edit Mode
(UpdateCommand event), when using AutoGenerateColumns?

Thanks
 
D

dotnetway

I am having the same issue.

How can I customize the width of the text boxes / columns, in Edit Mode
(UpdateCommand event), when using AutoGenerateColumns?

Thanks
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top