473,378 Members | 1,527 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,378 software developers and data experts.

Tablet

Does anyone know if it is possible to add the same tablestyle to 2 different datagrids?

i have tried the following:

DGrid1.TableStyles.Add(TSCaraBooking)
DGrid2.TableStyles.Add(TSCaraBooking)

but i get an error that tells me :

An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: Cannot add a DataGridTableStyle already parented to another DataGrid.

How would i get around this?
Do i have to create the same tablestyle again but just name it something different?
Seems a clumsy way of doin it. :o)

Any advise?
Jul 21 '05 #1
1 1425
Angeliina,
Does anyone know if it is possible to add the same tablestyle to 2 different datagrids?
Based on the error you are receiving I would say its not possible!
How would i get around this? Have you considered putting the code that creates the table style into a
function, then calling the function twice?

Alternatively if I need to have the "same" grid on a form twice, I would
consider creating a new control out of the grid, either by inheriting from
the grid itself, or placing the grid on a UserControl.

Hope this helps
Jay

"Angeliina" <an*******@discussions.microsoft.com> wrote in message
news:39**********************************@microsof t.com... Does anyone know if it is possible to add the same tablestyle to 2 different datagrids?
i have tried the following:

DGrid1.TableStyles.Add(TSCaraBooking)
DGrid2.TableStyles.Add(TSCaraBooking)

but i get an error that tells me :

An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll Additional information: Cannot add a DataGridTableStyle already parented to another DataGrid.
How would i get around this?
Do i have to create the same tablestyle again but just name it something different? Seems a clumsy way of doin it. :o)

Any advise?

Jul 21 '05 #2

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

Similar topics

0
by: Rajat Dev | last post by:
I am developing a Tablet PC application using C# and InkCollector class from the Tablet PC SDK. I am not able to change the cursor to other type (for example an arrow) when I set the InkCollector...
1
by: Aaron | last post by:
I would like to use tablet pc sdk's text recognition feature in my c# app. I don't want the end-user to install tablet pc sdk, all they need is the nessesary dll's for the text recognition feature....
2
by: André | last post by:
I'm considering buying a Tablet PC and read somewhere (sorry, can't point to a link) that someone had tried running a "standard" Python program (wxMozilla demo I *think*, but can't be sure) that...
0
by: ray.bradbury9 | last post by:
Hello, First of all, sorry because of my poor english. I am having a weird problem that I don´t know how to solve. I am not sure even if it is a problem within the OS or the .NET Framework....
3
by: Mark Edwards | last post by:
I want to buy Visual C# (or C++) and use it to develop for the Tablet PC. I can't figure out what to buy. I can buy the Visual C# .NET ($109), but don't know if that has the inking libraries....
2
by: Al | last post by:
Hi, I wrote a similar application for getting ink input before release of the Windows XP Tablet PC edition. However, now I would like to use the Tablet PC Input Panel instead. Can anyone tell me...
1
by: eolsson | last post by:
I have a .NET application and have added handwriting (via the PenInputPanel class) for users with Tablet PCs. The problem I'm having is that if I call this class it throws a runtime error if the...
0
by: sanwan | last post by:
Windows XP Tablet PC http://microsoft.com/france/windows/xp/tabletpc/images/banner.jpg La nouvelle version du c¨¦l¨¨bre OS de Microsoft, Windows XP est diponible pour les PC au format Tablet....
1
by: SetonSoftware | last post by:
I'm developing a VB.NET 2005 WinForms application that will run on a tablet PC. I want to build a screen resizer method that will position the forms and controls properly depending on whether the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...

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.