Print Page | Close Window

.NET DataGridView Skinning Issue

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=7444
Printed Date: 29 April 2024 at 9:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: .NET DataGridView Skinning Issue
Posted By: apuhjee
Subject: .NET DataGridView Skinning Issue
Date Posted: 25 June 2007 at 12:33pm
Oleg -
I'm cannot exactly describe what circumstances cause this issue, which is why I'm posting to the forum and not creating an IssueTrak ticket... but I wanted you to be aware of it nonetheless.  I think it has something to do with setting the column AutoSizeMode to Fill - but you can see that the vertical scrollbar renders ok, but the horizontal is not skinned
 
Cheers ~ jp
 



Replies:
Posted By: Oleg
Date Posted: 26 June 2007 at 2:14am
Hello,
 
I Just tried it. These scrollbars is .NET scrollbars - not standard, and DataView creates them before show.
So if scrollbars was visible before you apply skin - they become skinned.
 
you can add some dummy large column in design time - it will create horizontal bar, then delete it and add your columns.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ylhyh
Date Posted: 06 November 2007 at 2:20am
ha ha
 
this:
 
#region ScrollBar Skin
            if (this.Visible)
            {
                dgvGroups.VirtualMode = false;
                dgvUsers.VirtualMode = false;
                try
                {
                    for (int i = 0; i < 20; i++)
                    {//Vertical ScrollBar
                        dgvGroups.Rows.Add(new object[] { "", "", "", "" });
                        dgvUsers.Rows.Add(new object[] { "", "", "", null, "", "" });
                    }
                }
                catch{}
                tabGroupUser.SelectedTab = tabUsers;
                Common.OnVisibleChanged(tabUsers);
                //Horizontal ScrollBar
                this.Width = 630;
                this.Left = (Owner.Width - this.Width) / 2;
                tabGroupUser.SelectedTab = tabGroups;
                dgvGroups.VirtualMode = true;
                dgvUsers.VirtualMode = true;
            }
            #endregion
 
Common.cs:
 
public static void OnVisibleChanged(Control ctrl)
        {
            //Apply Skin 
            if (ctrl.Visible)
            {
                Common.skinFramework.ApplyWindow(ctrl.Handle.ToInt32());
                ctrl.BackColor = Common.skinFramework.GetColor(XtremeSkinFramework.XTPColorManagerColor.STDCOLOR_BTNFACE);
            }
        }



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net