Welcome Guest Search | Active Topics | Sign In | Register

click on row to popup a new window Options
tim
Posted: Sunday, February 21, 2010 9:26:43 PM
Rank: Member
Groups: Member

Joined: 3/29/2009
Posts: 29
I have put logic on the row to allow selection anywhere in the row to create a popup window.

ClientSideOnItemSelected = OnItemSelected

function OnItemSelected(grid)
{
var item = '';
var div = "";
var cell = "";
var link = "";
var info = "";


item = grid.getSelectedItem();

div = document.getElementById("divInfo");
cell = item.getCell(0);
info = "Selected Item Index: " + cell.getValue();



div.innerHTML = info;
link = 'MoreInfo.aspx?id=' + cell.getValue();

if (cell.getValue() != previous_call)
{
MM_openBrWindow(link,'info','width=305,height=470,top=270,left=100');
link.focus();
}
item.getCell(0) != '';
previous_call = cell.getValue();

}


I have a couple of issues with it.
1.
I would like the cursor to change to a hand when the user mouses over the row so they know it is clickable. Is that possible?
2.
I want all the drilldown to appear in the same window (not new windows). That appears to work except I don't always get the focus going to the new window.
3. This Javascript logic appears faulty when run with IE8. I suspect there is a better way of handling the popup that is more reliable.





Code: Visual Basic.NET
eo_support
Posted: Monday, February 22, 2010 9:42:53 AM
Rank: Administration
Groups: Administration

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

For the first one you would need to put cursor:hand inside your ItemStyle. Your second and third question does not appear to have anything to do with our product though. So we are not able to provide any support on those. Sorry about that!

Thanks!
tim
Posted: Monday, February 22, 2010 4:36:39 PM
Rank: Member
Groups: Member

Joined: 3/29/2009
Posts: 29
Thanks.
I have the cursor = hand now.

What I was trying to do with the javascipt is create a new window popup when the user selects a row.

What is the best way to acieve that? I need to get information from the selected row, popup a new window and then make a query to the db based on the data on the selected row.

I have it working of sorts with my attempt, but it seems quite irratic. I figure you must be doing this often from your grid object so there must be plenty of examples.
eo_support
Posted: Monday, February 22, 2010 4:58:22 PM
Rank: Administration
Groups: Administration

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

cursor=hand should work but this CSS value is only supported by IE. Also even if you set the cursor=hand on the Grid item, it can still be overridden by child elements (cells, text). For example, it will always display an "I" for text item because the text item is a child element of the row, which has a different default cursor. If you absolutely want control over the cursor, consider putting raw HTML inside each Grid's cell and set whatever property available with raw html. For example, instead of setting your Grid cell value as "Data", you can set it as:

<div className="whatever">Data</div>

You can define your own .whatever CSS class to implement anything possible with CSS, including cursor.

As to the popup new window question we have already mentioned that it is out of the scope of our support. Our support focus on our product only, thus we will only be able to answer questions that are directly related to our product. As a general guideline, if you take our product out and the question/problem remains, then you will need to resolve it by yourself.

Thanks!
tim
Posted: Tuesday, February 23, 2010 12:55:18 AM
Rank: Member
Groups: Member

Joined: 3/29/2009
Posts: 29
great 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.