|
Rank: Advanced Member Groups: Member
Joined: 8/21/2008 Posts: 37
|
Hi,
I've to insert anchor tag column in a EO.Grid. On clicking on this column, a pop up window with the selected details should appear. Please tell me how to add this tag. If there's no way, then could there be any better way of doing this?
Regards, Raghav
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
|
|
Rank: Advanced Member Groups: Member
Joined: 8/21/2008 Posts: 37
|
Hi, The above solution is to alert the user. I want to open a new window. Please find below code to be used in the EO.Grid. I had used this code in the datagrid which was working fine.
Code: HTML/ASPX
<a href="#" onclick="MyWindow=window.open('ChildPersonalDetails.aspx?ChildID=<%# DataBinder.Eval(Container.DataItem, "ChildID") %>','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=1000,height=350,left=1, top=1'); return false;">
Thanks & Regards, Raghav
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi, You will not be able to use data binding that way with our Grid. Our Grid works very differently than ASP.NET DataGrid so in generally, you should not expect things that works with ASP.NET DataGrid works with ours. You will want to: 1. Set the Grid's KeyField to "ChildID"; 2. Change window.alert in the sample to winow.open just as your onclick handler. Except to replace
Code: HTML/ASPX
<%# DataBinder.Eval(Container.DataItem, "ChildID") %>
With
So the final code will be something like that:
Code: JavaScript
function OnItemCommand(grid, itemIndex, colIndex, commandName)
{
var item = grid.getItem(itemIndex);
window.open('ChildPersonalDetails.aspx?ChildID=' + item.getKey(), .....)
}
Thanks! Note the above code omitted additional arguments only for demonstration purpose. You should still put them in.
|
|
Rank: Advanced Member Groups: Member
Joined: 8/21/2008 Posts: 37
|
Hi,
It worked!!
Thanks, Raghav
|
|