datagridview not displaying data on load

0
0

I have created a datagridview using the designer along with the dataset from sqlserver database table with existing data in it. (All generated code from wisej).  When I run the web app, the form comes up but the existing data is not displayed.

I have attached a pic of the datagrid in designer and the code that is generated in the zip file.

 

What am I missing?

 

 

Attachment
  • You must to post comments
0
0

You don’t populate the data set. One way is to add Load event handler and call dataAdapter.Fill(dataSet).

https://docs.microsoft.com/en-us/visualstudio/data-tools/fill-datasets-by-using-tableadapters?view=vs-2022&tabs=csharp

  • You must to post comments
0
0

I have attached the project (minus the wisej.dll’s from the bin folders as they are too large).

the sql for the table that exists in sqlserver and also a bit of test data.

Let me know if you need anything else and thanks for looking at this.

Tom

  • You must to post comments
0
0

Data doesn’t load in design mode. Send the sample app and the code you use to fill the data set.

https://docs.microsoft.com/en-us/visualstudio/data-tools/fill-datasets-by-using-tableadapters?view=vs-2022&tabs=csharp

  • Tom Dalsimer
    I though wisej would have generated this code automatically? Which .cs file would I create the event handler.
  • Luca (ITG)
    That’d part of Visual Studio, not Wisej. Simply double click on the form or page and add Fill() to the Load event handler. See msdn docs. There are a million ways to populate the dataset depending on the app’s requirements.
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.