Hello, maybe someone can help me:
I have two gridviews on my page, positioned side by side, GV1 on the left and GV2 on the right.
When the user selects a row in GV1 (that has many rows), GV2 should shift near the selected row.
I was wondering if there is something like a 'Top' property for the selected row in GV1, to set the same 'Top' value for GV2.
I guess that solution can involve Attributes.CssStyle.Keys("top"), which I can set:

gv2.Attributes.CssStyle.Add("top", [I]same_value_of_GV1_selectedrow[/I])

but first I should retrieve the "top" value of GV1.SelectedRow and I'm not able to do it.
Any help? Thank you,
Cri

Recommended Answers

All 4 Replies

Well, I resolved to put gv2 below gv1 (and enable paging on gv1). But I'm still curious about a solution for my original problem...

You could try using JavaScript to grab the (X,Y) coordinates of the mouse cursor at the time the user clicked on the row, then set your properties relative to that point.

Thank you Fortinbra! If I can make it work, my page will look much better. I'll try right now.

If it's in ASP.NET you could use the Facebook tools they have on codeplex, Facebook C# SDK.

Also, it's not polite to hijack someone else's thread to ask a new question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.