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 

New row not showing up

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



Joined: 30 Nov 2006
Posts: 24

PostPosted: Tue Mar 13, 2007 4:07 am    Post subject: New row not showing up Reply with quote

I've got a virtual tree(v3.2.1) that will show a new row only the first row I add, but not any after that. I've looked at the samples and I'm not doing anything different. The virtual tree is databound to a typed dataset. Have you seen this before?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Mar 13, 2007 5:05 am    Post subject: Reply with quote

No we haven't had any reports of this issue. I'd be checking that you haven't got an exception occurring that is causing the problem. Make sure you have exception handling set to break on exception (under the VS Debug->Exceptions menu)

If you can put together a sample program that exhibits the problem and email a zipped copy to us we will take a look.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
StrifeSD



Joined: 30 Nov 2006
Posts: 24

PostPosted: Fri Mar 16, 2007 3:42 am    Post subject: Reply with quote

The virtual tree is throwing this error to the output window. I'm not sure where it is coming from. Any ideas? Thanks

VirtualTree: Error while getting field () of table (tblContact).
Error: 'name' argument cannot be null.
Parameter name: name
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Mar 16, 2007 3:47 am    Post subject: Reply with quote

Check your cell bindings for the tblContact RowBinding. It looks like you have set a blank field for one of the cell bindings.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
StrifeSD



Joined: 30 Nov 2006
Posts: 24

PostPosted: Tue Mar 20, 2007 3:32 am    Post subject: Reply with quote

I did figure out the"Error while getting field ()" error, but that didn't fix the new rows not showing up on the second add. I can't figure it out, I can see the new row in the typed DataSet, but it doesn't show up! This is driving me crazy. Any ideas?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Mar 20, 2007 6:49 am    Post subject: Reply with quote

Can you replicate it in a simple project that you could email to us?

You could call VirtualTree.UpdateRows(true) after you add the row. You should not need to do this - but it may give us a hint as to what is happening.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
StrifeSD



Joined: 30 Nov 2006
Posts: 24

PostPosted: Mon Apr 02, 2007 2:05 am    Post subject: Reply with quote

I've narrowed the problem down to the virtualTree.SelectedItem. If I take that out the second row shows up right away. Any idea what would cause this? Do I need to clear the selected item?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Apr 02, 2007 2:08 am    Post subject: Reply with quote

Can you post some code to show what you mean. Where are you calling virtualTree.SelectedItem? Are you getting or setting the property?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
StrifeSD



Joined: 30 Nov 2006
Posts: 24

PostPosted: Tue Apr 03, 2007 2:37 pm    Post subject: Reply with quote

here is how I'm selecting the row

using (AddContactForm addContact = new AddContactForm(_dataSet))
{
addContact.ShowDialog(this);

if (addContact.DialogResult == DialogResult.OK)
{
vtContacts.SelectedItem = addContact.NewContactRow;
}
}
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Apr 03, 2007 11:35 pm    Post subject: Reply with quote

That's exactly the same code that the DataSetBrowser sample uses to add a new customer - but I can't see the problem in this sample code (can you?). There must be something else going on. Is there any chance you could email a zipped copy of your project to support@infralution.com? I think it is going to be difficult to diagnose otherwise.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
StrifeSD



Joined: 30 Nov 2006
Posts: 24

PostPosted: Wed Apr 11, 2007 4:24 am    Post subject: Reply with quote

I sent you the control I'm using. The entire project is too big to zip and send.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Apr 20, 2007 12:27 am    Post subject: Reply with quote

This issue has now been resolved.

For the record, the problem turned out to be that there was a call to VirtualTree.SuspendDataUpdate (called from the SelectionChanged event handler) without a corresponding ResumeDataUpdate method. This basically meant that the tree would not update its data representation. Because the code was called in the SelectionChanged event handler the problem only surfaced when the SelectedItem was set.

It is important to ensure that SuspendDataUpdate/ResumeDataUpdate calls are always matched if you want your application to function normally. It is also good practice to put the ResumeDataUpdate method in a try {} finally block to ensure it is always called - even in the presence of exceptions.
_________________
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