Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format DataGrid Tips 2

Status
Not open for further replies.

RoguePoet01

Programmer
Oct 1, 2003
302
US
Hi,

I'm trying to format this here dad-gum datagrid and well, dip me in horse feathers, I can't cypher it t'all!

Ch'all got any links or add-vise to help me on my way?

Done found the "TableStyles" and the "DataGridColumnStyles" but when I make the changes it don't seem to make no diffrence!

Why I'm fit to be tied!
 
A TableStyle is only applicable when the source of the DataGrid is the table for which you based the DataGrid off of. For example, if you had a DataTable with a TableName of "Cusomters", then the mapping name for your TableStyle needs to be set to "Customers
 
Hi RiverGuy,

I remember you. You've helped me out before.

Could I bother you for some more info? A snippit of code.

I don't get the DataTable thing.

I've got a dataset and I've used dataviews but never a datatable.
 
A DataSet is a collection of DataTables. Let's assume you have a DataSet called MyDataSet. You can get a DataTable out of it:

Dim WorkingDataTable As DataTable
WorkingDataTable = MyDataSet.Tables("YourTableName").


Now, you may have only one DataTable in your DataSet. Did you just fill your DataSet once, with one command? If so, then you more than likely only have one table. You need to put the name of that table, the TableName property, not the name of your variable, as the mapping name in your TableStyle.
 
RiverGuy, you're a peach. Thanks.

An FYI for future searchers: here's some code from MS that helps (I'm a Google champ, but this took me over an hour to find).


It's the only set of complete, step by step, start to finish code that I could find for people new to the DataGrid.

Far be it from me to gripe, but this is just so typically Microsoft - they showcase this great new DataGrid control on almost everything you see regarding .NET buzz, and then they give you squat for documentation.

And what little they do give you is over two years old.

Typical!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top