selectedvalue

Two queries depending on each other while populating a table

I have 2 queries. One is populating a dataset that populates the dropdownlist and the other populates rest of the textboxes of a table row. i want to know how can i fill the entire dropdownlist and then make selectedvalue the value from the other query? e.g - dataset query = select hobby from hobbies other query - select name, dob, add...

DataBinding: ComboBox.Text not updating when SelectedValue changes?

This is the relevant designer code for the ComboBox: Me.ProbationComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Enabled", Me.RegistrationBindingSource, "IsRegistered", True)) Me.ProbationComboBox.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.RegistrationBindingSource, "ProbationID", True)) Me.Probati...

SelectedValue of DropDownList is not the one I selected when Enabled=false

Hiya, I have a few DropDownLists on a webform each pointing to a SqlDataSource. Some of these datasources use one of these DropDownLists for a select parameter, filtering the list to specific categories. For certain users two of these DropDownLists are to be automatically set and disabled. When I submit the form with the drop down...

.NET 3.5 Listbox Selected Values (Winforms)

I am BATTLING to get the selected values (please note VALUES not TEXT) from a Winforms Listbox that has multi-select enabled and has been bound to a database table getting the Name (as DisplayMember) and ID (as ValueMember) - I need the ID of the selected items. The listbox control has properties for SelectedValue to get one of the sele...

Using a ControlParameter in FilterParameters when the property is null

I have a DataList and FormView; they have separate datasources, though they pull the same info. The FormView's datasource has a FilterExpression to pull whatever's been selected on the DataList. On first load, the SelectedValue of the DataList is null (naturally). I expect the FilterExpression to result in zero rows, but it doesn't. ...

Do WPF ComboBox SelectedIndex and SelectedValue have different behavior on SelectionChanged event?

Hello guys I got this cbxJobPosition_SelectionChanged firing as expected. The problem is when a external method tries to set cbxJobPosition. cbxJobPosition is databinded with a list of objects of type JobPosition: JobPositionID: 1, JobPositionName: Manager JobPositionID: 2, JobPositionName: Employee JobPositionID: 3, JobPositionName:...

WPF Combobox loaded with list collection view fails to update selection on change (MVVM).

Hi Guys, Ok here is the deal (a bit wordy but I hope you will get the idea) I use MVVM for binding properties of a combo. The combobox is bound to a ListCollectionView with source collection of employee objects which is sorted by the emp. name . There is binding on SelectedValue of the combobox by the employee id. DisplayMember is em...

Combobox with collection view itemssource does not update selection box item on changes to the Model

Hello, Sorry for the earlier lengthy post. Here is my concise (!) description. I bind a collection view to a combobox as a itemsSource and also bind its selectedvalue with a property from my view model. I must keep IsSynchronizedWithCurrentItem="False". I change the source list ofr the view and then refresh the view. The changed (adde...

How to set the SelectedValue attribute of Telerik RadComboBox inside the FormTemplate of a RadGrid

I have what I think should be a straightforward question. I have a RadGrid with FormTemplate editing and AJAX enabled. One of the fields in the FormTemplate is a RadComboBox filled with U.S. State selections. I can bind the RadComboBox to the data source to populate all the items, but I'm not able to set the SelectedValue attribute. ...

how to get selected value from databound multiextended listbox

I am using visual studio 2008 with vb as my language. I have a databound multiextended listbox. I need to get the selected value for each item that is selected. I have searched for two weeks trying to find and answer. Can anyone help? I would greatly appreciate it. ...

SelectedValue explicit binding updates when ItemsSource change..why?

I have a ListBox with an Explicit binding set to SelectedValue. SelectedValue="{Binding Path=Property, UpdateSourceTrigger=Explicit}" the ItemSource of ListBox is an ObservableCollection. When I select an item of ListBox and press 'Enter' I update the property value in this way: BindingExpression be = listBox.GetBindingExpression(Li...

How to get selected row of detail grid in Master-Detail GridView?

Hi, I'm having a problem on getting the selected rows values of a detail grid. I have master-detail grid in a popup control and it works fine. I also enabled the enable selection to have checkboxes but when i try to run GetSelectedFieldValues on ClientSideEvents of a button it always returns "0". What do i do wrong, i couldn't find it? ...

How can I get the value(s) of the selected item(s) of CheckBoxList using Jquery ?

If I have the following CheckBoxList <asp:CheckBoxList ID="typeCheckBoxList" runat="server" RepeatDirection="Horizontal"> <asp:ListItem Value="0">Student</asp:ListItem> <asp:ListItem Value="1">Parent</asp:ListItem> <asp:ListItem Value="2">Educational</asp:ListItem> <asp:ListItem Value="3">Specialist </asp:ListItem> <asp:ListI...

asp.net parameters in odbc

I have a page 3 datacontrols (in order, datalist->grid->listview, the selection from one feeds into the next) works perfectly locally, using dot net connector for mysql. My webhost uses ODBC, and I had to remove [ ] from the select statements in my code and put the table names. I removed the [ ] 's and my page runs, and my 1st/datalis...

WPF Combobox SelectedItem hell

Im having a very funny issue in WPF Im creating a Combobox through code, and adding it to a control. When I set the Combobox.SelectedItem or Combobox.SelectedIndex or Combobox.SelectedValue I am unable to select another option from the Combox items. ForeignKeyDisplayAttribute attribute = (ForeignKeyDisplayAttribute)this.GetAttribute(t...

Access WebUserControl DropDown Selected Value

Hi, I have a dropdown inside a webusercontrol which I want to use on 5 pages. I want to save the selected value of the dropdown from the page. I tried to access it using below method, but its not working http://stackoverflow.com/questions/2367957/finding-and-accessing-elements-of-a-webusercontrol on webPage its not don't show the me...

Problem with binding a datagrid's selected item to treeview's selected value

I have problems with binding a treeview to a datagrid's selected item. they are in different views, but datagrid's selected item is already passed to treeview's related viewmodel. There is a SelectedGroup property in treeview's related viewmodel which is datagrid's selected item and its type is Group. I want to bind the ID field of Gr...

no value for SelectedValue on a DropDownList control on PostBack

I'm really stumped. I have an ASP.NET page (VS 2008, .NET 3.5/SP1) that contains a gridview and below that a few textboxes and a dropdownlist that the user can use to add a record to the gridview. So, i fill out my form, click my submit button, and I can get the values of the textboxes easily enough, but the dropdownlist.SelectedValue ...

WPF: What is the simplest way to get the selected text in a combo box containing only text entries?

My WPF ComboBox contains only text entries. The user will select one. What is the simplest way to get the text of the selected ComboBoxItem? Please answer in both C# and Visual Basic. Here is my ComboBox: <ComboBox Name="cboPickOne"> <ComboBoxItem>This</ComboBoxItem> <ComboBoxItem>should be</ComboBoxItem> <ComboBoxItem>easie...

Problems with AJAX CascadingDropDown and DropDownList SelectedValue in EditItemTemplate.

Hi guys. I am having problem in EditItemTemplate of FormView. When I use such code in InsertItemTemplate everything works: <asp:DropDownList ID="Lic_PosiadaczLicencjiIDDropDownList" runat="server" SelectedValue='<%# Bind("Lic_PosiadaczLicencjiID") %>' /> <asp:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetCo...