Ask a Question related to ASP.NET Building Controls, Design and Development.
-
studen771 #1
ListItemCollection[index].Selected property not updating
Thanks in advance to anyone who can help :)
I have a custom control that includesa ListItemCollection property that
allows clients using it to dynamically add/remove/etc items just as you would
a normal ListBox.
However, my control uses the HtmlTextWriter to render an html <select> which
adds the ListItemCollection Items into it manually in the "RenderContents"
method.
When debugging the control, I'll add an item to the <select> element via the
NumberListCollection.Add property. After selecting one of the items and
having the list checked to see what was selected, it does not recognize it.
Should I be doing someting with the "selected" attribute of the select
element? I don't wanna use a ListBox server control either..
studen771 Guest
-
tabnavigator determine selected index
I am having some trouble with a datagrid inside a tabnavigator. I have tabs that can be added dynamically. What I am trying to do is a search... -
Strange behavior when setting gridview selected index
Hello there, I have an asp.net 2.0 web app that uses gridview and formview. When a user selects an item in the gridview the formview appears to... -
.Selected property for listbox does not work
Hi I have written a code for showing the list boxes as selected using a Listitem and the selected property of the items. Now I have 2 list boxes... -
Needed: Index to a selected DataView row
Hi, I've got a DataGrid bound to a DataView that is sorted. ("Aha!", I hear you saying.) When I go to EditMode I get the right DataRow, but I... -
Drop down list selected index
I am populating a drop down list with a privilege levels from a table called "Privilege" with the fields "PrivilegeID" and "PrivilegeName". In a... -
Gaurav Vaish \(www.EdujiniOnline.com\) #2
Re: ListItemCollection[index].Selected property not updating
> When debugging the control, I'll add an item to the <select> element via
What's the key against which you are trying to get the data?> the
> NumberListCollection.Add property. After selecting one of the items and
> having the list checked to see what was selected, it does not recognize
> it.
What do you mean when you say "it does not recognize it"?
Who is first "it"? What is the second "it"? How are you retrieving the data?
Do you have a 'name' attribute to the 'selected' element?> Should I be doing someting with the "selected" attribute of the select
> element? I don't wanna use a ListBox server control either..
Just curious... the reason behind not using ListBox? You are anyway
duplicating the functionality... or as I generally say, "Reinventing the
wheel" once again!
--
Happy Hacking,
Gaurav Vaish | [url]www.mastergaurav.com[/url]
[url]www.edujinionline.com[/url]
[url]http://articles.edujinionline.com/webservices[/url]
-----------------------------------------
Gaurav Vaish \(www.EdujiniOnline.com\) Guest



Reply With Quote

