Completed
Last Updated: 05 Jun 2014 07:07 by ADMIN
ADMIN
Julian Benkov
Created on: 11 May 2011 05:17
Category: GridView
Type: Bug Report
0
Exception in edit mode when used entity model
I have create a model Entity  with two table on sql 2008 . 
 Order and detailorder  ( one to many related)
In detailorder  Class in have create a custom property 

public readonly property Amount as decimal
 get
 return qta * price
end get
end property

In order  Class in have create a custom property 
public property TotalAmount  as decimal
 get
 M_TotalAmount  
end get
set (value as decimal)
M_TotalAmount  =value
end set
end property

in the orderdetail class i have added the code
private sub onqtaChaged
	me.Order.RicalculateTotalAmount  
end sub

in the Order class I have added

private sub RicalculateTotalAmount  
Dim total as decimal=0
for each orderdetail in me.orderdetails
	total =total + orderdetail.Amount 
net
end sub

Well.

I have put inside the form a Bindingsource component  (Bindingsource1) and i set a datasource of the OrderEntity
then
I have put inside the form a Bindingsource component   (Bindingsource2)   and i set a datasource of the Orderdetails Entity of OrderEntity

I have put into form some control of Order in binding on Bindingsource1
Then i put a radgridview ad the datasource property set to Bindingsource2

Ok
now i run the project

Now i enter in the cell Qta of radgridview and i change the current value.
With mouse i change focus on the another  textbox  out the Gridview
Radgridview Crash!!

I olso try to :

After run project
Now i enter in the cell Qta of radgridview and i change the current value.
With mouse i change focus on the another  textbox  inside the same datagridrow 
then i change focus inside the another radtextbox out of radgridview
the radgridview work fine.
0 comments