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

  • Home
  • SEARCH
  • 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 3349126
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:37:34+00:00 2026-05-18T01:37:34+00:00

I’ll apologize in advance for a long post. I have two DataTables (Cases and

  • 0

I’ll apologize in advance for a long post. I have two DataTables (Cases and Jobs), each with a DataView that I bind my GUI to (the Cases dataview is the DataContext for a Grid, while the Jobs dataview is the ItemsSource of a ListView and the DataContext of a TabControl). The first time I fill the tables with DataAdapter.Fill, the data shows properly for cases and jobs. The second time I load data, I call DataTable.Clear and then DataAdapter.Fill, but only the jobs data shows in the GUI. The case data is nowhere to be seen, even though stepping through I can tell there’s a row in the DataTable with the correct data. That is, the DataTable.Clear and DataAdapter.Fill work properly; the Grid control in my GUI just doesn’t show the data. I’ve copied the XAML for the Grid control below. Can anyone help me?! Thanks.

UPDATE: If I have more than one row in the table the second time around, data shows up in the text boxes properly! What the hell is going on?

<Grid Height="165" Width="390" DataContext="{Binding caseTableView}" >

            <Grid.Resources>
                <local:CaseStatusItemsSource x:Key="StatusesSource" />
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="10" />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition Height="10" />
            </Grid.RowDefinitions>            
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="150" />
            </Grid.ColumnDefinitions>

            <!--Case Details-->
            <Label Style="{StaticResource LabelStyle}" Grid.Row="1" Grid.Column="1" >Case Number:</Label>
            <TextBox Grid.Row="1" Grid.Column="2" Style="{StaticResource TextBoxStyle}" IsReadOnly="{Binding isROCaseNumber}" LostFocus="caseNumber_LostFocus" >
                <TextBox.Text>
                    <Binding Path="/CASENUMBER" UpdateSourceTrigger="LostFocus">
                        <Binding.ValidationRules>
                            <local:CaseNumberValidationRule />
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>

            <Label Style="{StaticResource LabelStyle}" Grid.Row="2" Grid.Column="1" >Date Received:</Label>
            <TextBox Grid.Row="2" Grid.Column="2" Style="{StaticResource TextBoxStyle}" Text="{Binding Path=/DATERECEIVED, StringFormat=d}" IsReadOnly="{Binding isRODateReceived}" />

            <Label Style="{StaticResource LabelStyle}" Grid.Row="3" Grid.Column="1" >Status:</Label>
            <ComboBox Grid.Row="3" Grid.Column="2" Width="140" Height="20" HorizontalAlignment="Left" FontFamily="Verdana" FontSize="9" 
                    ItemsSource="{Binding statuses, Source={StaticResource StatusesSource}}" SelectedItem="{Binding Path=/STATUS, Mode=TwoWay}" IsReadOnly="{Binding isROCaseStatus}" >
            </ComboBox>

            <Label Style="{StaticResource LabelStyle}" Grid.Row="4" Grid.Column="1" >Date Ord. Received:</Label>
            <TextBox Grid.Row="4" Grid.Column="2" Style="{StaticResource TextBoxStyle}" Text="{Binding Path=/DATEORDRECEIVED, StringFormat=d}" IsReadOnly="{Binding isRODateOrdReceived}" />

            <Label Style="{StaticResource LabelStyle}" Grid.Row="5" Grid.Column="1" >Date Posted:</Label>
            <TextBox Grid.Row="5" Grid.Column="2" Style="{StaticResource TextBoxStyle}" Text="{Binding Path=/DATEPOSTED, StringFormat=d}" IsReadOnly="{Binding isRODatePosted}" />

        </Grid>
  • 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-05-18T01:37:35+00:00Added an answer on May 18, 2026 at 1:37 am

    There has to be a bug in Microsoft’s code somewhere, because I fixed it with the code shown below.

                ICollectionView _cv = CollectionViewSource.GetDefaultView(_appModel.casesTable);
                _cv.MoveCurrentToNext();
    

    I only needed to do this for the case table, not the jobs table, which is why I expect there’s a bug somewhere. The jobs table always worked whether there was one or more than one row in the table.

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

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

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.