Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to insert a specific coloumn values in gridview in asp.net.
First ths gridview gets loaded by retrieving data from database..
Then i want to insert values in a specific column.
Is it possible?
Posted

1 solution

Hi friends,

You should use this code in code behind then you can able to add column value in gridview.

C#
foreach (GridViewRow Itemvalue in GridView1.Rows)
     {
        string getFirstColValue = Itemvalue.Cells[0].Text;
        Itemvalue.Attributes.Add("id", getFirstColvalue );
     }


than u.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900