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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Formatting multiple grids on one form

Thread ID:





28556 May 4,2005 03:52 PM UTC May 4,2005 04:29 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On May 4, 2005 03:52 PM UTC

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 04:07 PM UTC

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 04:19 PM UTC

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 04:29 PM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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