473,387 Members | 3,801 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,387 software developers and data experts.

Customize Textboxes in EditCommandColumns

I am working on an EditCommandColumn for editing/deleting items from a
datagrid. I am wondering if it is possible to specify height, width,
and other various attributes to the textboxes that are generated.

Dim Item As TextBox = CType(e.Item.Cells(3).Controls(0), TextBox)

How would I go about editing that if I wanted, let's say, border solid,
1px, 100px wide, etc..?

Thanks in advance.

Nov 19 '05 #1
1 931
Will,

You may use the OnItemDatabound Event of the DataGrid to access the text
boxes. As each row's data is bound the OnItemDataBound event will be fired.
Inside of that event you may find each text box control.

I have a code example on my website that will help lead you in the right
direction. The example uses the technique I've described above to make a
DataGrid row clickable. To do so a button column is placed into the datagrid
and within the OnItemDatabound event it is found and referenced the way
you'll need to find and reference your text boxes.

If you go to my website, www.aboutfortunate.com, click the "Code Library"
link at the top of the page, and then use the search box there to search for
"Clickable Grid" or something similar you'll find the example you need.

If you need any further help feel free to respond here and/or to email me.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Will Lastname" <wh****@brinkster.net> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am working on an EditCommandColumn for editing/deleting items from a
datagrid. I am wondering if it is possible to specify height, width,
and other various attributes to the textboxes that are generated.

Dim Item As TextBox = CType(e.Item.Cells(3).Controls(0), TextBox)

How would I go about editing that if I wanted, let's say, border solid,
1px, 100px wide, etc..?

Thanks in advance.

Nov 19 '05 #2

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

Similar topics

4
by: T. Wintershoven | last post by:
Hello, I have a few textboxes placed on a SSTab control devided over 3 tabs Is there a way to clear all textboxes in one time in stead of one by one. Someone told me "Use for each item...
7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
3
by: Chris Kilmer | last post by:
I would like to be able to customize the path structure that VS.NET 2003 creates for projects. 1. I'd like to be able to create a project without VS.NET creating a folder for that project. ...
11
by: ian.davies52 | last post by:
Is there anything I can do about the apparent limit on the number of textboxes that have calculations as their control source on a form or report in ms-access? I have a query that pulls together...
0
by: Will Asrari | last post by:
I am creating a web setup project in Visual Studio .NET 2003 and have completed this task successfully. As of now the client who will be receiving this setup package will get the MSI along with a...
1
by: André Dumolas | last post by:
I use the setup project of Microsoft Visual Studio. I would like to customize one of the textbox in the user interface dialog box of my program setup. I would like to know if there is a way to...
5
by: DLN | last post by:
Getting rid of the Customize option. I want to get rid of the {Right-Click}-{Customize} option on the tool bars. I’ve been able to get rid of all the other options but not Customize itself. ...
0
Iman100
by: Iman100 | last post by:
Hi I have quiz (MCQ) data stored in my Database. I need to customize the question view to show the question then use RadioButtonList to display my choices. Is there is any tutorial or guide I can...
0
by: Sky | last post by:
I have an Access 2003 front-end database with custom toolbars. The toolbars work fine. One annoying feature is that at the far right edge of each custom toolbar there a small dropdown arrow....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.