.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Can't select combobox item with mouse

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :WPF
I have a bizarre issue with my wpf 3.5 app that I just wrote. One of the computers we installed it on won't allow the user to select an item from the combobox with the mouse. The mouse can make the drop down appear like normal, but when the mouse hovers over the items they are not highlighted and clicking on one closes the drop down but doesn't select the item. This is the default combobox with no style and only the margin, itemssource and selecteditem properties set. I tried other programs that have comboboxes (IE7, Excel, a VB6 app) and all of them work just fine. We have this program installed on numerous computers throughout our company and everyone else's is working correctly. I tried uninstalling the program and the .NET framework then reinstalling. I don't know what else to try.

View Complete Post

More Related Resource Links

Automatically select item with keyboard navigation in a combobox


Hi there,

in a WinForms ComboBox the selected item automatically changes, when I navigate through the combobox items with keyboard.

However, in the WPF ComboBox (IsEditable = false), the item in the list is highlighted but not automatically selected. Is there a way to change this behaviour?




On New Item form, select item on choice dropdown based on query result.


I posted this on Experts Exchange awhile back with no answer, so here's hoping someone here has an idea :)

So I've mostly figured this problem out, but I need some help in getting over the hump... note that I'm using JavaScript to do this (SPServices) on SharePoint 07'.

I'm on the New Items page of a list. Based on a user's selection in a "Teacher" dropdown, I'm doing the following:

1.) Get the value of the Teacher field and several other fields (School and Visit Date)
2.) Run a CAML query based on those fields to find the last list item entered for that Teacher

So here's where I'm stuck...

I have 10 choice fields, all with choices 0, 4, 7, and 10. Depending on what they were set to in the last entered item (which I queried), I want to set the selected item on each of those dropdowns to equal that. So "Score 1" was set to "4" on the la

CascadingDropdown Extender select item on pageload

I have a form that two cascadingdropdown extenders, when the page loads  the form is populated and cascadingdropdowns do work however the values should be set as the page loads.  I have tried setting the selectedvalue of the CDD but that doesn't take.   How do I set the values of the CDD with data from a db?

Problem Add Category Item by select department

Add Category Item by select department Firstly database has two tables Department and Category Department Table Id -------int  (PK) dep_name--------nvarchar(50) dep_description---------nvarchar(100) -------------------------------------------------------- Category Table Id------int cat_name------- nvarchar(50) cat_description----------- nvarchar(100) IsActive--------bit DepartmentId-----int   (FK) ---------------------------------------------------------- I have form contain DetailsView control under name CategoryDetailsView. My problem: this mechanism not duo correctly I don't know why,  only show to me when I run page" Procedure or function InsertCategory has too many arguments specified. " My idea when a user need to create category must on him write category details ( category name, Description, IsActive) and select this category where to insert by select department name from drop downlist This control connecting with table under name Category, insert process by stored procedure under name sp_InsertCategoryALTER Procedure [dbo].[InsertCategory] (@cat_name nvarchar(50) ,@cat_description nvarchar(100),@IsActive bit , @Result int output)AsBegin Insert Into Category (cat_name , cat_description, IsActive ) Values (@cat_name , @cat_description, @IsActive ) Select @Result = @@IdentityEnd <asp:DetailsView ID="CategoryDetailsView

Issue with Combobox - On selecting Item the combobox border becomes red why?

Hi, I have a combobox. <ComboBox DisplayMemberPath="Name" Name="CB" IsEnabled="{Binding ElementName=RB, Path=IsChecked}"<br/> SelectedValue="{Binding Path=Folders, Mode=TwoWay, UpdateSourceTrigger= PropertyChanged}" /> It has Selected value binding with ObservableCollection as public ObservableCollection<T> _folders; public ObservableCollection<T> Folders { get { return _folders; } set{ _folders = value; }} Combobox's IsEnabled property has binding with a Radio button checked value. PS: I don't have any validation here. The problem I am facing is when I select an Itam from Combobox its border becomes red , I don't understand why this is happening.

Display the item in the ComboBox inside the ListView(GridView)

I have the below code used in binding the values to the ComboBox in GridView(ListView), please help me < ListView Margin="480,51,6,14" Name="grid1" ItemsSource="{Binding UserDetail}" IsSynchronizedWithCurrentItem="True" Width="389" Grid.Column="1" > <ListView.View> <GridView> <GridViewColumn Header="UserName" Width="120" DisplayMemberBinding="{Binding Path=WindowsUser}"/> <GridViewColumn Header="Role" Width="140"> <GridViewColumn.CellTemplate> <DataTemplate> <ComboBox Name="Rolecombo" Width="120" ItemsSource="{Binding Path=UserDetail}" SelectedValue="{Binding PFR_Tbl_Role.Role}"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Active" x:Name="column" Width="100"> <GridViewColumn.CellTemplate> <DataTemplate> <Grid Width="{Binding ElementName=column,Path=Width}"> <CheckBox IsChecked="{Binding Active}" HorizontalAlignment="Center" /> </Grid> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView>  </ListView.View> </ListView>

select n-th item

