473,320 Members | 1,861 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,320 software developers and data experts.

DetailsView edit and insert row widths

Is there a way to increase the width of the text boxes for the DetailsView
in edit or insert mode? When I put the control in either edit or insert
mode, the text boxes to type the new text are always much smaller than the
available space in the row.
Jan 22 '06 #1
2 2464
> Is there a way to increase the width of the text boxes for the DetailsView
in edit or insert mode? When I put the control in either edit or insert
mode, the text boxes to type the new text are always much smaller than the
available space in the row.


I do not know an obvious answer to that. However, there are two
possibilities:

a) use TemplateFields instead of BoundFields. this way you precisely define
how the edit/insert template looks like so you easily add required
attributes to TextBoxes that you place in templates (I prefer this techique)
b) write a DataBound event handler with a foreach loop for DetailsView's
rows. inside a loop you check if the row contains a TextBox and set
TextBox's width to 100% (I didn't exactly tested that in your scenario but I
use this technique constantly to tweak DetailsView's apperance in other
cases, for example to remove/disable buttons of a CommandField).

If another possibility exists I would be glad to learn it.

Regards,
Wiktor Zychla

Jan 22 '06 #2
Changing to template fields worked fine since there is a width attribute.

Thanks

"Wiktor Zychla [C# MVP]" <wzychla_ii.uni.wroc.pl> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Is there a way to increase the width of the text boxes for the
DetailsView in edit or insert mode? When I put the control in either edit
or insert mode, the text boxes to type the new text are always much
smaller than the available space in the row.


I do not know an obvious answer to that. However, there are two
possibilities:

a) use TemplateFields instead of BoundFields. this way you precisely
define how the edit/insert template looks like so you easily add required
attributes to TextBoxes that you place in templates (I prefer this
techique)
b) write a DataBound event handler with a foreach loop for DetailsView's
rows. inside a loop you check if the row contains a TextBox and set
TextBox's width to 100% (I didn't exactly tested that in your scenario but
I use this technique constantly to tweak DetailsView's apperance in other
cases, for example to remove/disable buttons of a CommandField).

If another possibility exists I would be glad to learn it.

Regards,
Wiktor Zychla

Jan 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jeffmagill | last post by:
Hi Everybody, I'm really hoping that someone can help me out because I have spent too much time on this project already! Basically, I have a DetailsView that handles all the Edits for a...
4
by: Kjell Arne | last post by:
Hi! I have a detailsview control in a webpart with some templated fields on. I set the ValidationGroup property to som value on these fields to distinguish from other web parts on the page....
0
by: mike | last post by:
Hi, When I programatically Bind a DataSource to DetailsView it does not fire "ModeChanged" event. This is first time i am trying to use ASP.NET DetailsView control. I have played with some of the...
2
by: rockdale | last post by:
Hi, I am upgrading my asp.net 1.x to asp.net 2.0. In my page I have a datagrid and a group of textbox, dropdownlist, checkbox... etc. the datagrid and the group of controls are hooked up - when...
1
by: Timothy H. Schilbach | last post by:
Hi Everyone, I am having a massive issue trying to get custom data into my DV. What I want to do is sooo simple: 1. I have a single DV on a page 2. I created my own template (see below) 3....
0
by: Andreas Wöckl | last post by:
HI Group! I am really getting crazy with my DetailsView. I have the following code initializing the Page where the DetailsView is in it: If Session("firmaNr") = 0 Then...
1
by: needhelp1 | last post by:
I have gridview with a detailsview below. When I click on 'New' in brings up the DetailsView for inserting. When I click on 'Edit' in does not brink up the DetailsView. What am I doing wrong? I...
2
by: David Ching | last post by:
I am not getting any response to my previous question on reusing a DetailsView to insert and edit the selected row in a GridView. So I'll ask an even more basic question. Newbie alert! ;) When...
0
by: gsauns | last post by:
I have a DetailsView which is inside of a FormView. I lifted this DetailsView straight off another one of my pages, where it was working beautifully. Now I get this endlessly frustrating error...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.