473,401 Members | 2,127 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,401 software developers and data experts.

Controlling the html

Hi,

The datagrid auto generates html for everything in the grid, including
controls. Can you manipulate the html the grid outputs? Can you make this
auto generated name for a text box, dgdANSI835:_ctl2:type, into this
manipulated name for the text box, type_119789 (where 119789 represents a
unique row number)?

Thanks,

Andy

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200506/1
Nov 19 '05 #1
4 1018
Sure, but you'll have to use a TemplateColumn. In the TemplateColumn where
you declare the <asp:TextBox> just give it whatever ID="XYZ" you prefer.
The only problem is that it is contained inside of other controls, so the
ID that it will end up with in the broswer will be prefixed/scoped with the
container controls.

I suspect you're trying to do something specific here... Can you shed some
light on what you're trying to accomplish?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

The datagrid auto generates html for everything in the grid, including
controls. Can you manipulate the html the grid outputs? Can you make
this auto generated name for a text box, dgdANSI835:_ctl2:type, into
this manipulated name for the text box, type_119789 (where 119789
represents a unique row number)?

Thanks,

Andy


Nov 19 '05 #2
I want to compare the values from the textbox against the original data in
order to generate an update sql statement. I am trying to get the name of
the textbox to match the column name of the original data.

Brock Allen wrote:
Sure, but you'll have to use a TemplateColumn. In the TemplateColumn where
you declare the <asp:TextBox> just give it whatever ID="XYZ" you prefer.
The only problem is that it is contained inside of other controls, so the
ID that it will end up with in the broswer will be prefixed/scoped with the
container controls.

I suspect you're trying to do something specific here... Can you shed some
light on what you're trying to accomplish?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

[quoted text clipped - 7 lines]

Andy


--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200506/1
Nov 19 '05 #3
As far as I am aware you cannot. But once you understand the naming scheme it
is fairly easy to interact with them:

[containername](unless on parent form)__[controlname]__ctl[rowNum (1
based)]__ctl[columnNum(0 based)]

Also if you're using NUnitASP you can interact with them more directly,
please reply if you want me to expand on that.

Jason L Lind
Senior Software Engineer - Triton Tek
"Andy Sutorius via DotNetMonster.com" wrote:
Hi,

The datagrid auto generates html for everything in the grid, including
controls. Can you manipulate the html the grid outputs? Can you make this
auto generated name for a text box, dgdANSI835:_ctl2:type, into this
manipulated name for the text box, type_119789 (where 119789 represents a
unique row number)?

Thanks,

Andy

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200506/1

Nov 19 '05 #4
I didn't work with DataSet for a while. But look into DataGrid binding and
wording with dataset.
Shimon.

"Andy Sutorius via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in
message news:99******************************@DotNetMonste r.com...
I want to compare the values from the textbox against the original data in
order to generate an update sql statement. I am trying to get the name of
the textbox to match the column name of the original data.

Brock Allen wrote:
Sure, but you'll have to use a TemplateColumn. In the TemplateColumn where
you declare the <asp:TextBox> just give it whatever ID="XYZ" you prefer.
The only problem is that it is contained inside of other controls, so the
ID that it will end up with in the broswer will be prefixed/scoped with
the
container controls.

I suspect you're trying to do something specific here... Can you shed some
light on what you're trying to accomplish?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

[quoted text clipped - 7 lines]

Andy


--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200506/1

Nov 19 '05 #5

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

Similar topics

10
by: Ian Rastall | last post by:
I get the feeling this was just discussed, so sorry if this is redundant. I want to make my books site XHTML Basic, so it will look good on PDA's. Not knowing what to do, I simply switched...
3
by: yadavindrian01 | last post by:
Hi everybody I am a student of computer engg. I have to make a project - controlling devices through computer using parallel port. I know necessary details of the parallel port. Please guide...
5
by: Mainard | last post by:
Hi, all First off I know alittle about javascript, but i have never worked with controlling froms with it be for i wonder can some help me? for example:I have this <textarea name"write1">Write...
8
by: Andrey Mosienko | last post by:
We are using PostgreSQL about two years beginning from version 7.0. I have one question about starting postmaster: Is there way to detach it from the controlling terminal under FreeBSD? My...
3
by: leo | last post by:
Hello Guys I have this problem in controlling a text in a Text Area. How can I do that, for example the field size is 200, when it reaches 50 it automatically goes to the next line. Because im...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
2
by: Hymer | last post by:
Hello, I have a footer at the end of each article in my blog at http://www.usernomics.com/news/user-interface-design-news.html . The footer looks perfect in IE but has smaller text in Firefox...
1
by: Mario Figueiredo | last post by:
Hello everyone, I'm having trouble controlling the cursor position when I make two consecutive calls to the get family of functions. This problem does not happen if there is an output in...
3
by: Herb | last post by:
I've found how to use javascript to embed a Windows Media Player in a web page. How do I go about controlling the player in response to user input? There should be calls to start, stop and also...
6
by: Eric_Dexter | last post by:
I am having trouble contolling vim with subprocess on a windows machine. It appears that vim comes up on the machine all right and it sometimes looks like it is doing the searchs what I am asking...
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: 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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.