Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9186643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:34:47+00:00 2026-06-17T19:34:47+00:00

I’m working on a WPF application using DevExpress, and also using the mvvm pattern,

  • 0

I’m working on a WPF application using DevExpress, and also using the mvvm pattern, and have the following problem:

  • I have a view model that has a boolean property (for instance IsChecked)
  • I have a view that is a devexpress data grid that is bound to a collection of the above mentioned view model items
  • A row of that devexpress data grid is of type check box, and it’s bound to the IsChecked property
  • I have a data template for the row of devexpress grid for showing a line in the row, if IsChecked is true

All this works fine when I check/uncheck the check box column in the data grid…. The problem is when I change the model property’s value: the view does not change….

The model implements INotifyPropertyChanged.

It seems to be that DevExpress makes a wrapper for each item, and then does not notify the view when the model’s property has changed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:34:49+00:00Added an answer on June 17, 2026 at 7:34 pm

    After search into the DevExpress’s Support Center, I could not find anything that helps me to solve this issues. But thanks to this nice application (Snoop) I get solve it.

    The thing is that the DevExpress’s grid collection do not behave like the other WPF’s standard collections. In any WPF’s collection each row (or item in a collection) has in the DataContext the ViewModel (or any class of the collection type). The DevExpress’s grid do not works like that…

    Each GridRow item of the DevExpress’s grid has an object of type RowData in the DataContext, and each cell (are of type GridCellContentPresenter) has an object of type EditGridCellData. As we can see this objects are not the same type of our collection.

    So how we can do any two-way binding between our view model, and our view row or cell item in the grid?

    If we are making a row template:

    The object that is in the DataContext in each row is of type RowData. This type have a property named DataContext, this property is of type RowTypeDescriptor (like a wrapper of our collection type). This do not works for making our binding. BUT the type RowData has a property namde Row in which we can find our collection’s type row object, so the only thing that we have to do is to make a binding to this property. For instance, in this case we want that a line cross my row if a bool field is set to true:

    <DataTemplate x:Key="myRowTemplate">
            <Grid>
                <dx:MeasurePixelSnapper>
                    <ContentPresenter x:Name="defaultRowPresenter" Content="{Binding}" ContentTemplate="{Binding View.DefaultDataRowTemplate}" />
                </dx:MeasurePixelSnapper>               
                <Path Data="M5.496,10.5 L508,10.5" Fill="#FFF" HorizontalAlignment="Stretch" Height="1" Stretch="Fill" Stroke="#FF040404" VerticalAlignment="Center" Width="Auto" Margin="0" Visibility="{Binding Row.AnyModelBoolProperty, Mode=TwoWay, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource IntToVisibilityConverter}}"/>
            </Grid>
        </DataTemplate>
    

    If we are making a cell template:

    In this case is a bit more complex. because the object EditGridCellData has not any property where we can find our collection’s object type. The only we can find here is a property called Data in which we can find a object of type RowTypeDescriptor, so do not work fine. We need to solve this using a ancestor type binding. See this example:

        <dxg:GridColumn x:Name="dateRow" FieldName="Date" Header="Date">
                        <dxg:GridColumn.CellTemplate>
                            <DataTemplate>
                                <dxe:DateEdit x:Name="PART_Editor" DateTime="{Binding DataContext.Row.Date, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type dx:StackVisibleIndexPanel}}}" IsEnabled="{Binding DataContext.Row.DateEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type dx:StackVisibleIndexPanel}}}" MinValue="{Binding DataContext.Row.DateMinValue, RelativeSource={RelativeSource AncestorType={x:Type dx:StackVisibleIndexPanel}}}"/>
                            </DataTemplate>
                        </dxg:GridColumn.CellTemplate>
        </dxg:GridColumn>
    

    Here we have a date control that will be bound to the model and will be correctly notified. Hope this could be useful for every one that had this problem. It is a real head ache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have been unable to fix a problem with Java Unicode and encoding. The
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have thousands of HTML files to process using Groovy/Java and I need to
I have a view passing on information from a database: def serve_article(request, id): served_article
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.