views:

30

answers:

1

I am using DevExpress GridControl to display information from my database through a stored procedure (ie. SELECT * FROM aTable). Unfortunately when I run the program it doesn't display any of the information, columns, etc. It displays an empty table.

I know that there is information contained by the GridView though as I have print statements that return the row count. Specifically:

Console.WriteLine(GridView2.RowCount) ' returns the number of rows that should be displayed
Console.WriteLine(myTable.Rows.Count) ' returns the number of rows that should be displayed

What should I do so that the actual data within the table (DataTable) and the DataView is displayed to the user. I know the row count is correct as when I add/remove a record the row count correlates by incrementing/decrementing.

In addition I have this same problem in C# and in Visual Basic

A: 

Ok I have the solution and it is rather easy. Go into the design view and from there go into the designer for the GridView. In there go to Columns, under Main, and add each column that you want displayed from your select statement. For each put the name that the select statement had for each column under 'FieldName' and under 'Caption' you can rename the columns to what you prefer.

Kyra