Last Updated: February 25, 2016
·
648
· gangrenagastrit

Bind null problem

If u want bind data from field datetime type u may no pass run-time null-check.

problem code:
<dx:ASPxDateEdit ID="deEnd" runat="server" Width="100%" Date='<%# Bind("DATE_END")%>' />

right code:
<dx:ASPxDateEdit ID="deEnd" runat="server" Width="100%" Value='<%# Bind("DATE_END")%>' />

Use Value property instead of Date property. Also when you use checable control:

problem code:
<dx:ASPxCheckBox ID="cbEnabled" runat="server" Text="Enabled" Checked='<%# Bind("ENABLED")%>' />

right code:
<dx:ASPxCheckBox ID="cbEnabled" runat="server" Text="Enabled" Value='<%# Bind("ENABLED")%>' />