Forms Data Controls :: Scrolling Of Div With Javascript?

Mar 30, 2011

I'm trying to control the scrolling of a div containing a gridview using some js code I found at [URL] Intent is to stop the gridview in the div from scrolling to the top after the select in the gridview is operated. Prior to adding the ajax extentions the detail would display when the select image was operated. Now the grid appears ok but when the select is operated nothing happens - perhaps the nSelectedIndexChanging="DetailsView1_Show" code behind is no longer firing? Perhaps I am missusing the ajax extentions? Using VS 2010. My code is as below,

<asp:ScriptManager ID="ScriptManager1" runat="server"/>
<script type="text/javascript">
var xPos, yPos;
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(BeginRequestHandler);
prm.add_endRequest(EndRequestHandler);
function BeginRequestHandler(sender, args) {
xPos = $get('serviceorders').scrollLeft;
yPos = $get('serviceorders').scrollTop;
}
function EndRequestHandler(sender, args) {
$get('serviceorders').scrollLeft = xPos;
$get('serviceorders').scrollTop = yPos;
}
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<input type="hidden" id="hdnScrollTop" runat="server" value="0" />
<div id="serviceorders" style="position: absolute; left:300px; top:180px; height:100px; width:700px;
font-family: Arial; font-size: small; color:black; overflow:auto">
<asp:GridView ID="sobydate2GridView1" runat="server"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="SOSONO"
DataSourceID="sobydate2gridview1SqlDataSource" AllowPaging="false" HeaderStyle-Wrap="True"
GridLines="None" OnSelectedIndexChanged="DetailsView1_Show"
OnSelectedIndexChanging="DetailsView1_Show">
<Columns>
<asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="linkimage.gif" />
<asp:BoundField DataField="SOSONO" HeaderText="Service Order" ReadOnly="True"
<asp:BoundField DataField="SORSP" HeaderText="RSP" SortExpression="SORSP" />

View 3 Replies


Similar Messages:

Forms Data Controls :: Using Scrolling Instead Of Paging In A ListView?

May 17, 2010

I have a listview and would like to scroll the ItemTemplatei instead of using paging. I need to freeze the header and InsertTemplate row, and works accross browsers. I've tried the following link:

[URL]

but am having problems getting it to work accross browsers I can get it to work in FF or IE6 but not both.

is there another control rhat's more suitable for this than the ListViiew?

View 2 Replies

Forms Data Controls :: Scrolling To Datalist Selected Row?

Feb 2, 2011

After I changed Datalist1.SelectedIndex (and loading datas)page loads and loses curret scroll position in page.how can I autoscroll (focus) to selected Item of Dataliist after I changed Datalist1.SelectedIndex .so each time datalist Item Selection It goes to top of page.How can I revent this ? or keep position or scroll to selected Datalist item ?

View 2 Replies

Javascript - Scrolling In JqPlot?

Sep 22, 2010

I am using jqplot to show candlestick chart and the data is from xml.I retrieve data from xml and put it into array and then jqplot creates a candlestick chart from that.but xml file contains lots of data so in chart values are over lapping (with fixed width). we make graph of lets say 10% of data and place a scrollbar and on every tick of scroll bar we rebuild graph with next data or there already exists any such functionality of scrolling graph/chart in jqplot

View 1 Replies

Forms Data Controls :: Is There A Way To Keep The Gridview Header Always Visible While Scrolling Down

Oct 8, 2010

i have a gridview inside a div that has scrollbars. see bellow

[Code]....

is there a way to keep the gridview header always visible while scrolling down.

like in MS Excel.

View 2 Replies

Forms Data Controls :: Scrolling One Item At A Time With The ListView?

Apr 30, 2010

Suppose I have a horizontally oriented ListView that always shows 4 items and also has a left & a right button: < A B C D >

Now, let's say I have a DataTable containing 20 entries, with indices ranging from 0 to 19.

When the page first loads, this is what'll be displayed: < 0 1 2 3 >

Assuming those buttons are regularly configured DataPage buttons then if I press the right one we'll get this: < 4 5 6 7 >

And if I press the right one again we'll get this: < 8 9 10 11 >

But suppose I'd like the left & right buttons to only scroll one at a time, so that pressing the right one at the start results in this: < 1 2 3 4 >

In such a case, is there a way to configure the DataPager to do this or should I instead introduce regular buttons and perhaps have them call a hidden DataPager?

View 3 Replies

Forms Data Controls :: Jerky Scrolling In IE8 Using Large Gridview?

Feb 28, 2011

