Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Editing Error

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Sherif Abdeen
Guest





PostPosted: Sun Feb 19, 2006 9:43 am    Post subject: Editing Error Reply with quote

Dear,

I assigned UniversalEditbox as an editor to a column. the Binding Field to this column is of decimal type.

the problem is when i entered this column where its value is empty. then leave it without adding any value(i.e leave it empty as it is). the system gives error and the form that contains the virtualtree is closed.
first ,how could solve this problem?
second , which event i could entered to handle this errors and write needed code when the cell value is changhed?

Thanks
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Feb 19, 2006 10:25 pm    Post subject: Reply with quote

Some details of the error would probably be helpful. A sample project illustrating the problem sent to support@infralution.com would help us resolve the issue even more quickly.

When exceptions occur while setting changes to data back into the data source these are typically caught by virtual tree reported to the debug output window. So it is worthwhile checking this window as well.

You can handle the SetCellValue event (or override the SetValueForCell method) to handle setting data values back into the data source yourself. The following code comes from the DataSet Browser sample:

Code:
private void _virtualTree_SetCellValue(object sender, Infralution.Controls.VirtualTree.SetCellValueEventArgs e)
{
    RowBinding binding = _virtualTree.GetRowBinding(e.Row);
    if (e.Column == this.colDiscount)
    {
        // divide the percentage discount column by 100
        //
        binding.SetCellValue(e.Row, e.Column, Convert.ToDouble(e.OldValue) / 100.0, Convert.ToDouble(e.NewValue) / 100.0);
     }
     else
     {
         binding.SetCellValue(e.Row, e.Column, e.OldValue, e.NewValue);
     }
}

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Sherif Abdeen
Guest





PostPosted: Mon Feb 20, 2006 11:24 am    Post subject: Reply with quote

Dear,

yes,the SetCellValue event fires only when the value inside the cell is changed.
But if not( i.e. you don't change the value inside the cell) this event will not fire.
so my question what is the event that will be fired if i just enter the cell and leave it without changing its value. Specially if the current cell value=Null.

Thanks
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Feb 20, 2006 9:09 pm    Post subject: Reply with quote

There is no event fired if nothing is changed. In this case Virtual Tree does not set any value back into the data source. So the error must be originating somewhere else. Again more details of the error you are getting would help as would a sample project.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group