Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello all,

I need to validate if a row is the last one in a datatable to set its default value using DataColumn.Expression where I can use the "IIF"
dataTable.Columns[columnName].Expression = "IIF(RowIndex < RowCount,  'test', ' ')'";


how to get the rowindex of the row that I am in and the total row count of the datatable inside the expression
Posted
Comments
Abdul Quader Mamun 28-Jun-12 10:36am    
When you need the RowIndex?
Herman<T>.Instance 28-Jun-12 11:12am    
Have you Read this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900