Rank: Newbie Groups: Member
Joined: 5/29/2008 Posts: 3
|
hi.
i've been trying to bind a grid using a simple query, te query is ok and returns data, but whe i call grid.databind(), no content is shown. Columns does not appear, but there are rows, actually teh number of rows returned in the query.
I`m not able to manually create the columns in te grid at design time, because the query can contain uncertained number of columns. I've been using AutoGenerateColumns Property, but nothing happens.
Any help ?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Currently our Grid does not automatically generate columns. As you have previously noticed, you will need to use code to create columns:
Code: C#
EO.Web.StaticColumn column = new EO.Web.StaticColumn();
column.HeaderText = "something";
column.DataField = "some_field";
Grid1.Columns.Add(column);
Note you may need to change StaticColumn to some other columns. Also, since you are populating from a query, you may need to call certain methods on your specific data source object to get a list of all fields so that you can create column objects based on it. We may support AutoGenerateColumns in our future releases. Thanks
|