TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kanaparthi Sureshma Reddy
NA
85
38.3k
How to convert string to List in windowsforms?
Aug 7 2015 6:09 AM
Hi,
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<string> TestName = new List<string>();
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<string>;
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
Reply
Answers (
2
)
Datagridview Cell value clear when enter duplicate value
Datagridview Cell value clear when enter duplicate value