ComponentOne GridView for ASP.NET WebForms
Task-Based Help / Formatting the Grid's Content / Creating a Scrollable Grid
In This Topic
    Creating a Scrollable Grid
    In This Topic

    Complete the followingsteps to enable vertical and horizontal scrolling in a C1GridView control.

    In the Design View

    1. Select the GridView control and right click to open Properties > Properties Window.
    2. In the Properties Window, Expand Scrolling Settings and change the Mode to Both.
    3. Enter 250px in the Height textbox and 450px in the Width textbox.

    In Code

    To write the code in Visual Basic:

    Visual Basic
    Copy Code
    ' Set the grid's height and width.
     C1GridView1.Height = 250
     C1GridView1.Width = 450
    ' Turn scrolling on and set both horizontal and vertical scrolling.
     C1GridView1.ScrollingSettings.Mode = C1.Web.Wijmo.Controls.C1GridView.ScrollMode.Both

    To write the code in C#:

    C#
    Copy Code
    // Set the grid's height and width.
     C1GridView1.Height = 250;
     C1GridView1.Width = 450;
    // Turn scrolling on and set both horizontal and vertical scrolling.
     C1GridView1.ScrollingSettings.Mode = C1.Web.Wijmo.Controls.C1GridView.ScrollMode.Both;

    In Source View

    Modify the ScrollingSettings property within the <cc1:C1GridView> to enable both horizontal and vertical scrolling.

    
     <cc1:C1GridView ID="C1GridView1" runat="server" Height="250px" Width="450px">
        <ScrollingSettings Mode="Both">
        </ScrollingSettings>
    
    
    Note that the Height and Width properties must be specified in order for the scrollbars to appear and scroll properly.
    See Also