customize some rows of dataset?

  • Thread starter Thread starter Michael Appelmans
  • Start date Start date
M

Michael Appelmans

I need to display a list of image names from a database and highlight
the row if the image does not exist in a directory (or the name in the
database was a typo)

Can anyone direct me to an example showing how to customize rows (not
all, just ones that meet a specific criteria) in a dataset?

Would it be better to load the dataset and then read through the dataset
and set row properties or to have an event function that triggers as
each row is loaded and modifies the row's properties?

Thanks for any help with this.

Michael
 
You do not "customize' datarow in datatable (dtaset), they are only stay in
memory, not visible. You display data in dataset through Win form
controls/web controls, such as Win form datagrid/web form datagrid. So, you
customize these controls instead.

If it is Win form app, you look at overriding DataGridColumn's Paint()
method, for web app, you look at DataGrid's ItemCreated or ItemBound event
handler. In those method, when each row (item) is to be drawn on the screen
or before rendering as HTML page, you check the row/item's value and change
its color/font accordingly. No change on the data in dataset is needed.
 
Back
Top