I am working on an application that displays a grid with dropdownboxs
in various parts of this grid. Now the entire gird is generated
dynamically based on user interaction, so i have put the code required
to generate this grid in an .ascx file. Here is my problem:
My grid is generating perfectly, but I am stuck on this on part: I
currently have the functionality that is the user changes an item in
any of the dropdowns, the form will postback to itself, however, i am
unable to get the selectedIndex.Text or Value.
first let me share with you how i create the drop downboxes:
hwriter.WriteBeginTag("select")hwriter.WriteAttrib ute("name",
i.ToString)hwriter.WriteAttribute("OnChange", " " &
Page.GetPostBackEventReference(Me,
Me.UniqueID))hwriter.Write(HtmlTextWriter.TagRight Char)hwriter.WriteBeginTag("option")hwriter.WriteA ttribute("value",
"ins~" & intUsers(i).ToString & "~" & intLinkId.ToString & "~" &
dt.Rows(x).Item("roleValue"))hwriter.WriteAttribut e("selected",
"selected")hwriter.Write(HtmlTextWriter.TagRightCh ar)hwriter.Write(dt.Rows(x).Item("name"))hwriter.W riteEndTag("option")
The way the above code is laid out, when a postback occurs, my
eventArgs is the value of: 'Me.UniqueID' which does me no good. I have
looked through my VS.Net help files and there are examples on how to do
this with button and raising the click event, I can not duplicate this
for the onChange event??? Any help as to how I can get the values of
the selected item would be greatly appreciated 1 1027
zoneal,
I have some sample code on my website that shows how to add a checkbox to a
datagrid and then find which checkbox was checked via the checkboxes
autopostback. While the code isn't quite what you're trying to do the
process will be very similar.
If you'd like to take a look at the sample code to see if it leads you in
the right directio go to: http://www.aboutfortunate.com?page=codelibrary and
then use the search box there to search for: "datagrid checkbox".
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<zo****@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com... I am working on an application that displays a grid with dropdownboxs in various parts of this grid. Now the entire gird is generated dynamically based on user interaction, so i have put the code required to generate this grid in an .ascx file. Here is my problem:
My grid is generating perfectly, but I am stuck on this on part: I currently have the functionality that is the user changes an item in any of the dropdowns, the form will postback to itself, however, i am unable to get the selectedIndex.Text or Value.
first let me share with you how i create the drop downboxes:
hwriter.WriteBeginTag("select")hwriter.WriteAttrib ute("name", i.ToString)hwriter.WriteAttribute("OnChange", " " & Page.GetPostBackEventReference(Me, Me.UniqueID))hwriter.Write(HtmlTextWriter.TagRight Char)hwriter.WriteBeginTag("option")hwriter.WriteA ttribute("value", "ins~" & intUsers(i).ToString & "~" & intLinkId.ToString & "~" & dt.Rows(x).Item("roleValue"))hwriter.WriteAttribut e("selected", "selected")hwriter.Write(HtmlTextWriter.TagRightCh ar)hwriter.Write(dt.Rows(x).Item("name"))hwriter.W riteEndTag("option")
The way the above code is laid out, when a postback occurs, my eventArgs is the value of: 'Me.UniqueID' which does me no good. I have looked through my VS.Net help files and there are examples on how to do this with button and raising the click event, I can not duplicate this for the onChange event??? Any help as to how I can get the values of the selected item would be greatly appreciated This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Matt Fielder |
last post by:
I have developed a custom control to be used in my application. My
application includes a form designer, so the control can be hosted while
designmode for the control is either true or false,...
|
by: CMEDIA_SOUND |
last post by:
I have a peculiar problem,
I have a tabpage with a label control on it. When i set a background
image to the tabpage and drag the label around it has paint issues in
that it is slow, granted the...
|
by: anand |
last post by:
Hi all,
I have created a custom control which displays Image using Graphics..
I am using this control in a different windows application.
I am dynamically creating the control and putting that...
|
by: waltborders |
last post by:
Hi,
Because the blind are unable to use a mouse, keyboard navigation is
key. A major difficulty is that not all windows forms controls are
keyboard 'tab-able' or 'arrow-able' or have "tab...
|
by: Eric |
last post by:
I have built a composite user web control that I want to create dynamically.
The form will contain a variable number of these controls and as well some
of the contents of the user web control...
|
by: Lamont Adams |
last post by:
Hi all,
I've created numerous custom controls of varying complexity, but I've been
on this problem for a day and a half, and I can't figure this mystery out. I
hope one of you kind folks can...
|
by: Brian Henry |
last post by:
I am trying to make a custom user control that gets a list of users from our
database and populates the list, its an owner drawn control also, the
problem is, I placed the item onto a form and...
|
by: Dino Buljubasic |
last post by:
Hi,
I am using C# 2.0 (VS2005) to build my user control that contains a
number of dynamically loaded ListViews. ListViewItems have their
ForeColor properties set to either black or blue to...
|
by: Tomasz J |
last post by:
Hello Developers,
I have a control derived from System.Web.UI.WebControls.WebControl. Control
has this property:
public string Value
{
set { _value = value; }
get { return _value; }
|
by: tlhintoq |
last post by:
Situation:
A Windows Form with a single User Control containing 4 custom controls. This lets me drop the User Control on its own form to make it a dialog, or make it part of a larger configuration...
|
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,...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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...
| |