ASP.NET 3.5,I'm upgrading a page that currently uses classic asp and xslt to display about 2000 readonly tabular records. Please leave aside the issue of whether this is a good idea or not.My asp.net replacement page uses a gridview to do the same thing.The scrolling in IE8 using this old code is very smooth and even. The scrolling using the asp.net page is horribly jerky. I can't figure out why - there doesn't appear to be much client side code running.Any clues welcome as this is a high traffic page that I want to look as good as possible.The same page also can't handle a row highlighter - same reason slow and jerky.

View 2 Replies

Forms Data Controls :: Multiline Textbox Scrolling Horizontally?

Jan 21, 2010

Ok this is a bit weird. If I run this on my machine using IE everything looks fine. If I publish to my server and run using same machine and same browser my multiline textboxes show for a split second correctly then they scroll horizontally and get all messed up? Why are the scrolling horizontally and why do they look fine locally?

.style3
{
margin-bottom:5px;
overflow:hidden;
border:2px solid #666;
outline: none;

[Code]....

View 3 Replies

Javascript - Horizontal Scrolling For GridView

Nov 30, 2010

I've got my GridView inside another Panel and I got scrollbars but GridView is to big even with paging. So user needs to scroll down to scroll horizontal (to see horizontal scrollbar). How can I add any horizontal scrolling trick for my GridView in the Panel. Maybe something from javascript ? My js knowledges is still being poor. I really hard thinking on what that could be, maybe floating horizontal scrollbar?

View 2 Replies

Forms Data Controls :: Using Panel Control For Scrolling GridView Rows

Aug 13, 2010

I put a GridView control in a Panel control so that the GridView's rows can be scrolled vertically. With selection of row enabled for a Button field, I am able to select any row with the selected row background color highlighted. Problem is when you scroll down to a row that is way pass the Panel height and select the row, after postback the GridView will render to show the top rows which are visible within the Panel height. So the selected row in it's background color cannot be seen.

View 3 Replies

Forms Data Controls :: Listview Drag And Drop With Auto Scrolling

Feb 15, 2010

I am developing website using ASP.NET, C# and JScript. I have the webpage with List view, and the list view items are added dynamically. I am working with Drag and Drop in the listview, I have done the Drag and Drop functionality using javascript, But that is not scrolling up and down when we have more values in the list view. automatic scrolling in the List view control when we drag the Items on List View

View 5 Replies

Forms Data Controls :: Overcome Scrolling Up In The Gridview Edit Mode?

May 7, 2010

I have gridview haivng the edit mode

when i click on the edit link it is scrolling up.

i need to stay at the same position .

i also used MaintainScrollPositionOnPostback=true;

but there is no use.

View 2 Replies

Forms Data Controls :: Headers To Stay Fix While Vertical And Horizontal Scrolling?

Nov 10, 2010

Newbie to ASP.net. Programming in C#.I'm querying a SQL database and displaying the results in a gridview. The results can be many records so I need to provide the facility to scroll vertically and horizontally. To display the headers when scrolling I have implemented ( in my asp code) the headers in another table and the data is in another table. I see now I cannot align the column headers with the table data.Appreciate any help to fix this issue. ( What I need is a similar to the freeze function in excel where you can freeze the header while scrolling horizontally and vertically)If this method is not a good one to display headers with data please suggest another methodHere is my ASP code.

<div id="divProjectTableHeaderFullDetail" runat="server" style="background-color: #993300;
height: 40px; width: 770px; margin: 0; padding: 0 ; " >
<table style="font-family: Arial; font-size: 10pt; color: white;" cellspacing="0"

[code]...

View 11 Replies

Determine From Where Javascript Is Coming - Awful Scrolling

Jan 25, 2010

So I've been handed an older website, and been asked to make some modifications. It's been made with ASP, and I'm not really familiar with it. [URL] I've been asked to get rid of that awful scrolling. By looking at the page source, I determined that the scrolling is done using some inline Javascript.

<script type="text/javascript">
function getElementPosition(theElement){
var posX = 0;
var posY = 0;
while(theElement != null){
posX += theElement.offsetLeft;
posY += theElement.offsetTop;
theElement = theElement.offsetParent;
}
return {x:posX, y:posY};
}
var offsetY = 0;
window.onload = function(){............................

View 3 Replies

Forms Data Controls :: Grid Level Horizontal Scrolling (left To Right) - Freezing First Two Columns?

Jan 17, 2011

A gridview is having 96 fields/columns retrieving data from an xml file.I need to gridlevel horizontal scrolling from 3 rd column keeping first two columns freeze .While scrolling horizontally (e.g. left to right), The column header have to move horizontally. Kindly guide me for the same. I got the scrollbars but now my issue is how to freeze first two columns of a gridview(for comparing values in one column with other column values)

<div style="overflow:scroll"></div>

[Code]....

Keeping Heading and Title column freeze and doing gridlevel horizontal scrolling for the rest.

View 2 Replies

Javascript - Window Scrolling Button Control - Rendering To Normal Position

Nov 9, 2010

In web application, i tried scrolling the window vertically by increasing a y axis height to 500 with a javascript that is attached to OnClientClick event of a asp.net button control with id Button1. The script i have used is

<script language="JavaScript">
function scrollToWindow()
{
window.scrollTo(0,500);
}
</script>

and the button code is as follows

<asp:Button ID="Button1" runat="server"
Text="Scroll to bottom" OnClientClick="scrollToWindow()" />

If i run this page and click that button, the page scroll is not working properly. when i put alert inside that script and debug, i found that the page is actually scrolling to 0,500 but again its rendering to its normal position because of some reasons. Overcome this issue and let me know the reason behind that?

View 3 Replies

Data Controls :: JQuery Range Slider And Load Data When Page Is Scrolling Using DataList

Sep 20, 2015

I have read and referred your range slider and loading infinite images on scroll.The issue is when combining both the article the data is appending to old one.

View 1 Replies

Data Controls :: Load Data While Scrolling Down - Records Getting Repeated

Apr 7, 2014

This has reference to the article on ASPSnippets "Load data while Scrolling Page down with jQuery AJAX and ASP.Net".Records repeat after scrolling (e.g. Records 1-10 repeat after 10th record) 

I verified that the pageIndex gets incrimented after the scroll by setting breakpoints at the point where the cmd.parameters value is being set(could not verify that further from hereafter though).

The stored procedure is able to fetch records e.g. 41-50 correcly affter excution in standalone mode by passing pageIndex=5 and pagesize=10 parameters etc. etc. etc.I also verified the code(line by line) from the site but, could not resolve the issue in more than a day's work.

View 1 Replies

Data Controls :: Load Data While Scrolling Down - Undefined Message

Apr 4, 2014

After 10 records its displaying popup with error message 'undefined'.

BTW: My project is on .NET Framework 4.

View 1 Replies

Data Controls :: Load DataList With Images On Scrolling Down Using JQuery?

Sep 20, 2015

[URL] 

the above link for Create GridView with TemplateField  and asp control for Load images while scrolling page down with jQuery.in above link code we can show only one image in one  row 

but datalist have ReaptColunm to set 3-4 according to ur need 

when i used above code for datalist its not working  .when scroll down  it bind duplicate value.

View 1 Replies

Data Controls :: Loading Records In GridView While Scrolling Down Without Using Paging

Jan 16, 2013

I have used a GirdView to display data from database,  data would be huge around 670 rows. And also I want to display all data together on single page.

Therefore I want to use virtual page scrolling. Means on Page load only 20 rows would be displayed, then when page would be scrolled next 20 rows would be displayed.....

View 1 Replies

Forms Data Controls :: Gridview Header And Footer Should Not Move While Scrolling Gridview

Sep 13, 2010

i am using Grid view. when ever bulk data is there in Gridview, Header and footer must not be move..

how can i do that.

View 3 Replies

Scrolling - JQuery Technique To Select All The Page Controls/divs With A Non-zero Scrollbar Position?

Sep 9, 2010

Is there a jQuery technique to select all the page controls/divs with a non-zero scrollbar position?

I'm trying to solve a problem faced by many; essentially after a partial asp.net postback all the controls/divs that had a scrollbar with a non-zero value (ie: were scrolled down to some position) are reset to the zero (top of the scrollbar).

My approach is to have a jQuery script save all the scrollbar positions for all the controls/divs contained on a page and after the postback, restore all the scroll bar positions.Is it possible, can it even work? If it is, how do I use jQuery to select all the divs with scrollbars and then save those positions.

View 2 Replies

Web Forms :: Regarding Scrolling A Web Page Up And Down?

Oct 27, 2010

i have create an asp.net webapplication for which it has a master page with a 1280x1024 image as background,

so the whole application is within the 1280x1024 resolution, the thing is i tried to open the application from an ipad and when i am trying to scrolldown it shows me hell.it keeps pulling up....

i.e, when i try to scroll down, the page pulls up back again..I dont know whats causing this ...

View 4 Replies

Web Forms :: Scrolling Text From SQL?

Nov 12, 2010

wanted to create some scrolling text on a page dictated from a sql query, in html days i used marquee but this didnt seem to work, and nor do i know how to fit it into a sql query, i was a select query attached to a label would do the job,

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved