本文整理汇总了C#中Telerik.MarkErrorAsHandled方法的典型用法代码示例。如果您正苦于以下问题:C# Telerik.MarkErrorAsHandled方法的具体用法?C# Telerik.MarkErrorAsHandled怎么用?C# Telerik.MarkErrorAsHandled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Telerik
的用法示例。
在下文中一共展示了Telerik.MarkErrorAsHandled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCustomersDataSourceLoadedData
private void OnCustomersDataSourceLoadedData(object sender, Telerik.Windows.Controls.DomainServices.LoadedDataEventArgs e)
{
if (e.HasError)
{
e.MarkErrorAsHandled();
}
}
示例2: OnDistinctValuesDataSourceLoadedData
private void OnDistinctValuesDataSourceLoadedData(object sender, Telerik.Windows.Controls.DomainServices.LoadedDataEventArgs e)
{
if (e.HasError)
{
e.MarkErrorAsHandled();
this.debugTextBox.Text = string.Format("<-- Server could not get distinct values for '{0}' column: {1}\r\n"
, this.distinctValuesDataSource.QueryParameters[0].Value
, e.Error);
}
else if (e.Cancelled)
{
this.debugTextBox.Text = string.Format("<-- Load operation was cancelled\r\n");
}
else
{
TimeSpan elapsedTime = DateTime.Now - this.startTime;
this.debugTextBox.Text += string.Format("<-- Server returned {0} distinct values for '{1}' column in {2} ms\r\n"
, e.Entities.Count()
, this.distinctValuesDataSource.QueryParameters[0].Value
, elapsedTime.Milliseconds);
List<string> list = new List<string>();
// You might want to limit the amount of distict values
// if you think that the user can generate a very long query.
foreach (DistinctValue dv in e.Entities)
{
list.Add(dv.Value);
}
this.distinctValues.AddRange(list);
}
}
示例3: MyRadDomainDataSource_SubmittedChanges
void MyRadDomainDataSource_SubmittedChanges(object sender, Telerik.Windows.Controls.DomainServices.DomainServiceSubmittedChangesEventArgs e)
{
if (e.HasError)
{
//Avoids displaying errors, when deletion is prevented by DataBase constraints
e.MarkErrorAsHandled();
}
}