Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Aidal #1
DataGrid Edit TextBox
Hi NG.
I'm having trouble controling the size of the textboxes that appear when the
user clicks the "edit" button for a row in my datagrid.
I know it can be done and I know it doesn't require much, but I just can't
seem to find out how to anyway.
If anyone could help me out with this little problem it would be much
appreciated :)
Thanks
/Aidal
Aidal Guest
-
Would like to load a datagrid already in edit mode instead of having the user click the edit button
Now my asp.net datagrid shows an edit button and clicking it puts the datagrid in edit mode. I would like to: 1) possilby load the page already... -
Set the width of the edit textbox after clicking on Edit link in datagrid...
Hi There, I have a data grid where I have a couple of columns as follows: ----------------------------------------- |id | textual... -
Textbox Font and Fontsize in Edit Mode
How do I change the textbox font and fontsize in Edit Mode? Thanks, -Dave -
DataGrid ItemStyle is a textbox and doesn't update the datagrid datasource
I have a datagrid with two columns, the first a normal bound column, the second is a template column created from a bound column. For the... -
Edit Datagrid - show textbox and dropdown
Hi All, I have a problem trying to edit the data in a datagrid control. I have 2 bound columns in the datagrid. I have added the following code... -
S.M. Altaf [MVP] #2
Re: DataGrid Edit TextBox
We'll help you, but what is the problem? All I got was that you wanted to control the size of the textboxes, but you'll need to be more specific than that.
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
[url]www.mendhak.com[/url]
"Aidal" <aidatheonly@hotmail.com> wrote in message news:dkd5rn$jt1$1@pomoranche.gu.net...
Hi NG.
I'm having trouble controling the size of the textboxes that appear when the
user clicks the "edit" button for a row in my datagrid.
I know it can be done and I know it doesn't require much, but I just can't
seem to find out how to anyway.
If anyone could help me out with this little problem it would be much
appreciated :)
Thanks
/Aidal
S.M. Altaf [MVP] Guest
-
Aidal Theonly #3
Re: DataGrid Edit TextBox
Umm..Hmm that's it more or less - I'm not sure what else there is to
explain about it.
I want to be able to control the size of the textboxes that appear when
I click an 'Edit' button for a line in my datagrid.
Currently they are too long (the default width) resulting in the
datagrid becoming wider when a row is in edit mode and that doesn't look
good.
So I wan't to make sure that the width of the grid doesn't change once
an 'edit' button is clicked.
So that if this [----this width----] was the original size of a textbox
when a row is in edit mode, the new version could be [-this width-].
I hope this helps clearify what it is I mean.
/Aidal
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Aidal Theonly Guest
-
alvinz_c #4
Re: DataGrid Edit TextBox
Hi, Aidal, you have two ways to do it. If you are using the BoundColumn, then
you can set the width of textbox in the ItemCreated event.
protected void dgrd_ItemCreated(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.EditItem)
{
TextBox txt = (TextBox)e.Item.Cells[X].Controls[0];
txt.Width = < the width you want it to be>;
}
}
Another way is set the TextBox's width declaractively in the TemplateColumn.
Hope this helps....
alvinz_c Guest



Reply With Quote

