Solved

tablestyle in DatagridView

Posted on 2008-06-23
3
1,252 Views
Last Modified: 2008-07-02
hi there i used to have this line on a datagrid and it seems to be working:
Me.DGridAPD.TableStyles.AddRange(New System.Windows.Forms.DataGridTableStyle() {Me.DataGridTableStyle1})
       
how can i converted if i change it the original datagrid to a datagridview

Thanks,
jsctechy
0
Comment
Question by:jsctechy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21848011
Are you working with Web or Windows desktop objects?
0
 
LVL 1

Author Comment

by:jsctechy
ID: 21849345
Windows!
0
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 500 total points
ID: 21849906
OK! :)  What version of Visual Studio are you using? and what version of .NET?  I ask this in particular because .NET 3.0 restored DataGrid to the .NET Framework and it will remain there for a while (I'm looking at docs for the .NET 3.5 DataGrid in one of my other windows).

That said,

http://msdn.microsoft.com/en-us/library/ms171628(VS.80).aspx

discusses the differences between the DataGrid and DataGridView objects on Windows.  Though I haven't seen it specifically mentioned, it looks to me as if TableStyle has gone the way of the Great Auk.  This article does specifically mention that while one DataGrid can be used to display two tables in a hierarchical relationship, two DataGridViews would be required to do the same.

We may still be able to get the special effects you want using the CellFormatting event.  Here, you can inspect DataSource and DataMember names to give special behaviors to specific tables and to specific columns in those tables if necessary.  What else do you need to do that was being done for you by setting TableStyles?

0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access/Visual Basic Question 3 48
Create a button class for use in all vb.net apps 5 43
Best book for Internet security 4 52
Disable the weekends on datepicker control 6 51
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question