Try this C# code on datatable to avoid null reference error message...........
for (int i = 0; i < dt.Rows.Count;i++ )
for (int i = 0; i < dt.Rows.Count;i++ )
{
for(int
j=0;j<dt.Columns.Count;j++)
{
if(string.IsNullOrEmpty(dt.Rows[i][j].ToString()))
{
// Write your Custom Code
dt.Rows[i][j] = "your
required value";
}
}
}
No comments:
Post a Comment