kssknov wrote:
i want to show a column value from datatable.I tried as below . it doesnt shows the values.
Yes, you can get values from your DataTable. You could get them from either the DataGridView, or from the DataTable itself I'm just going to show you how to get them from the DataTable. Lets say you want to get all values from a specific column, here's how you would do it:
for (int rowIndex = 0; rowIndex < yourDataSet.yourDataTable.Rows.Count; rowIndex ++)
{
for (int columnIndex = 0; columnIndex < yourDataSet.yourDataTable.Columns.Count; columnIndex ++)
{
Console.WriteLine(string.format("Row {0}, Column {1} cell value is {2} !", rowIndex.ToString(),
columnIndex.ToString(), yourDataSet.yourDataTable.Rows[rowIndex][columnIndex].ToString()));
// for columnIndex you can use the column name if you'd like.
}
}
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")