Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Primary key problem for tables
posted

I have an application that has parent and child tables.  The user selects a shipping terminal and clicks GO to display a list of workers and their information.  The hierarchy goes down three levels.  Terminal Summary - Worker Summary - Worker Detail.  The application always works fine on the first pass.  But when the user changes terminals the application always returns the following error "Table (tablename) doesn't contain a row with the specified PrimaryKey value" on the following line of code:

whdg.ExpandAll()

Any help will be greatly appreciated.

Thanks

Parents
No Data
Reply
  • 2783
    posted

    Hi Joseph,

    Are you changing the WHDG’s datasource when the user picks a new terminal?

    If you are not changing the datasource try calling Clear() on the GridView’s Rows, right before you assign a new datasource.  Whdg.GridView.Rows.Clear(); That may fix the issue.  If that does not fix the issue you are seeing, can you provide a small sample that functions similarly to your application (using some made up datasources).

    Thank You,

    Olga

    ASP.NET Principal Software Engineer

    Infragistics, Inc.

Children