We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

An extra identical grid appear on click (multi-level databound grid).

Thread ID:

Created:

Updated:

Platform:

Replies:

16138 Jul 6,2004 09:24 PM UTC Jul 8,2004 03:56 PM UTC Windows Forms 8
loading
Tags: GridControl
Khoi Phan
Asked On July 6, 2004 09:24 PM UTC

Hi, I have a problem with the display of the 2-level databound grid. My dataset has 2 tables (''Vendors'' and ''Contacts'') and a relation ''VendorContact'' which relates ''Vendors'' and ''Contacts'' based on VendorId column. I then set the grid''s data source to that data set. Everything works just fine until I hide some extra columns (column 2 and 3). When I click on any row, I would see a portion of the extra column shows up right under the first column of the grid. When I mouse over that extra column, it shifted to the end of the grid and then disappear and everything is back to normal. If I resize the plus/minus sign column big enough, and then click on any row, I would see another identical grid appear right next to my original one. The only difference is that I can only click on the original but not the second one. I noticed that when I try to resize the column a couple time when the problem occured, the problem then just went away. I''ve tried to fix the prob, but nothing worked. Please help me. Thanks in advance. Khoi

Administrator [Syncfusion]
Replied On July 6, 2004 09:52 PM UTC

After you hide the columns, try calling grid.Refresh() to see if that takes care of this problem.

Khoi Phan
Replied On July 7, 2004 01:40 PM UTC

I tried it out, and the problem still there. Correction for the original post: - Everything works just fine until I hide some extra columns (column 2 and 3). When I click on any row, I would see a portion of the extra column shows up right under the first column of the grid. When I mouse over that extra column, it shifted to the end of the grid and then STAYED AT THE LAST COLUMN. >After you hide the columns, try calling grid.Refresh() to see if that takes care of this problem. >

Administrator [Syncfusion]
Replied On July 7, 2004 01:49 PM UTC

I don''t really have any insight into what might be going on. Can you post a sample here showing the problem, or submit a Direct Trac support incident with a sample? That way, we can try to spot the problem here?

Khoi Phan
Replied On July 7, 2004 08:30 PM UTC

I''m trying to recreate the problem in my application, but the problem doesn''t come up in the sample project. But if you look at the code, you''ll see what I''m trying to do. I also attach some pictures to illustrate the problems. - Picture 1.jpg: First start - No problem - Picture 2.jpg: Click on any row - Problem: A portion of a column appear right in between ''Vendor/Contact Name'' and ''Type'' columns - Picture 3.jpg: To see the the problem better in picture 2.jpg, I expand the plus/minus column big enough. I then clicked on any row and the duplicate grid appears. Note: The problem seem to disappear when the Windows repaints. For example when the problem happen and if I go to any other application which pops up some window and come back, the problem is gone. >I don''t really have any insight into what might be going on. Can you post a sample here showing the problem, or submit a Direct Trac support incident with a sample? That way, we can try to spot the problem here? GridProbs_9018.zip

Administrator [Syncfusion]
Replied On July 7, 2004 08:49 PM UTC

Do you see any exceptions being noted in the output window? Something to try. Instead of using Me.gdbVendorContact.Model.Cols.Hidden to hide columns, try just not including those columns in your two LayoutColumns calls.

Khoi Phan
Replied On July 8, 2004 02:51 PM UTC

There''s no exception in the output window. I did a trace and it ran all the way without throwing any exception. I''ve tried to hide the columns using the LayoutColumns calls. It did fix the problem, however there''s another problem. The ''Active'' column now cannot be shown or hidden like it''s supposed to be anymore. >Do you see any exceptions being noted in the output window? > >Something to try. Instead of using Me.gdbVendorContact.Model.Cols.Hidden to hide columns, try just not including those columns in your two LayoutColumns calls.

Administrator [Syncfusion]
Replied On July 8, 2004 03:22 PM UTC

Instead of hiding the column, maybe setting its width to zero will make it work in your code. If Not Me.chkShowAll.Checked Then Me.gdbVendorContact.Model.ColWidths(3) = 70 Else Me.gdbVendorContact.Model.ColWidths(3) = 0 End If

Khoi Phan
Replied On July 8, 2004 03:56 PM UTC

Very good suggestion, Clay. I set the size of the supposedly hidden columns to 0 instead of hiding it. The grid displays correctly now. Thank you very much. >Instead of hiding the column, maybe setting its width to zero will make it work in your code. > >If Not Me.chkShowAll.Checked Then > Me.gdbVendorContact.Model.ColWidths(3) = 70 > Else > Me.gdbVendorContact.Model.ColWidths(3) = 0 > End If >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;