Solved

tablestyle in DatagridView

Posted on 2008-06-23
3
1,241 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
  • 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now