开发者

good/simple example asp:gridview describing all its functionalities?

开发者 https://www.devze.com 2023-01-13 15:59 出处:网络
I have a temporary datatable, private DataTable getmyDatatable() { DataTable dt = new DataTable(); DataColumn dc;

I have a temporary datatable,

 private DataTable getmyDatatable()
    {
        DataTable dt = new DataTable();
        DataColumn dc;
        dc = new DataColumn("Name");
        dt.Columns.Add(dc);
        dc = new DataColumn("Age");
        dt.Columns.Add(dc);
        dc = new DataColumn("Address");
        dt.Columns.Add(dc);
        dc = new DataColumn("Phone");
        dt.Columns.Add(dc);
        //dc = new DataColumn("Sex");
        //dt.Columns.Add(dc);

        dt.Rows.Add("bala", "24", "cbe","999444444");
        dt.Rows.Add("chendur", "23", "b开发者_运维问答angalore","9999999999");
        dt.Rows.Add("chchandru", "22", "chennai","888888888");

        return dt;
    }

Now i want this datatable to bind it to a gridview and work out row editing,row deleting,row updating, new row add etc... As i am a beginner refer me good/simple example asp:gridview describing all its functionalities? Any suggestion..


Asp.net QuickStart for GridViews is one option.

0

精彩评论

暂无评论...
验证码 换一张
取 消