473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Remove specific datagrid tablestyle

Bob
is it possible to remove just a specific tablestyle and keep anyothers that
may exist? I've got the folowing code:

Dim TS As New DataGridTableStyle
TS.MappingName = "ABQTG0UN"

......

Datagrid1.TableStyles.Add(TS)

......
If (Datagrid1.TableStyles.Contains("ABQTG0UN") = True) Then
Datagrid1.TableStyles.Remove(TS)

-------------------------
If tried both TS and "ABQTG0UN" as the argument in the .Remove, but neither
one works.
Nov 21 '05 #1
1 1274
Are you sure this isn't working? I have this code typed into an empty form
and the tablestyle.count goes to 1 then back to 0. Maybe your doing
something else we are not seeing?

Dim TS As New DataGridTableStyle
Dim DataGrid1 As New DataGrid
TS.MappingName = "ABQTG0UN"
Datagrid1.TableStyles.Add(TS)
If (Datagrid1.TableStyles.Contains("ABQTG0UN") = True) Then
Datagrid1.TableStyles.Remove(TS)
End If

Chris
"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
is it possible to remove just a specific tablestyle and keep anyothers
that
may exist? I've got the folowing code:

Dim TS As New DataGridTableStyle
TS.MappingName = "ABQTG0UN"

.....

Datagrid1.TableStyles.Add(TS)

.....
If (Datagrid1.TableStyles.Contains("ABQTG0UN") = True) Then
Datagrid1.TableStyles.Remove(TS)

-------------------------
If tried both TS and "ABQTG0UN" as the argument in the .Remove, but
neither
one works.

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marty | last post by:
Hi, How do I set rows/colums, titles and data in the DataGrid control of VB.NET. I don't want to pass through a dataset and use databinding. I want to set this grid manually. Is there any...
0
by: oscar | last post by:
i currently have a dataset with a built, code and description fields. the built field is either a 1 or 0 and i would like it to display as a checkbox in the datagrid. i can get the checkboxes to...
2
by: Dino L. | last post by:
Hi guys I fill my datagrid like this --- komanda.CommandText ="SELECT IDKlasa AS ID, IDslova, IDbroj, Naziv, JM, Normativ FROM Klase WHERE IDslova LIKE('" + cmbIDslova.SelectedItem + "%') AND...
2
by: Hajash | last post by:
hi all, how do i set the width of a column in a datagrid.Please help.Thanks in advance. regards, hajash
2
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
14
by: Brett Sinclair | last post by:
Hello everybody I'm still on the learning curve here...and from what I read, I created inherited datagrid class so I could have icons, combobox...etc in the columns of my datagrid. The grid...
6
by: Ron L | last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying to display in a datagrid. This datasource has 4 columns that I am interested in here, a text column and 3 value columns...
4
by: Jeff | last post by:
I am stuck on trying to generate two columns headers for a datagrid on form load. I can use a datatable as the datasource and get the results I want, but I want to set different column widths and...
4
by: Localbar | last post by:
hi all, If I have a datagrid, actually has 5 column. but I would like in run time hidden last column. The reason is the form also have combobox for filter datagrid row. my problem is that I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.