Solved

tablestyle in DatagridView

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

815 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

9 Experts available now in Live!

Get 1:1 Help Now