DataTable.DisplayExpression-Property

  • Thread starter Thread starter Steffi
  • Start date Start date
S

Steffi

Hi,

do anybody have an idea for what to use the DisplayExpression-Property of
the DataTable?

I couldn't find out any sense of it and also no good answer in the internet.

So I hope very much that there is somebody able to tell how to use it.

Thanks

Steffi
 
Hello Steffi,
do anybody have an idea for what to use the DisplayExpression-Property
of the DataTable?

According to the documentation available at MSDN, the DisplayExpression property "Gets or sets the expression that will return a value used to represent this table in the user interface".

DataTable.ToString() gets the TableName and DisplayExpression, if there is one, as a concatenated string.

Say you had a large dataset with multiple tables. This would allow you to show a user-friendly display name for the table in, say, a list box or a menu bar.
 
Hello,

I tried out everything, but for DisplayExpression there are only ColumnNames
allowed. No other String is excepted. So I still have no idea for what to
use it. Can anyone help me, please?

Steffi

Matt Berther said:
Hello Steffi,


According to the documentation available at MSDN, the DisplayExpression
property "Gets or sets the expression that will return a value used to
represent this table in the user interface".
DataTable.ToString() gets the TableName and DisplayExpression, if there is one, as a concatenated string.

Say you had a large dataset with multiple tables. This would allow you to
show a user-friendly display name for the table in, say, a list box or a
menu bar.
 
Back
Top