C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Training   ASP.NET Web Hosting    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

Play Silverlight Games or Submit your Silverlight applications and earn 90% AdSense revenue.

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Forums » .NET » .NET »

Combox inside Datagrid view in C# windows application


Posted Date: 10 Jan 2009      Posted By: shanthy      Member Level: Silver     Points: 1   Responses: 1



Hi

I have created a C# windows application.
I have populate a combo box inside a datagrid view.but how to save the values. I need to access the column of the datagrid view. Please help me.





Responses

Author: MADHAVAN    10 Jan 2009Member Level: SilverRating:     Points: 5

This is for four check boxes in datagridview…..


int rows = dataGridView1.Rows.Count;

for (int i = 0; i < rows; i++)
{

if (dataGridView1.Rows[i].Cells[0].Value !=null )
{
k1 = dataGridView1.Rows[i].Cells[0].Value.ToString();
if (k1 == "True")
{
//ur assignment
}

}

if (dataGridView1.Rows[i].Cells[1].Value != null)
{
k2 = dataGridView1.Rows[i].Cells[1].Value.ToString ();;
if (k2 == "True")
{
//ur assignment

}

}

if (dataGridView1 .Rows[i].Cells [2].Value != null )
{
k3 = dataGridView1.Rows[i].Cells[2].Value.ToString ();;
if (k3 == "True")
{
//ur assignment
}

}

if (dataGridView1.Rows[i].Cells[3].Value != null)
{
k4 = dataGridView1.Rows[i].Cells[3].Value.ToString ();;
if (k4 == "True")
{
//ur assignment
}

}



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : huge database takes time to retrieve in Datagrid
Previous : how to remove the numbers in end of the string
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use