Extra properties in DataTable returned by web service

  • Thread starter Thread starter szwejk
  • Start date Start date
S

szwejk

Hi!

I want to return DataTable from web service method. This method
generate xml with schema and data. Is there any way to retrun more
informations about columns? If I want to get maxLength there is no
problem because DataColum has property MaxLength, but I need more
(e.g. color, mask..) Thx for help!
 
szwejk,

I'm not sure what you mean, as the DataTable doesn't have any color or
mask properties.

Whatever this information is you are trying to return, you can create a
different type that includes the information from the DataTable as well as
the extra information you have which isn't part of the DataTable.
 
I know that DataTable doesn't have properties that I need. But I'd
like to ask is there any simple way (e.g. like override DataTable,
DataColum or prepere special types in data columns or any other ideas)
when web service can retrun additional informations in schema about
data in every column?
 
szwejk,

No, you can't. The DataSet doesn't have the hooks to insert this extra
data, and it would affect the schema ^and^ the XML that is output by the
DataSet.

However, you can transform the XML that the DataSet produces and append
the extra data you need (in the schema, and in the XML instance).


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I know that DataTable doesn't have properties that I need. But I'd
like to ask is there any simple way (e.g. like override DataTable,
DataColum or prepere special types in data columns or any other ideas)
when web service can retrun additional informations in schema about
data in every column?
 
Back
Top