How to make DataGrid (Web) have different display formats depending on different conditions?

zhaozj2021-02-16  53

For example, a field BJ_COLOR in a table, I want BJ_Color 1 data behavior, bj_color 2 data behavior blue, bj_color is 3 data behavior, what should I do?

My thoughts at the beginning is that all columns are used as template columns, but it can be solved, but it is too complicated.

Later, the master pointing point:

In the DataGrid ItemDataBound event which is determined in the following are VB.NET Sub Datagrid1_ItemDataBound (source As Object, e As DataGridItemEventArgs) If (e.Item.ItemType = ListItemType.Item Or _ e.Item.ItemType = ListItemType.AlternatingItem) Then If Convert .Todatetime (E.Item.cells (1) .text)

Check again, the world is quiet ...

转载请注明原文地址:https://www.9cbs.com/read-19027.html

New Post(0)