I m creating columns at runtime,I want to know how add delete & edit buttons in each row & to create them at runtime..Foll code create columns at runtime -

protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("SNo");
                dt.Columns.Add("First Name");
                dt.Columns.Add("Last Name");
                dt.Columns.Add("EMail");
                dt.Columns.Add("Address");
                dt.Columns.Add("Phone No");

           }
        }

        catch (Exception ex)
        {
            Label1.Text = ex.Message.ToString();
        }

    }

Sorry, wrong forum. Post your question to DaniWeb's C# forum.

Do you really want the buttons in the row? It seems like you should have buttons on the page near the grid to do customizations as you don't want to repeat these buttons for every row on the grid.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.