Welcome Guest Search | Active Topics | Sign In | Register

Can we place the asp controls in the grid? Options
Anand Ethiraj
Posted: Thursday, January 7, 2010 9:02:41 AM
Rank: Newbie
Groups: Member

Joined: 1/5/2010
Posts: 6
Hello EO Team,

How can we achieve the functionality of navigating to the next page by clicking the record in grid?

My current scenario.
Grid displays the list of datas from the database. When I am clicking the any one of the record, it will navigate to the details section page of current record.
Currently we are achieving with the use of asp:hyperlink controls.

How can we achieve the same functionality from EO?

Thanks & Regards,
Anand



eo_support
Posted: Thursday, January 7, 2010 9:37:34 AM
Rank: Administration
Groups: Administration

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

You won't be able to directly place server controls like asp:HyperLink inside the Grid cell. You can put raw HTML directly inside the cell, or set the Column's DataFormat to some HTML code. For example:

1. If your data source contains the following HTML:

Code: HTML/ASPX
<a href="javascript:alert('hi')">Test</a>


Populate the Grid from the data source would render a link in the cell with text "Test", clicking "Test" would show message box "hi". The rule here is it takes whatever HTML you feed to it and puts it inside the cell;

2. If your data source contains only the data, for example, just "hi", you can set the column's DataFormat to

Code: HTML/ASPX
<a href="javascript:alert('{0}')">Test</a>


Populate the Grid from the data source would have the same result as #1. The rule here is if DataFormat is set, the Grid takes whatever data you feed to it, format with DataFormat, and then puts the result inside the cell;

Using this method should allow you to put anything inside the cell.

Thanks!
Anand Ethiraj
Posted: Saturday, January 9, 2010 10:32:25 AM
Rank: Newbie
Groups: Member

Joined: 1/5/2010
Posts: 6
Thanks for the solution.

EO Grid doesnt seems to display columns of GUID datatype properly. How to proceed with this scenario?

Please let me know at the earliest.

Thanks & Regards,
Anand
eo_support
Posted: Saturday, January 9, 2010 4:52:39 PM
Rank: Administration
Groups: Administration

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

You can cast it to a string in your SQL. For example, if you had

Code: SQL
SELECT guid_field FROM table1


You can change it to

Code: SQL
SELECT C A S T(guid_field as varchar(50)) AS new_field_name FROM table1


Note you will need to use the "new_field_name" from your Grid. Also make sure you delete the space between the letters for the word "cast".

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.