Results 1 to 2 of 2

Thread: Datagridview

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2009
    Posts
    1,058

    Datagridview

    Hi,

    I have a datagridview called DgvReturns, this grid is populated from a table called Tblprojectpatients.

    Now I have added a new column in the table and want to add it to the datagridview, but Open datagridview tasks - Edit Columns - dropdown the DataPropertyName I can't see the column I added to the table.

    Tried to Refresh tblprojectpatients.xsd and also the table at the datasource, Still the column doesnt show up.

    Any help please

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Datagridview

    First up, please provide descriptive titles for your threads. Just "Datagridview" doesn;t really describe your issue, does it? From the sounds of it, the issue isn't actually anything to do with the DataGridView anyway. The grid can only display what's in the bound DataTable. If the table doesn't contain the column then the grid can't either. If the column was in the table then I don't see how it could not be in the drop-down for DataPropertyName.

    Start by looking in the Data Sources window. Is this new column list under that table? Also, is the new column listed under that table in the DataSet designer? If it's not then you should run the configuration wizard again. If you've already done that and it's still not there, try deleting that DataTable and running the wizard again, ensuring that you select that table to be included. If worse comes to worst, you can always add another column to your DataTable in the DataSet designer manually.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width