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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:27:33+00:00 2026-06-17T16:27:33+00:00

New to SilverLight and to posting here. Please have mercy and be specific :)

  • 0

New to SilverLight and to posting here. Please have mercy and be specific 🙂

Using RIA services with DomainDataSource and DataGrid control to display data rows from SQL server query

Goal: Have checkbox column (UI only – not a data field) to allow user to select multiple records/rows

BackGround:
1) Created new SilverLight 4, C# solution with RIA services

2) in ProjectName.Web

  • Created Entity Framework (EF) model referencing SQL server table/view (built solution).
  • Created Domain Sevice using EF model (built solution).

3) in SilverLightProjectName

  • From Data Sources window, dragged table onto a design surface to create DomainDataSource and DataGrid (this works great to bind DataGrid to data source)

4) in MainPage.XAML added checkbox column

What’s Happening: checkboxes are selected/checked by user, scroll down, scroll back up, all checkboxes reset and ONLY Datagrid.SelectedItem is still checked. I have read this behavior is ‘by design’ due to paging.

<sdk:DataGrid  RowStyle="{StaticResource newDataGridStyle}"  AutoGenerateColumns="False" ItemsSource="{Binding ElementName=ddsPagerApp, Path=Data}" Name="vwPagerAppDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected" MouseLeftButtonDown="vwPagerAppDataGrid_MouseLeftButtonDown" VerticalGridLinesBrush="#FFB9B9B9" FontSize="10" Grid.Row="3" SelectionChanged="vwPagerAppDataGrid_SelectionChanged" KeyDown="vwPagerAppDataGrid_KeyDown" MouseLeftButtonUp="vwPagerAppDataGrid_MouseLeftButtonUp" MouseRightButtonUp="vwPagerAppDataGrid_MouseRightButtonUp" DataContext="{Binding}" SelectionMode="Single" IsEnabled="True" IsReadOnly="False" TabIndex="2" Grid.Column="1" Margin="0,10,9,9">
        <sdk:DataGrid.Columns>                
            <sdk:DataGridTemplateColumn IsReadOnly="False">                    
                <sdk:DataGridTemplateColumn.CellEditingTemplate>
                    <DataTemplate>
                        <CheckBox  Name="ChkSelected" IsThreeState="False" IsChecked="{Binding Path=IsChecked, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center" Unchecked="IndividualCheckBox_Unchecked" Checked="IndividualCheckBox_Checked" Width="Auto" Height="Auto" />
                    </DataTemplate>
                </sdk:DataGridTemplateColumn.CellEditingTemplate>
            </sdk:DataGridTemplateColumn>
        <sdk:DataGridTextColumn x:Name="fullNameColumn" Binding="{Binding Path=FullName}" Header="Full Name" IsReadOnly="True" />
        <sdk:DataGridTextColumn x:Name="departmentColumn" Binding="{Binding Path=department}" Header="Department" IsReadOnly="True" />
        <sdk:DataGridTextColumn x:Name="pager_number_displayColumn" Binding="{Binding Path=pager_number_display}" Header="Pager Number" IsReadOnly="True" />
        <sdk:DataGridTextColumn x:Name="PageTo" Binding="{Binding Path=PageTo}" Header="Page To" IsReadOnly="True" />
    </sdk:DataGrid.Columns>
</sdk:DataGrid>
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my:vwPagerApp, CreateList=true}" Height="0" LoadedData="ddsPagerApp_LoadedData" Name="ddsPagerApp" QueryName="GetVwPagerAppsQuery" Width="0" Margin="10,0,25,45" Background="#FF7D0000" Foreground="#FF7D0000" Visibility="Visible">
    <riaControls:DomainDataSource.DomainContext>
        <my:NotifyDomainContext />
    </riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>

Attempt 1:

  • in EFModel.edmx, added Boolean Scalar Property ‘IsChecked’
  • in DomainService.metadata.cs, added public bool IsChecked { get; set; }
  • in MainPage.XAML. added (above) IsChecked=”{Binding Path=IsChecked, Mode=TwoWay}”

Getting error: Error 11009: Property ‘ ‘ is not mapped

UPDATE: Reversed Attempt 1:

Attempt 2:
Researching possibility of defining a partial class for the entity, wiring to DataGrid, and using that to track CheckBox values. Any advice on if this will work/how to?

Trying my best to absorb this. Please enlighten me…and thank you in advance 🙂

  • 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-17T16:27:34+00:00Added an answer on June 17, 2026 at 4:27 pm

    This is what I implemented and it worked beautifully. I hope it helps someone else in the future 🙂

    1) SilverLight Project C#: Extend entity class using partial class (in separate file, but within same namespace – compiles into 1 class but keeps generated code separate)

    namespace Pager.Web
    {
      public partial class pager_grp
        {
            bool _IsChecked = false;
            public bool IsChecked
            {
                get
                {return this._IsChecked;}
                set
                {this._IsChecked = !IsChecked;}
            }
        }
    }
    

    2) SilverLight Project GUI: Create Column in DataGrid of type DataGridTemplateColumn named chkSelected

    3) SilverLight Project XAML: use template and bind to new property declared in partial class

       <sdk:DataGridTemplateColumn IsReadOnly="False">                    
       <sdk:DataGridTemplateColumn.CellEditingTemplate>
            <DataTemplate>
                <CheckBox  Name="ChkSelected" IsThreeState="False" IsChecked="{Binding    Path=IsChecked, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center" Unchecked="IndividualCheckBox_Unchecked" Checked="IndividualCheckBox_Checked" Width="Auto" Height="Auto" />
            </DataTemplate>
        </sdk:DataGridTemplateColumn.CellEditingTemplate>
    </sdk:DataGridTemplateColumn>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a new Silverlight 4 business application using RIA services. This will
Warning - new to Silverlight / RIA Services / etc. I have a business
I can create new Silverlight App with .NET RIA Services enabled. But when I
I'm using the new Silverlight 4 support for IDataErrorInfo. So I have a POCO
I'm using Silverlight 4 on IE 8. I have created a new Silverlight web
I have just created a new silverlight app using Silverlight navigation template. All went
I have created a new Silverlight 4 solution using the Business Application template. The
I am creating a new Silverlight app using RIA. I am using a Business
With the new Silverlight 5, we can now have an In-Browser elevated-trust application. However,
I have created a new silverlight business application in visual studio. It auto generates

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.