Click here to Skip to main content
15,886,640 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, when i added rows into a grid view with 4 columsn
1 is Check box,
and remaining are text columns
after all the rows are added, when i checked the first row check box and click on a button to run the process, the first row check box returns false value, even i checked.
the following code i have tried to add the data into the grid.

please help me to solve the issue.

What I have tried:

foreach (DataRow fdr in getmydata.ListFiles().Rows)
            {
                object[] obj = { false, fdr["File Name"].ToString(), fdr["Size"].ToString(), fdr["Attributes"].ToString() };
                Dgv_Grid.Rows.Add(obj);
            }
Posted
Comments
Bryian Tan 25-Jan-18 23:45pm    
I guess on Page Load the Grid get re-initialized/re-bind and restored to default value?
chaitanya556 25-Jan-18 23:49pm    
Data is added after the load event. in load event i haven't written any code regarding the datagridview. I'm calling this code from a button
Karthik_Mahalingam 26-Jan-18 3:11am    
Tip
use "Reply" button to post comments/query , so that the user gets notified and respond to your text.
chaitanya556 27-Jan-18 1:12am    
Oh sorry.. Thank you. Any way the issue solved...
Thanks
Karthik_Mahalingam 27-Jan-18 1:19am    
Cool

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