Beispiel #1
0
 void _flex_GetRowErrorInfo(object sender, C1.Win.C1FlexGrid.GetErrorInfoEventArgs e)
 {
     if (object.Equals(_flex[e.Row, "Discontinued"], true))
     {
         e.ErrorText = "Please check that this product\r\nhas really been discontinued.";
     }
 }
Beispiel #2
0
 // provide custom error information in addition to the IDataErrorInfo stuff
 void _flex_GetCellErrorInfo(object sender, C1.Win.C1FlexGrid.GetErrorInfoEventArgs e)
 {
     if (_flex.Cols[e.Col].Name == "UnitPrice")
     {
         if ((decimal)_flex[e.Row, e.Col] > 100)
         {
             string fmt = "This product has a high unit price ({0:c}),\r\n" +
                          "call supplier {1} and negotiate a discount.";
             e.ErrorText = string.Format(fmt, _flex[e.Row, e.Col], _flex[e.Row, "SupplierID"]);
         }
     }
 }