klimekt Posted July 9, 2008 Report Share Posted July 9, 2008 I'm trying to create a grid that's databound at runtime. I've set the grid datasource to <In Code> and I followed the example in the resource center, using the DataSourceSelecting event and assigning the grid datasource to the defaultview of a table in a dataset. When I do this I get the right number of rows in the grid, but there is only one empty column, no data is displayed. If I assign the same defaultview to a standard gridview control it displays the table content correctly. Do I have to define each column in the table manually to accomplish this? I couldn't figure out how to do this since it doesn't seem possible to create a new datafield in the code, only imagefield. Any help would be appreciated. Tomasz Quote Link to comment Share on other sites More sharing options...
StephenP Posted July 10, 2008 Report Share Posted July 10, 2008 Tomasz, The auto-generated fields and columns will be fixed in our upcoming service pack, which is about 4 weeks away. If you can't wait that long, I could get you a hotfix that solves the issue. However, the best thing for you to do is to create the DataFields and Columns in the markup. If you can do that, you should. Otherwise, let me know exactly what you are desiring and we can work it out. Quote Link to comment Share on other sites More sharing options...
klimekt Posted July 10, 2008 Author Report Share Posted July 10, 2008 The grid displays results of user designed queries, so there is no way to predict the dataset structure at design time. It has to be flexible enough to display whatever is throw at it. If you could provide me with a hotfix that would keep my development going until the service pack is available. Thanks, Tomasz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.