How display RowState in computed column?

  • Thread starter Thread starter Bill Todd
  • Start date Start date
B

Bill Todd

Is there any way to display the RowState of each row in a computed
column in the DataTable?
 
Bill, the better metaphor is that a Row belongs to a table as opposed to a
column. Anyway, if it's a computer column it's based on a row. That Row
has rowstate

foreach(DataRow dro in myTable.Rows){
//Do Something;
}
 
Let me restate the problem. I have an existing DataTable and the
Columns collection of that DataTable includes a column in which I want
to display the RowState as a string. The question is, what expression
can I assign to the Expression property of the DataColumn that will
evaluate to the RowState, preferably as a string?

Thanks,

Bill
 
Hi Bill,

Based on my understanding, you want to display rowstate in a datacolumn in
datatable.

Actually, you can not display RowState in computed column through
DataColumn.Expression, because DataColumn.Expression has no such function.

Can you show me why you want to do this? I think you may want to display
the rowstate in a datagrid column. If you want to do this, you handle the
DataGrid UI's "changed" event, then query and display the rowstate in a
datagrid column.

This depends on you handle webform or winform datagrid, for more
information, please refer to this discussion:

http://groups.google.com/groups?hl=zh-CN&lr=&ie=UTF-8&oe=UTF-8&threadm=uq4Tz
t6HDHA.1784%40TK2MSFTNGP11.phx.gbl&rnum=4&prev=/groups%3Fq%3DDataColumn%2BEx
pression%2BRowState%26hl%3Dzh-CN%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D
uq4Tzt6HDHA.1784%2540TK2MSF

==============================
Please apply my suggestion above and let me know if it helps resolve your
problem.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hello Bill,

I was reviewing the issue. Has the problem been resolved by Jeffery's
suggestoin? If there is any unclear, please feel free to post here and we
will follow up.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top