.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

Combobox SelectedValue with Converter and PropertyChangedCallback() is not working together?

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :WPF
Hi, I have a combobox, I want to have a PropertyChangedCallback and at the same time I want to bind selected value with IsEnable property of a Checkbox. Problem is when I add Converter Neither Converter gets called and nor the  PropertyChangedCallbac().   <ComboBox ItemsSource="{Binding Source={StaticResource EnumExportType}}" Name="CB_ExpType" SelectedValue="{Binding Path=ExpType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged" /> Combobox is binded with static Enum resource EnumExportType. Selected value is Binded with a Dependency Property ExpType which is a Enum.   public ExportType ExpType { get { return (ExportType)GetValue(ExpTypeProperty); } set { SetValue(ExpTypeProperty, value); } } public static readonly DependencyProperty ExpTypeProperty = DependencyProperty.Register("ExpType", typeof(ExportType), typeof(ExportScreen), new FrameworkPropertyMetadata(ExportType.EntireProject, new PropertyChangedCallback(ExportTypeChanged))); this works fine On changing Item from combobox PropertyChangeCallback gets called. Now I want To bind the IsEnabled property of a Checkbox to the ExpType property and I use IValueConverter to convert the ExpType to the correct boolean value. <CheckBox Content="Test" Name="CHK_WithModels" IsEnabled="{Binding ElementName=CB_ExpTyp

View Complete Post

More Related Resource Links

AjaxToolkit:ComboBox not working in ModalPopupExtender

Hello,I have two nested modal popup. The ComboBox does not work as expected as you can see frome this screenshot. As you can see it misses:The list is not visible even if I think that is in the background. In fact the "SuggestAppend" works perfectly.The ComboBox arrow button is not visible. On zooming the green circle you can see that it shrinked to a size of 4x4 pixelsAdditional info: jquery is used for tabs & datePicker (in the first popup) and Buttons (always)EDIT: Forgot to include  the server side code. Here it is:<ajaxToolkit:ComboBox ID="dataPhoneType2" runat="server" DataSourceID="phoneTypeDS" DataValueField="PhoneTypeId" DataTextField="Description" AutoPostBack="False" DropDownStyle="DropDownList" AutoCompleteMode="SuggestAppend" RenderMode="Inline" CaseSensitive="False"></ajaxToolkit:ComboBox>Is this a bug?Regards

WPF ComboBox Key Index not working when using data template selector


Hi all,

I have a problem regarding WPF combobox when using data template selector.

Basically, WPF combobox has a standard behaviour which will take you directly to the item that starts from a character if you type that character using keyboard. I don't know the official name for this functionality and will temporarily call it "Key Indexing".

I now want to create a ComboBox which displays its item differently. I achieved this using DataTemplateSelector;

        <ComboBox SelectedItem="{Binding Selection}" x:Name="Input" ItemsSource="{Binding Parties}">
                <Editor:PartyTemplateSelector DefaultTemplate="{StaticResource Default}" NewTemplate="{StaticResource New}" OldTemplate="{StaticResource Old}"/>


And the PartyTemplateSelector is:

    public class PartyTemplateSelector : DataTemplateSelector

DataTrigger bound to a datebound property using a converter not working.


Hi all, this will sound like a simple problem but I am really stumped!

I'm trying to create a TextBlock with a style that collapses when the text is "" or null. So in the style there's a DataTrigger bound to Text using a Converter that provide a boolean test for "" or null.

The problem is that the triggers never seem to fire. Debugging the converter suggests it never gets used. The debug output also doesn't warn me of failed bindings so I have no idea what is going wrong!


			<GlacialControls:IsNullOrEmptyStringConverter x:Key="isNullOrEmptyStringConverter"/>
			<Style x:Key="Co

AutoComplete textbox and combobox not working


I am using a textbox and when I provide custom source from collection at design time it works but when i use custom source in code and fill data from a datatable it doesnot works.

Here is the code ...


 Dim dt As New DataTable
        dt = DataClass.getList("select cust_name from Customer").Table

        Dim cs As New AutoCompleteStringCollection
        For Each r As DataRow In dt.Rows

        TextBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        TextBox1.AutoCompleteSource = AutoCompleteSource.CustomSource
        TextBox1.AutoCompleteCustomSource = cs




ComboBox SelectedValue too slow


DataBound ComboBox bound to DataTable of 2 columns with 1000 items (ZIP codes) is too slow when current selection is changed via SelectedValue. It tooks even 300ms on my i3 4GB W7 64bit.
In case of form with 10 combos on detail UI becames unusable in master/detail scenario.

If I implemented some FindRow method and current item is selected via SelectedIndex it works fine (at least it tooks 10-times less time).

Every possible change events are blocked during call of SelectedValues.

Any ideas how to correct this issue?

Thanks in advance.

VS2010, .NET 40


Ondrej Spilka

Setting SelectedValue for ComboBox

When you add combobox items inside xaml then SelectedValue of the Combo Box didn't work.

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

.net code converter

For coverting your programming langugae to another languge the below site is very help full


Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


upload file not working



iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

jquery confirm windows isn't working


Hi, i am using jquery to implement a modal confirm windows but it not working

i have a template field button with ajax confirm using jquery but i have a problem. Apper the confirm windows but when i click on "yes" doesn't execute the delete command. without ajax (using template field button and simple confirm windows javascript) works so well.

Can you give me a hand with this?

thx in advance!

<link href="_assets/css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="_assets/css/confirm.css" rel="stylesheet" type="text/css" />
<script src="_assets/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="_assets/js/jquery.simplemodal-1.1.1.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
       $(".deleteCustomer").click(function(ev) {
                var msg = $(this).attr("title");
                confirm(msg + "?");

Keyboard shortcuts stops working in WebMatrix


I'm often experiencing that keyboard shortcuts stops working in WebMatrix. This is very annoying as CTRL-S, CTRL-C, CTRL-V, etc. stops working, all of which are heavily used when programming. It's obviously hard to explain how to reproduce this, but I was wondering if someone knows a quick-fix?

update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



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