How to Use editableGridView.ascx component for .NET

Just register your tag in the page you want to use it and add the component where you want insid the body of the page (in my case WebForm2).

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %>
<%@ Register TagPrefix="mygrids" TagName="EditableGridView" Src="editableGridView.ascx"%>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
           <mygrids:EditableGridView ID="edgv1" runat="server"></mygrids:EditableGridView>
        </div>

    </form>
</body>
</html>


Then in the page code-behind:

protected void Page_Load(object sender, EventArgs e)
        {
            List<String> l = new List<string>();
            l.Add("CompanyName");
            l.Add("ContactName");
            edgv1.InitGrid(gl.constr, "Customers", l);
            if (!IsPostBack)
            {
                edgv1.Bind();
            }
        }

If you want all fields then you do not need to pass the list, just the connection string, and the name of the table.
For any comments, write me at nwscomps@gmail.com

Francesco Savastano

