Jump to content
Software FX Community

Dynamic grid has no columns


klimekt

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...