Hi
I am using UltraWeb Grid in my VB.NET web application. I have two grids in a page and when i move the scroll bar of the first grid , the scroll bar of the second grid should also move.
Both the grids have the same number of columns. when i move the horizontal scroll bar of the first grid , the Horizontal scroll bar of second grid should also move and stop at the same position.
1.How to change the scroll bar position of the second grid based on the scroll bar of the first grid??
2. Is it possible to hide the Scroll bar of second grid and scroll based of the scroll bar of first grid?
Ashok
What i am asking is, Is it possible to change the scroll position of the second grid when i scroll the first grid?
Thanks in advance
Hello Ashok,
This is something that is not supported out of the box, but you can probably play with the client-side object model of the grid documented here:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/WebGrid_Object_CSOM.html
and especially the DivElement documented:
Object. The HTML element of the div that contains the data of the grid. That element gets the scroll events.
Maybe you can attach onscroll javascript events on the DivElement and try to adjust the DivElement position of the other grid with custom javascript code.
I have used the following code to call a function when i scroll the scroll bar of a grid. It is calling that function Test() when i scroll the grid.
How to synchronize the scroll bar of the other grid with this grid?
Is there any property to get / set the horizontal scroll position of a ultrawebgrid?
<script type ="text/javascript">
{
odivElem.onscroll = test;
}
</script>
Try this
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=3024
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=2263
thanks
Hi Ashok,
I am working on something similar and struglling a lot in geting the sychronized scroll bars for both the grids.
Can you pls share the code of Test() function.
Thanks in advance,
Charu