or
Hello,
When I try to insert,update or delete the data through the RadGridview of the program,
if it occurred the pop up error message from the Database(ex:primary key constrain),
the RadGridview will be freezed,then I can't edit the data in the RadGridview any more,
if I force it to work,sometimes cause the program crashed,
I must restart the program to let RadGridview work normally again,
is this problem fixed in the latest version? if not,how to solve this problem?
I use the 2008 Q2 SP1,DB is SQL Server 2005.
Best regards.
private
RadPropertyStore CreatePropertyStore(
string
uid)
{
RadPropertyStore vInfoStore =
new
RadPropertyStore();
DataTable dt = Global.www.GetVirtualMachine(uid);
PropertyStoreItem v_nm =
new
PropertyStoreItem(
typeof
(
string
),
"Name"
, dt.Rows[0][
"v_nm"
],
"Name"
,
"INFO"
);
vInfoStore.Add(v_nm);
return
vInfoStore;
}
private
void
radListView1_SelectedIndexChanged(
object
sender, EventArgs e)
{
ListViewDataItem item = radListView1.SelectedItem;
string
uid = item[
"uid2"
].ToString();
this
.radPropertyGrid1.SelectedObject = CreatePropertyStore(uid);
}
if (this.radScheduler.SchedulerElement.ViewElement is SchedulerDayViewElement) |
{ |
SchedulerDayViewElement dayView = this.radScheduler.SchedulerElement.ViewElement as SchedulerDayViewElement; |
if (dayView != null) |
{ |
foreach (RadElement element in dayView.DataAreaElement.Table.Children) |
{ |
SchedulerCellElement cell = element as SchedulerCellElement; |
if (cell != null) |
{ |
if (cell.Date <= DateTime.Now) |
{ |
cell.Enabled = false; |
cell.CanFocus = false; |
} |
else |
{ |
cell.Enabled = true; |
cell.CanFocus = true; |
} |
} |
} |
} |
} |
else if (this.radScheduler.SchedulerElement.ViewElement is SchedulerMonthViewElement) |
{ |
SchedulerMonthViewElement monthView = this.radScheduler.SchedulerElement.ViewElement as SchedulerMonthViewElement; |
foreach (RadElement element in monthView.MonthViewAreaElement.Children) |
{ |
if (element is MonthCellElement) |
{ |
MonthCellElement e = element as MonthCellElement; |
if (e.Date < DateTime.Now.Date) |
{ |
element.Enabled = false; |
} |
} |
} |
} |
this
.PageView1.Item.Visibility = ElementVisibility.Hidden;