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 131993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:11:34+00:00 2026-05-11T06:11:34+00:00

Is it possible to have a bound DataGridCheckBoxColumn call a method of click? Or

  • 0

Is it possible to have a bound DataGridCheckBoxColumn call a method of click? Or event a row level or row enter event?

I’m trying to implement a datagrid that updates the underlying filtered ObservableCollection collection (great sameple here http://petermcg.wordpress.com/2009/01/29/filtering-silverlight-datagrid-rows/)

The filtering works fine if I press an update button or another outside method. But, I can’t seem to find any internal grid event or anything on the DataGridCheckBoxColumn that will allow for me to call the update filter logic.

Any suggestions on how to implement a datagrid that updates the underlying collection on press of a checkbox?

Please find below my Xaml, it really isn’t anything special.

  • 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. 2026-05-11T06:11:34+00:00Added an answer on May 11, 2026 at 6:11 am

    The DataGridCheckBoxColumn Type does not currently provide a Click event, in fact it doesn’t currently provide any events. A cell rendered in a column of this Type just implements a TwoWay binding between the IsChecked property of a CheckBox control and the property (specified in the Binding) on the instance of T in the current row of the ObservableCollection<T> that the DataGrid is bound to.

    You don’t provide your Xaml so I’ll use the example from my blog post referenced in your question. The workaround involves specifying a DataGridTemplateColumn containing a CheckBox and defining the Click event as follows:

    <data:DataGrid x:Name='FilteredPeople' AutoGenerateColumns='False'>   <data:DataGrid.Columns>     <data:DataGridTextColumn Header='First Name' Binding='{Binding FirstName}' />     <data:DataGridTextColumn Header='Age' Binding='{Binding Age}' />     <data:DataGridCheckBoxColumn Header='Visible' Binding='{Binding IsVisible}' />      <data:DataGridTemplateColumn Header='Row Filter'>       <data:DataGridTemplateColumn.CellTemplate>         <DataTemplate>           <CheckBox x:Name='RowFilterButton' IsChecked='{Binding IsVisible}'                 Content='Filter' Tag='{Binding}' Click='RowFilterButton_Click' />         </DataTemplate>       </data:DataGridTemplateColumn.CellTemplate>     </data:DataGridTemplateColumn>    </data:DataGrid.Columns> </data:DataGrid> 

    An alternative to a CheckBox in this case could be a ToggleButton or normal Button control. Notice the binding for the Tag property of the CheckBox. This helps to find out in which row the CheckBox was clicked from code-behind:

    private void RowFilterButton_Click(object sender, RoutedEventArgs e) {     Person person = ((CheckBox)sender).Tag as Person; } 

    You can then remove this person from the ObservableCollection<T> or change it’s properties to filter or update the DataGrid as appropriate.

    That’s normally where this answer would end but if you do not have this update installed there is a bug in the default SDK version of the Silverlight 2 DataGrid that prevents this. In this case the bug will manifest itself by the DataGrid not drawing the row the CheckBox is in (instead what you get looks like an invisible row) if you cause the DataGrid to be filtered when you click that CheckBox (i.e. the Checkbox has focus).

    To avoid this bug, install the update or initiate any manipulation of the ObservableCollection<T> the DataGrid is bound to from a Control outside the DataGrid’s rows as per this example.

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

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The visual basic library has a Financial class in it.… May 12, 2026 at 1:18 am
  • Editorial Team
    Editorial Team added an answer In Javascript, all numbers are IEEE double precision floating point… May 12, 2026 at 1:18 am
  • Editorial Team
    Editorial Team added an answer Perhaps you could use the overload accepting an XmlWriter, and… May 12, 2026 at 1:18 am

Related Questions

I'm evaluating Terracotta to help me scale up an application which is currently RAM-bounded.
Is it possible to use BindingSource.find on multple columns? I have a treeview and
Lets say I have a custom data type that looks something like this: public
Is it possible to have both NetTcp bound endpoints, and basicHttp bound endpoints with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.