473,804 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGridView Style Properties

63 New Member
Hi all,

I want to format the style of datagridview in Visual Studio 2005.
The dataGridView is inside a GroupBox.
This is a desktop application.

The dataGridViews revert to this style for DefaultCellStyl e Property...
Font: Verdana,12px,Bo ld, Forecolor: InactiveCaption Text

And for the ColumnHeadersDe faultCellStyle the backcolor doesn't take effect.

Any ideas? Could another setting somewhere cause this?

Thanks.
May 17 '07 #1
3 3711
kenobewan
4,871 Recognized Expert Specialist
Have tried using CSS?
May 17 '07 #2
obrienkev
63 New Member
can't use css with desktop application?
May 17 '07 #3
obrienkev
63 New Member
Went through my designer.cs files and for some reason there are multiple dataGridView styles for the one dataGridView control...

Expand|Select|Wrap|Line Numbers
  1. System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
  2. System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
  3. System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
  4. System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
  5. System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
  6.  
any ideas?
May 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2177
by: Rob | last post by:
Dear All, I have a class that exposes a few properties. These properties are used in a DataGridView. The code for that is shown bellow. The problem is that I also need to show data/columns/properties in the DataGridView that are not known at compile time. The total number of these data/columns/properties is also not known. So the question is how can I dynamically add properties (indexers don't seem to work) so that DataGridView can show...
0
415
by: Mark Carew | last post by:
Hi, I'm writing a winform app (as practice) that has as one of its features a button that reads an xml file to a datagridview. No matter what I do I get two columns instead of one. The "first column", I retrieve and place the text "Holy Cat" in its header text. This column contains no data from the xml file. The second column contains the correct data from the xml file.
3
4662
by: Daniel Manes | last post by:
I need a strategy to debug this situation... I can't put all the code involved, but here are some of the critical lines with comments: ------------------------- Private _parentDataCell As DataGridViewCell 'declare private field _parentDataCell = _parentDataGrid.Rows(rowIndex).Cells(columnIndex) 'set to a specific cell Debug.Print(_parentDataCell.DataGridView.ToString) 'prints:
1
3385
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons: 1) export to excel button exports the visible columns from the datagridview to excel (this works fine)
1
2848
by: mtembene | last post by:
I have a windows form "BaseForm" that contains a DataGridView that is not bound to any datasources and a button. Both of these controls have a modifier of "Protected Internal" and none of the controls are locked on this form. I have another windows form call "ChildForm" that inherits "BaseForm". When I open"BaseForm: in VS2005 I can see both the DataGridView and the button and I can view all of the properties of these controls. ...
3
5754
by: Andrus | last post by:
I have DataGridView in virtual mode containing 3500 rows. In code below, assigning to RowCount value to 3500 takes 8 seconds. CPU usage goes high at this time. Stepping by F11 into user code shows few celltemplate property getters and combobox/datecombo constructor calls without database access which does not take a lot of time. Debug output (below) shows lot of messages Stepping over non-user code. Running in release mode from...
2
2935
by: Stewart Berman | last post by:
I have an application that populates a DataGridView control with an XML. file. 1. How do I set up the process so the user initally sees just the headers -- no records. I have the DataGridView properties set to allow the user to edit data but not add or delete (which will be down in the program). However when I execute the ReadXML method one emtpy row is shown. The starter XML contains: <?xml version="1.0" encoding="utf-8"?>...
1
3476
by: Zack00000 | last post by:
Hi, Is there a way to optimize the DataGridView in terms of drawing speed? The application that I'm building will need to use multiple datagridview controls which will get updated around every 100ms. A receiver will parse the data then pass it to the datagridview, but there is no way to know how many rows will be returned. Right now I'm testing using 2 methods: 1. Generate the rows programmatically private List<MyObject> dg1Data = new...
6
10649
by: Ciaran | last post by:
I'm having a really strange issue with the DataGridView control in a VS2008 / .NET 3.5 winforms project. I have a simple form with a grid. In the form constructor I call a function to bind the grind to a DataTable, and then loop through the rows setting the background colour of the last cell to LightGrey and the cell itself to read-only if the column value is true. After the form finishes loading the code didn't work i.e. the cells are not set...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10604
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9177
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6870
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.