.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

ObservableCollection Update Notification Problems

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :WPF


I have an ObservableCollection of DataRows which is bound (via a multi-binding) to a number of checkboxes generated by an ItemsControl from a DataView. The MultiBinding value converter takes the DataRowView from which each checkbox is generated and adds it to/removes it from the ObservableCollection based on whether the checkbox is checked or not. This all works fine, the binding Convert method is run when the bindings are first performed and the ConvertBack method is performed when the IsChecked value changes, however when the ObservableCollection is altered elsewhere the bindings are not updated.

I have a feeling that this could be because the ObservableCollection is raising a CollectionChanged event and the bindings are expecting PropertyChanged events, is there any way to set which events a binding will listen for and refresh upon?

Below is the XAML code for my binding in case there's any issues with it:

                <CheckBox Content="{Binding Path=Row.EventReference}" x:Name

View Complete Post

More Related Resource Links

Treeview problems in Update panel



I tried using this code, on a Treeview inside an update panel, which is populated dynamically in code behind. 

However, it doesnt give me the required functionality.

Following is my aspx code for the TreeView and the TreeView populating logic:


<div id="treelist">
<asp:UpdatePanel ID="UpdatePanel1&quo

chrome and safari problems with log ins and sign ups in update panels

Hi,This is probably a common problem.I have log in and sign up controls in update panels. They are being focussed on when the user clicks the appropirate button. Once done, hitting the sign-up or the log-in button, the browser (FF, IE) updates the update panels and all looks nice.In chrome and safari however, this does not work quite as nice. Login and sign up still happen. But focussing the controls does not, neither does the update panel update. The user has to reload the page to see that he is actually logged in or has signed up.This is really not nice and I found a very strange error, given that update panels work fine under other circumstances.Whats the problem here and how can this be solved?Thank you very much.Regards,D

update panel problems

I am using AJAX update panel for handling post back, on post back i am only enabling and disabling controls, but some times the following error occurs on post back.Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.  Details: Error parsing near '    <!DOCTYPE html P'.Following is the code for refrence.Any Help would be Highly appreciated.Thanks in Advance//////////////////////////aspx code////////////////////////////////////////////<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="addriskpolicy.aspx.cs" Inherits="addriskpolicy" Title="Untitled Page" EnableEventValidation="false"%> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script type="text/javascript" src="js/jsUpdateProgress.js"></script> <script type="text/javascript" language="javascript"> var ModalProgress = '<%= ModalProgress.ClientID %>'; </script> <asp:UpdatePanel id="upnl_accounts&

Latest .NET 4 security update causes problems for ClientAuthenticationServices


Patch KB2416472 causes Membership.ValidateUser within Client Authentication Services to fail while decrypting the Forms Authentication token.  The Encrypted ticket is 272 bytes long and the Maximum allowed length is 256 bytes.

If you uninstall the patch, the problem is resolved. 


SELECT and UPDATE query problems



I have a web form that should display advertisements depending of the number of impressions (number stored in a database) and I also need to update the number of impressions when page is loaded. The advertisements are displayed on a web page, but the problem is I don't know where to insert the SqlCommand for updating number of impressions.

Labels are used for displaying the number of impressions.  

        String connectionString = WebConfigurationManager.ConnectionStrings["CMS"].ToString();
        using (SqlConnection connection = new SqlConnection(connectionString))

            using (SqlCommand commandReklama = new SqlCommand("SELECT * FROM Reklama", connection))
                SqlDataReader readerReklama = commandReklama.ExecuteReader();
                while (readerReklama.Read())
                    string redirectUrl = readerReklama.GetString(1);
                    string url = readerReklama.GetString(2);
                    int brojPrikazivanja = readerReklama.GetInt32(3);
                    bool show = readerReklama.GetBoolean(4);                  
                    string naziv = readerReklama.GetString(5);
                    int location = readerReklama.GetInt32(6);

                    if (

Problems with Repeater Control, Update Panel and the Toolkit controls


Hi Guys,


Having a bit of an issue with the Toolkit controls.

I have a Repeater Control nested inside the Update panel, the repeater item template contains a multiview control allowing users to flick through seperate bits of information. This was working fine the async update was perfect, no issues.

I have then decided to include the rating control to one of the views. problem is now everytime i want to change the view it causes the whole page to postback.  

Attached is the code.

Any help is much appreciated

Problems with Cumulative Update package 6 for SQL Server 2008 R2


I have tried to download the Cumulative Update package 6 for SQL Server 2008 R2 several times and the file "427849_intl_i386_zip.exe" appears to be having issues. When I run the self extract gives me error 110.  What is causing this problem?

ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Top .NET Performance Problems and how to avoid them

Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

Update Vs SystemUpdate

Many of you might noticed that share point ListItem has Update() method as well as SystemUpdate().

What is the difference between these two methods and why MOSS has two different APIs for updating an ListItem

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

Visual Studio closes itself by opening aspx-Page designer after Windows Update


Hey Guys,

I've a problem with my Visual Studio.

On the 13th of August 2010 i installed a Windows update on my vista sp2 pc. For this date my Visual Studio 2008 sp 1 always has closed itself by opening an aspx-page in designer view. There is no error message just closing the window. I restored a backup of my windows from the time before updating it and it helped, i could open aspx pages in the design view till the update has been installed again automatically after rebooting the pc. I can't disable windows updates, cause it's my pc at work and safety is very important. I hope you could help me out of this disaster.



Visual Studio 2008 Memory problems


My memory in task manager reaches about 900,000K  and I don't know why it does this. Definately slows everything down, especially when I rebuild my tableAdapters, takes about 30 seconds sometimes to rebuild the project.

Problems with Forms Authentication in DD 4 site


Hello,  I am seeing a strange problem with Forms Authentication in my DD site.   A user logs into and can view/edit/delete data all day, but when they execute a Custom Filter against data (for example , a control DynamicData/Filters/CustomerLastNameSearch.ascx ) then the site auth fails, and redirects to the log in screen.

in web.config I have

     <authentication mode="Forms">
            <forms name=".Star" loginUrl="~/Login.aspx" protection="All" defaultUrl="~/Default.aspx" path="/" timeout="43200" cookieless="UseCookies" />     

Offhand, I am thinking two things : that DynamicData/Filters path requires some special handling for some reason, or the control extension ascx is causing auth to get confused.   Has anyone else experienced this or have any suggestions?  Thanks!

Update net frame 3.5.


I use visual studio 2008 but It's only use net frame work 2.0, Can I update and use net frame work 3.5 for Visual Studio 2008 ? Please help me !


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