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.

Formatting multiple grids on one form

Thread ID:

Created:

Updated:

Platform:

Replies:

28556 May 4,2005 11:52 AM May 4,2005 12:29 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 4, 2005 11:52 AM

I have a bit of a strange one which should be easy to sort but is proving elusive. I have a form which has a tab control with three tabs and on each tab has a databound grid. Each grid is to be setup the same as each other but the only difference is the the data table that they point to. I have a sub routine which handles the formating as shown below (only a snapshot) The problem is that it only seems to setup the first grid but the other two remain as they are in design mode even though each call is made without error. Has anyone has had a similar problem? Private Sub SetupGrid() Dim oDBGrid As Syncfusion.Windows.Forms.Grid.GridDataBoundGrid For N As Integer = 1 To 3 Select Case N Case 1 oDBGrid = gridDBRetainer Case 1 oDBGrid = gridDBProject Case 3 oDBGrid = gridDBICincome End Select For I As Integer = 0 To oDBGrid.Model.Data.ColCount Select Case I Case 0 oDBGrid.Model.ColWidths.SetSize(I, 20) Case 1 oDBGrid.Model(0, I).Text = "Client" oDBGrid.Model(0, I).Font.Bold = True oDBGrid.Model.ColWidths.SetSize(I, 200) End Case Next Next

Administrator [Syncfusion]
Replied On May 4, 2005 12:07 PM

You might try calling oDBGrid.Refresh at the bottom of the loop on N to see if that makes things work.

Administrator [Syncfusion]
Replied On May 4, 2005 12:19 PM

Sorry, did have that in there. Like I mentioned, it''s only a snapshot of the full routine.

Administrator [Syncfusion]
Replied On May 4, 2005 12:29 PM

Would appear you need to flick to the respective tab before setting the format for that grid.

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.

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.

;