473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to fix textbox width in grid

<asp:DataGrid ID="grdScrap" runat="server" Height="140px" OnItemCommand="datagrid11_ItemCommand"
OnSelectedIndexChanged="datagrid11_SelectedIndexCh anged" Width="668px" OnUpdateCommand="datagrid11_UpdateCommand"
OnItemDataBound="grdScrap_ItemDataBound" ShowFooter="True">
<Columns >
<asp:TemplateColumn>
<EditItemTemplate>
<asp:LinkButton runat="server" CommandName="Update" Text="Update"></asp:LinkButton>
<asp:LinkButton runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton runat="server" CausesValidation="false" CommandName="Edit" Text="Edit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>


hi i am use this code,
when i click on update link the value is appear in textbox's
i want to fix this text box length,how i can do this?

plz help.
Mar 7 '08 #1
1 1455
dip_developer
648 Expert 512MB
Cascading style sheets(CSS) can help you define a general style for the entire datagrid (which you discovered below) but also to specify individual columns' styles by specifying a cssClass for each DataBoundColumn by setting properties such as HeaderStyle-cssClass and ItemStyle-CssClass.This is an example where the textbox size, the background-color and the font is different for each column that overrides the default cssClass settings for the datagrid

look here...........
http://www.societopia.net/samples/Da..._cssClass.aspx
Mar 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ronald S. Cook | last post by:
Hi all, I have an ASP.NET DataGrid wherein there is an edit link for each row. Upon clicking the link, certan fields in that row display in text boxes so that they may be edited. I would like...
9
by: web1110 | last post by:
Hi y'all, I have resized the columns in a DataGrid and I want to set the width of the DataGrid to fit the columns. Just summing the column widths is too short due to the grid and gray row...
1
by: John Dalberg | last post by:
I have a datagrid plus a button to save the contents of the grid to the database. My code gets blanks in the textbox field. I am not sure why. Also I don't know why dgi.Cells.Controls &...
2
by: cindy | last post by:
New to 2.0, using code that works in 1.1, and all works well except cannot get the text out of the textboxes for updating the database. My template column looks like this: <asp:TemplateColumn...
3
by: keithb | last post by:
My code dynamically adds template fields to a GridView control. Everything seems to work OK, except when updating, because I haven't found a way to reference the dynamically added textboxes....
3
by: Gabriel | last post by:
Hello, Is there a way to add a Textbox to a GridView ? I'd like one TextBox by record. Thanks,
10
by: Per W. | last post by:
Is it possible to have dynamic size on a textbox? If the context is only one line then the box is only one line, but if the context is 10 lines then the box adjust to this? /Per W.
1
by: cyningeston | last post by:
OS: WinXP Pro, VB/ASP/ADO.NET I'm building a web-based supplier management application. For each supplier we are required by the FDA to track certain documents. I've managed to pull them from...
0
by: mutlyp | last post by:
I have a PreRender event to set the width of my textbox when the Edit button is pressed on my grid here is the code: Private Sub grdPBC_PreRender(ByVal sender As Object, ByVal e As...
2
by: mrutyunjaya | last post by:
hello, i have two textbox column and one button control in gridvie when i click button it will ask plese enter price in first textbox . when enter values it is asking again. how to pass...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.