Cannot update DataTable containing a Column expression

A

Andrea Biagini

Hi all,
I have a DataTable Column which expression Property
is valorized like this:

Tbl.Columns["Elimina"].Expression =
"'<INPUT type=\"button\" value=\"Elimina\" class=\"Testo\"
onclick=\"CallDeleteDialogBox(' + " +
"CONVERT(" + Tbl.PrimaryKey[0].ColumnName + ",System.String)" +
"+ ')\">'";

(I want to show a button that calls a dialogbox)

I cannot update this table, it causes a exception:
"Impossible to modify ReadOnly property of the expression column".

Is it a standard behavior (you cannot update a table with an
expression column)?

Thanks.
Andrea.
 
M

Miha Markic [MVP C#]

Hi Andrea,

How exactly are you trying to update the table?
You can't update value in expression column, that's for sure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top