How to Convert datatable column values to lower case
How to Convert datatable column values to lower case
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rafnas T PPosted Feb 28, 2017, 1:22 AM
dt.Columns["ColumnName"].Caption = dt.Columns["ColumnName"].Caption.ToLower();
And if you want to change row values of this column to lower case you need to use for loop like;
foreach (DataRow dataRow in dt.Rows)
{
dataRow["ColumnName"] = dataRow["ColumnName"].ToString().ToLower();
}