|
Rank: Advanced Member Groups: Member
Joined: 11/2/2010 Posts: 38
|
1. How to set the background color of a cell in the Grid control programmatically
2. Can I add a column to a grid control programmatically, since datasource table column is changing dynamically
Your help will be very appreciated.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
|
|
Rank: Advanced Member Groups: Member
Joined: 11/2/2010 Posts: 38
|
I write: Grid.columns.add() but it had error, I don't know what I need to put in ().
would you give me an example.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will need to be able to read the reference. There are dozens of controls and thousands of property/methods and millions of scenarios. There is no way we can give you sample code on each of these scenarios. The reference clearly documents the syntax for each class, method and property and you will need to be able to follow those.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 11/2/2010 Posts: 38
|
Only this one, Please ! I don't know what's wrong
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You will need to create a column first and then add it to the columns collection. For example:
Code: C#
//Create a new column
EO.Web.StaticColumn column = new EO.Web.StaticColumn();
//Add the column to the Grid's Columns collection
Grid1.Columns.Add(column);
There are different types of columns that you can create. For example, you can create an EO.Web.ButtonColumn instead of EO.Web.StaticColumn. You will also need to initialize the column correctly, for example, setting the columns' HeaderText so that the column will display header text. Hope this helps. If you are still confused, then you should definitely ask someone around you to help you to read the reference. There is no point for us to repeat anything that's already there. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 11/2/2010 Posts: 38
|
You are the best ! Thanks you so much ! I'm really appreciated.
have a good day !
|
|