473,623 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid same row change/alter

I have a question about the asp.net datagrid in c#. i have the following
grid...

<asp:datagrid id="RosterList " runat="server" Font-Names="Verdana"
BorderColor="Bl ack" GridLines="Vert ical"
cellpadding="4" Font-Name="Verdana" Font-Size="8pt"
AlternatingItem Style-CssClass="CartL istItemAlt"
AutoGenerateCol umns="False">
<AlternatingIte mStyle CssClass="CartL istItemAlt"></AlternatingItem Style>
<Columns>
<asp:BoundColum n HeaderText="Nam e" DataField="Mana gerName" />
<asp:TemplateCo lumn HeaderText="Tea m Code">
<ItemTemplate >
<asp:ListBox id="lstTeamCode " runat="server" Rows="1" />
</ItemTemplate>
</asp:TemplateCol umn>
<asp:TemplateCo lumn HeaderText="Tea m Name (Optional)">
<ItemTemplate >
<asp:Textbox id="newname" runat="server" Text="" />
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>

Basically, when you change the selected index in the "lstTeamCod e" control,
i want to change the text of the "newname" text box. What's the easiest way
to code this? I can think of a few ways to jury rig it, but I wanted to know
the best/easiest way. Like how do I reference the particular "lstTeamCod e"
control for the particular row? How do I know what the datagrid row number
of the relevant "lstTeamCod e" control? I know I have to add the event to the
"lstTeamCod e" but i'm not sure how to reference the relevant "newname" text
box in the relevant row. Any suggestions?

Thanks.
Nov 15 '05 #1
0 1219

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

Similar topics

1
21253
by: Bruce | last post by:
Hi, I want to change the datatype of an existing column from char to varbinary. When I run the "Alter Table" statement, I get the following error message - Disallowed implicit conversion from data type char to data type varbinary, table 'test.dbo.testalter', column 'col1'. Use the CONVERT function to run this query.
6
9167
by: Lauren Wilson | last post by:
Hi Folks, I am totally confused about the following: 1. Is it possible to change the size of an EXISTING TEXT table field in Access 2k or later using DAO or ADO code? 2. If so, does anyone have some sample code? I have ransacked all my documentation to find the answer to no avail. Please advise ASAP!
4
12813
by: Dave Petersen | last post by:
How do I set the color of a particular column in my C# winforms datagrid? Thanks, Dave
2
1877
by: Dave | last post by:
Hello. How can I field value in ItemDataBound event of the DataGrid control? I'm writing: e.Item.Cells.Text; But this always returns empty string:( Thank You.
2
1070
by: Carl | last post by:
How can change the Header of a Datagrid? for example: dpr_id change to dprno thanks, Carl
1
4348
by: Andrew | last post by:
I'm adding this as it to me a while to figure out all the pieces to be able to do this without using Microsoft.Office.Interop which caused me problems on the web-server. Streaming is the easy part, but I couldn't initially work out how to manipulate the page setup to change page margins and orientation, that's why I was looking at Microsoft.Office.Interop. But with Microsoft.Office.Interop I couldn't fiure out how to stream HTML...
2
2600
by: | last post by:
Hi all. I need to change datagrid rows height dinamically, so each row shows all the text contained in the cell. There is a "PreferredRowHeight" property in the TableStyle of a datagrid, but it change all rows height to the same value. I need to have different row heights. Can you help me?? Bye Francesco
2
1485
by: Agnes | last post by:
I got a true or false column in my Datagrid, The datafield is "bit" in the sql tables, However, I want to display "A" if the field is true, "B" is false . Is this possible to do ?? or I should add one more field in my tables and put "A"or "B" in it ? thanks
11
4078
by: raylopez99 | last post by:
Keep in mind this is my first compiled SQL program Stored Procedure (SP), copied from a book by Frasier Visual C++.NET in Visual Studio 2005 (Chap12). So far, so theory, except for one bug (feature?) below. At some point I'm sure I'll be able to laugh about this, akin to forgeting a semi-colon in C/C++, but right now it's frustrating (time to sleep on it for a while). Problem-- For some reason I get the error when trying to save files...
0
8217
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8661
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8460
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6104
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4067
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2590
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1467
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.