Users Pricing

forum

home / developersection / forums / number of columns using rowdatabound in asp.net

number of columns using rowdatabound in asp.net

Anonymous User 2315 27 Nov 2014

I need to find count of total number of columns in a gridview inside the event rowdatabound .Is there any way for it. Below is my few code: 

   protected void gvEmployee_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            LinkButton lnkView = new LinkButton();
            lnkView.ID = "lnkView";
            lnkView.Text = "View";
            lnkView.Click += ViewDetails;
            e.Row.Cells[3].Controls.Add(lnkView);
        }


I am a content writter !


1 Answers