I would like to select the n-th item from a list. One way I know how to do it is like this. Please follow this example. Create a table and insert a bunch of integers in random order. create table A (col int) insert into A values (294) insert into A values (150) insert into A values (200) insert into A values (12) insert into A values (1000) insert into A values (56) insert into A values (750) insert into A values (62) insert into A values (560) If I want to select the N-th largerst number from table A, I can do this. (replace <N> with whatever number you want) select max(x.col) from ( (select top <N> col from A order by col) ) x So, if N = 5, then you should get 200 from the above example.   I'm looking for another way to do this using the rank() function. I know you can use rank() like this. select rank() over (order by col) num_rank, col from A But, how can I use num_rank column to get the N-th item. I tried something like this, but doesn't work. select rank() over (order by col) num_rank, col from A where rank() over (order by col) = 5  

Dropdown select message in item template gridview dropdwon list ???

Hi ....I have used gridview item template , which has two dropdown list .The first dropdown list is binded from database to the dropdown list I have using the below code , to show the select message in dropdown list before selecting any item from dropdown list.In first row its show me --Select-- message and my vaues.. if i select some value form dropdownlist and click add new button it will create a new row dynamic then in previous row again it come back --Select-- message... on going to second row....I need to remain first row user selected value on going to next row.The New row will show --select-- message..Please go to my code and let me know what to do<asp:DropDownList id="DropDonList2" tabIndex=11 runat="server"          OnSelectedIndexChanged="DropDonList2_SelectedIndexChanged" AutoPostBack="True"          DataTextField="SizeRange" DataValueField="SizeRange"          OnDataBound="DropDonList2_DataBound" __designer:wfdid="w10"          AppendDataBoundItems="True">  <asp:ListItem Value="-1">Select</asp:ListItem> </asp:DropDownList><asp:DropDownList id="DropDonList2" tabIndex=11 runat="server" 

How to select some part of a text in listview item?


Dear all

I have a listview in WPF application, that I bind data in it using gridview. now I want to make a search for it. making search is simple but question is this I want to make a search that if user type 'a' then system will highlight all 'a' in list view. or if user type 'lis' the system will highlight all 'lis' in that listview.

Is it possible to highlight part of the text in side of listview item? or I have to select whole listviewitme? 


Thank you so much

ComboBox with bound SelectedItem displays new item even if selection fails internally



I'm a WPF beginner and currently exploring some techniques and use cases. This is one of my test setups:


<Window x:Class="wpfTest.MainWindow"
    Title="MainWindow" Height="350" Width

Select Item from Dropdownlist


I have a dropdown list created via MVCContrib FluentHTML - how do I perform a postback when the user selects any item in the dropdownlist? 

Select multiple checkboxes placed inside a combobox



I have just started working on WPF and I am fairly new to this technology. I need to add a excel filter like functionality for datagrid control. I have successfully added a combobox(with checkboxes inside) in the header of the datagrid. The datagrid needs to display "All" as first checkbox. If user checks this first checkbox all other checkboxes(inside same combo) need to be checked automatically. Following is my datatemplate for combo. I have placed in column header combo through codebehind.

<DataTemplate x:Key="comboTemplate">

   <ComboBox Name="cboTask" Loaded="cboTask_Loaded" Wid

highlighting the text of the selected item in Ajax Combobox


Is there a way to programmatically select the entire string of the selected item in the AJAX Combobox?

What I'm trying to do is bascially on a State/City selection.

1.  User selects a State from the first combobox.  This triggers the City combobox to be populated.  The item(0) is "Select One:".

2.  I want the entire "Select One:" to be hightlight as if the user had used their mouse and highlighted all the text.

The reason for this that I'd like the user to be able to start typing the city without needing to clear out the "Select One:" manually.

Can this be done?

Select only one item through radi button in gridview


Hi friends i have a gridview with radio button.i need to select only one item through out gridview i have written code that is working fine but that is giving problem in paging i am displaying gridview with 5 records per page.in first page i am able to select only one item but if i move to second page here also i am able to select only one radio button in this mean time if move to first page in that page also radio button is in selected mode .How can i make only one radio button selected in through out gridview and How can i get paging data from gridview(if i select 3rd page value and i moved to first page in that situation i need to get get that 3rd page value aslo ).How can i get that data pls help me

Select by Value in ComboBox (Windows Forms)


This question relates to Windows Forms development in C# - not Web Development.

I currently have an int value that is equal to the Value property of an item in a ComboBox control.  I want to be able to find the index of the ComboBox item with that value.  In pseudo C# I would do something like this:

int myValue = 123;
int theIndex = combobox1.getIndexOfValue(myInt);

Then "theIndex" would be the index value I was looking for.  No such function exists however.

Can anyone help me with how to do this?


Mark Young

Report viewer control is is displaying parameter item 'select a value' even when the default param



I am using SSRS 2008 R2,

I have set the default parameter of dropdown and in the output "select a value" item text is removed ,also in the Report Manager 'select a value' removed .

But when I am displaying the same reports in the ReportViewer control as ReportViewer1.ServerReport  in the the vs 2010 asp.net project the item select a value is reappearing in the output.

Could you please help me remove the default item text 'select a value' from the ReportViewer control aswel.


Dropdownlist postback always select first item


Hello, I am new at Asp.net. I hope some experts can help me.

I have 2 dropdownlist controls (ddl1 and ddl2). When I pick an item from ddl1, it will update ddl2. The problem is when I pick an item in ddl2, it always selects the first item in the list. Is it that the ddl2 autopostback causes the first ddl1 to reload and results the ddl2 to be refreshed also? Or I didn't set something correctly?

thanks in advance.


<asp:DropDownList ID="ddl1" runat="server" DataSourceID="sql

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend