I came across a user case where I had to programatically scroll the contents of a div to the right. This was
to be performed on a click of an ajax link. This is how I achieved the same:
onSubmit(AjaxTarget....)
{
.... body of onsubmit , additional operations.
target.appendJavascript("var obj = document.getElementById('divid');obj.scrollLeft = 500;");
}
some additional methods which could be used on the window itself rather than a div are
scrollBy
scrollTo
moveBy
I guess this is a page to share all issues I have troubleshooted and found interesting enough to share. Also a place to give back something , in return of all the help I have received or taken from forums.
Showing posts with label horizontal result set. Show all posts
Showing posts with label horizontal result set. Show all posts
Thursday, 24 June 2010
Wicket - Programattically Scroll a Div Horizontally
Labels:
ajax,
container,
div,
horizontal result set,
programatically,
scroll,
wicket
Monday, 18 May 2009
SQL Server PIVOT - Magic isn't it
Ever wonders how you could present data via a select statement horizontally instead of vertically. When your columns come from the data you are retrieving from the select statement. The answer is simple in TSQL called the pivot keyword. All it would do is to use the data as the pivot to form the columns. Consider the simple schema of the employee: Product
- Name
- ID
- ID
- Agent ID
- Quantity
- Name
- ID
PIVOT (SUM(Quantity) for Agent IN (Agent1, Agent2, Agent3)) AS pvt
Labels:
excel,
horizontal result set,
pivot,
sql server
Subscribe to:
Posts (Atom)