<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="C1WebForms_GridView._Default" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.48" Namespace="C1.Web.Wijmo.Controls.C1GridView" TagPrefix="wijmo" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    
    <script>
        function C1GridView1_OnClientSelectionChanged(s, e) {
            console.log(s); //Self
            console.log(e); //Arguments


        }
    </script>
       
    <div style="display:flex">
          <wijmo:C1GridView ID="C1GridView1" runat="server" ScrollingSettings-Mode="Vertical" Height="380px" Width="700px"
              AutoGenerateColumns="false" ShowRowHeader="true" AllowSorting="true" ShowGroupArea="true" AllowColMoving="true" 
              CallbackSettings-Action="All" AllowPaging="true" OnPageIndexChanging="C1GridView1_PageIndexChanging"
              ClientSelectionMode="SingleRow" OnClientSelectionChanged="C1GridView1_OnClientSelectionChanged" 
              OnColumnGrouped="C1GridView1_ColumnGrouped" OnColumnMoved="C1GridView1_ColumnMoved" OnColumnUngrouped="C1GridView1_ColumnUngrouped"
               OnSorting="C1GridView1_Sorting" OnRowDataBound="C1GridView1_RowDataBound" GroupAreaCaption="Drag and drop fields here">
             
        <Columns>           
            <wijmo:C1BoundField HeaderText="ID" DataField="ProductID" SortExpression="ProductID" Width="100px"/>
            <wijmo:C1BoundField HeaderText="Product name" DataField="ProductName" SortExpression="ProductName" Width="280px" />
            <wijmo:C1BoundField HeaderText="UnitPrice" DataField="UnitPrice" SortExpression="UnitPrice" Width="110px" />
            <wijmo:C1BoundField HeaderText="Category" DataField="CategoryID" SortExpression="CategoryID" Width="110px">
               
                <GroupInfo HeaderText="Category Number : {0}" OutlineMode="StartExpanded">
                </GroupInfo>
            </wijmo:C1BoundField>
        </Columns>
             
    </wijmo:C1GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\NWind.mdb;Persist Security Info=True" ProviderName="System.Data.OleDb"
        SelectCommand="SELECT [ProductID], [ProductName], [UnitPrice], [CategoryId] FROM [Products]">
    </asp:SqlDataSource>
  
        </div>
</asp:Content>