You must Sign In to post a response.
  • Category: ASP.NET

    How to Set Horizontal Scroll Bar in Asp.Net Page

    Hi Developers,

    I am Creating a Page with Two Div.
    1st One =Picked Up the Stored values from the Database.
    2nd One =Gridview Dynamic Textbox, user should input the values. and Bind the GridView.

    Picked Up values are Relate With User Insert value.
    My Output Wiil be like the following.
    1.The Picked Up Values are displaying the as a Header(Top).=500px.
    2.If I do Scroll na The Picked Up Values Must Display. GridView only should be Scrollable.
    (1st DIC must display always . 2 DIV only Scroll and chage)

    So Friends Help me to How to i am done this type of task.

    Thanks with
  • #765283
    Here is a basic solution using javascript:
    Just put gridview in div and execute below code
    function position(table) {
    table.rows[0]"0px"; = table.rows[0].clientHeight/1.2;
    var widths = Array();
    for(var i = 0; i < table.rows[0].cells.length; i++) {
    widths[i] = max(table.rows[0].cells[i].clientWidth, table.rows[1].cells[i].clientWidth);
    for(var row = 0; row < table.rows.length; row++) {
    for(var col = 0; col < widths.length; col ++) {
    table.rows[row].cells[col].style.width = widths[col] + "px";

    function max(num1, num2) { return (num1 > num2) ? num1 : num2; }

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • Sign In to post your comments