Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specifiying a style for a EditCommandColumn

Status
Not open for further replies.

pat333

Programmer
Feb 14, 2003
2
GB
Hi,

I have constructed a basic datagrid with an EditCommandColumn. The a user clicks the 'edit' link to edit a specific row, textboxes fill the row for editing as expected, but the font and font-size of the input textboxes is different to that in the grid originally, so the grid changes size. How can I specify a style for the input text boxes that appear when using EditCommandColumn?

The code for the grid is currently:
Code:
<ASP:DataGrid id=&quot;InvoiceList&quot;
runat=&quot;server&quot;
BorderColor=&quot;Black&quot;
BackColor=&quot;#EEEEEE&quot;
CellPadding=&quot;3&quot;
Width=&quot;549px&quot;
HeaderStyle-BackColor=&quot;#ffffff&quot;
Font-Size=&quot;8pt&quot; Font-Name=&quot;Verdana&quot;
OnEditCommand=&quot;InvoiceList_EditCommand&quot;
OnCancelCommand=&quot;InvoiceList_CancelCommand&quot;
OnUpdateCommand=&quot;InvoiceList_UpdateCommand&quot;
AutoGenerateColumns=&quot;False&quot;>
<HeaderStyle height=&quot;20px&quot; backcolor=&quot;White&quot;></HeaderStyle>
<Columns>
<asp:BoundColumn DataField=&quot;DateCreated&quot; HeaderText=&quot;Date&quot; ReadOnly=&quot;true&quot;></asp:BoundColumn>
<asp:BoundColumn DataField=&quot;InvoiceID&quot; HeaderText=&quot;Invoice ID&quot;></asp:BoundColumn>
<asp:BoundColumn DataField=&quot;CompanyName&quot; HeaderText=&quot;Company&quot;></asp:BoundColumn>
<asp:BoundColumn HeaderText=&quot;Paid&quot;/>
<asp:BoundColumn DataField=&quot;Amount&quot; HeaderText=&quot;Amount&quot; DataFormatString=&quot;{0:c}&quot;></asp:BoundColumn>
<asp:BoundColumn DataField=&quot;AmountVAT&quot; HeaderText=&quot;Amount + VAT&quot; DataFormatString=&quot;{0:c}&quot; ReadOnly=&quot;true&quot;></asp:BoundColumn>
<asp:EditCommandColumn  EditText=&quot;Edit&quot; UpdateText=&quot;Update&quot; CancelText=&quot;Cancel&quot;/>
</Columns>
</ASP:DataGrid>

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top