DataTable!!!

  • Thread starter Thread starter Vai2000
  • Start date Start date
V

Vai2000

Hi All, Is there a way by which I can autopad contents of a DataTable. For
e.g I have created a data table with data columns of fixed length. When I
insert data into these columns I automatically want to pad them (left/right)
with 'X' if they are less than the max length.
Do I have to do with manually when I insert or the Datatable can auto pad it
and all I do is insert?

TIA
 
Vai2000,
I would probably use the DataTable.ColumnChanged or DataTable.ColumnChanging
event to modify the value of the column after your code set the value. I
find the a Table Module works well when using DataTable events.
http://www.martinfowler.com/eaaCatalog/tableModule.html

I use the above events & the DataTable.RowChanged & DataTable.RowChanging
event to handle some custom expressions.

Just watch for recursive updating ;-)

Hope this helps
Jay
 
Back
Top