View previous topic :: View next topic |
Author |
Message |
vanchan
Joined: 05 Feb 2007 Posts: 8
|
Posted: Tue Jul 24, 2007 4:01 pm Post subject: Tree behavior when using ck_box in Vista |
|
|
I have a simple tree bound to an ADO table with a couple of levels of child rows beneath. Tree works fine. However, when I change a column at the root level (bool data type) to use a standard windows check box editor (prefix = false), the tree no longer displays. No headings, no data, nothing but a blank area with a single check box. Thanks |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jul 24, 2007 11:01 pm Post subject: |
|
|
We've just run a small test, based on your description, under Vista but were unable to see the problem you are describing.
What version of Virtual Tree are you using?
There was an issue in versions prior to 3.3.2 that meant that if you accidently set the Dock or Anchor properties of the control you are using as an editor this could cause the type of behaviour you are describing. Check these properties and ensure Dock is set to None and Anchor is set to Top Left. _________________ Infralution Support |
|
Back to top |
|
|
vanchan
Joined: 05 Feb 2007 Posts: 8
|
Posted: Wed Jul 25, 2007 3:40 pm Post subject: Some more clues |
|
|
I have the latest version, downloaded to my new Vista PC Saturday. Anchor and dock are OK.
I set up a datagrid view beside the VT bound to the same data. Five records in parent table, three of which have a couple of children. If the bool in the parent record does not have a check box editor, it works fine, I can change the value in the datagrid and it is reflected True or False in the tree. The tree display, expansion etc are correct.
Add editor
Select System.Windows.Forms.CheckBox
Change Columns.CellEditor to cellEditor1 for the column that holds the bool variable
Start Debugging
One check box is displayed on the second line, no headings, no data.
I change the bool to true in the first record of the datagrid, then a checked check box appears on the first line.
I continue to change the bool on the remaining 4 records to true and nothing is displayed on the tree until focus is removed from the final record.
At this point, the entire tree appears, but beginning on the second line. The first line now contains an unchecked check box.
The first 2 records in the datagrid (lines 2 and 3 on the tree) have the correct check box on their line (I can check and uncheck from the datagrid).
The next 2 records do not have a check box displayed in the tree, just whitespace. When I check and uncheck from the datagrid, there is no change in the tree for these records.
The last record does have it's associated check box.
When I expand the tree to display children, the check box is replicated on every child line.
When I remove the check box editor, everything returns to normal operation
I hope this helps.
Much thanks from Hawthorn Hawks fan in Texas |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jul 25, 2007 10:04 pm Post subject: |
|
|
I think we will need a sample project to get to the bottom of this. Could you put together a project that you could zip and email to us (support@infralution.com) that would demonstrate the issue. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Aug 05, 2007 11:00 pm Post subject: |
|
|
Thanks for the sample project - it enabled us to quickly get to the bottom of the problem. The issue is with the data you are binding to. The include column contains dbNulls When Virtual Tree attempts to convert these to boolean (to set the CheckBox.Checked property) this causes an exception. Unfortunately the TableAdaptor class appears to have a try/catch block somewhere in its Fill method that simply swallows the exception. I checked the call stack and there are no exception handlers in our code that are handling and ignoring the exception. Unfortunately this means that you get the strange behaviour you are seeing with no indication of what the real problem is.
The fix is to ensure that your data does not contain nulls.
Quote: | Much thanks from Hawthorn Hawks fan in Texas |
Do you follow AFL? An expat Aussie or just an enlightened American? _________________ Infralution Support |
|
Back to top |
|
|
|