Welcome Guest Search | Active Topics | Sign In | Register

Working with templates Options
Paulo Mondragon
Posted: Friday, October 10, 2008 1:25:44 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2008
Posts: 38
Hello,

I have worked with other grids that suports htm templates. I design my template I want to show colors, images, distribution of my fields. Does the EO Grid supports this function ?... How can I do this ?

Thanks a lot.
eo_support
Posted: Friday, October 10, 2008 1:35:03 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Our Grid is very much a client side Grid control, so you would not be able to use server template directly. You can do the following:

1. Customize various grid styles, for example, SelectedStyle, HoverStyle, etc. This would be the equivalent of the appearance aspect of your server template;
2. Customize the Grid cell HTML by directly suply the desired HTML to the Grid. For example, in order to display an image inside a GridCell, you would set that GridCell's Value to "<img src='xxxx' />". The Grid provides various means to facilitate that. This would be the equivalent of the content aspect of your server template;

So the bottom line is, everything is possible, but you are working with CSS + HTML, not server controls. This is necessary in order to support many client side functionalities such as switching to edit mode without going back to the server side, which is not possible if we were to support server template.

Hope this helps.

Thanks
Paulo Mondragon
Posted: Friday, October 10, 2008 2:19:48 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2008
Posts: 38
You mean directly in my HMTL code ?... Wich is the sintaxis for this ? . I'm using this

<eo:TextBoxColumn HeaderText="PRUEBA" Value = "<img src='Imagenes/Engineering Advantage.gif'/>" ></eo:TextBoxColumn>

Or I have to input the value from the Edit Columns panel ?

Thanks a lot.
eo_support
Posted: Friday, October 10, 2008 2:27:15 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
No. It's not as simple as that. You will never specify a Value on the column because each Cell has a value. So the Value is not associated to a column. It's associated to a cell. You will want to go over these topics:

http://www.essentialobjects.com/ViewDoc.aspx?t=Grid%2fdata_binding.html
http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.GridColumn.DataFormat.html
http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.GridColumn.DataField.html

For example, you can have a image path in a field (identified by DataField property) in your data source, you can set your DataFormat as "<img src='{0}' />". At runtime, the Grid automatically takes the value of each DataField, format with DataFormat and then render the result HTML inside each Grid cell.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.