I want to convert string value to List.How to Convert this.
Here is My Code.
private void TestGridData_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
DataGridViewRow row = new DataGridViewRow();
List
int I = TestGridData.CurrentCell.ColumnIndex;
string Head = TestGridData.Columns[I].Name;
if (Head == "check")
{
row = TestGridData.CurrentRow;
int row2 = row.Index;
TestCost = Convert.ToInt32(TestGridData[2, row2].Value);
string Name = TestGridData[1, row2].Value.ToString();
}
// TestName=Name as List
sum = sum + TestCost;
txtcost.Text = sum.ToString();
}
And the string value stored in Name and list stored in TestName.How to convert this Name to List.In this the commented line i tried but i didn't get correct output.
Please help me to get correct output


Manas MohapatraRank #182 · 13.2K reputationPosted Aug 7, 2015, 2:27 AM EDT
int I = TestGridData.CurrentCell.ColumnIndex;
string Head = TestGridData.Columns[I].Name;
if (Head == "check")
{
row = TestGridData.CurrentRow;
int row2 = row.Index;
TestCost = Convert.ToInt32(TestGridData[2, row2].Value);
}
Pranay RanaRank #735 · 3.2K reputationPosted Aug 7, 2015, 2:30 AM EDT