C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

To make checkbox checked


Posted Date: 04 Nov 2009      Posted By: Elz      Member Level: Gold     Points: 1   Responses: 2



Hi all,
New Page is having griview with checkbox.Id gets saved into database corresponding to checkbox clicked.

In edit page i had id value from database.I had to check the checkbox in datagridview corresponding to the value.(C# windows application)


Thanks





Responses

Author: R.M.Phani Kumar    04 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

On Item Command event of grid view

Check for the Checkbox control using findControl method

and then assign the value



Author: Praveen    04 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

hi,

after assigning datasource property to the datagridview


foreach (dataGridViewRow dgvr in DataGridView1.Rows)
{
// according to the condition
{
dgvr.Cells[0].Value=true;
}
}

hope that will give you an idea



Post Reply
You must Sign In to post a response.
Next : Email Validation
Previous : Bind a multiple rows in a datagrid view
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use