Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted
Do you need to pass the tablestyle from an older form to a newer form or from a new form to an old form?

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted
Do you need to pass the tablestyle from an older form to a newer form or from a new form to an old form?

No .. no .. no ..

 

It's at design time, not at running time. You see, there are times when we create similar forms right? When doing it, we sometimes copy the selected components from one form to another.

 

About DataGrid, when I copied a DataGrid for on form to another, I was hoping the TableStyle will also be copied, but Nooooo ... :D ~sigh.

 

So, what I'm asking is how do you copy the tableStyle of a datagrid from on form to another?

 

Thx.

Amir Syafrudin
  • Leaders
Posted

Hmm... that's interesting: they aren't copied.

Well, I suppose you're just going to have to either do it at runtime, or copy them manually by yourself.

 

Or, if you're brave, you can copy all of the TableStyle information in the InitializeComponent sub from one form to the other... you just have to make sure you've copied it all and then press Build. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted

Thx Iceplug.

 

Hmm... that's interesting: they aren't copied.

Well, I suppose you're just going to have to either do it at runtime, or copy them manually by yourself.

 

Or, if you're brave, you can copy all of the TableStyle information in the InitializeComponent sub from one form to the other... you just have to make sure you've copied it all and then press Build. :)

 

A risky choice :) with a definite result. ;)

Amir Syafrudin
  • 6 months later...
Posted

Just posting in case anybody else is running into this same problem. I found a cumbersome work-around for copying tablestyles and columnstyles from one form to another form. I am using VS .NET 2003 Enterprise Edition (just in case it matters)

 

- On your original form, create a datagrid

 

- Add a tablestyle to the datagird

 

- Add a columnstyle to the tablestyle

 

- On your original form, in Design View choose Edit | Select All

 

- Then choose Edit | Copy

 

- Go to your new form and paste the datagrid

 

- If you examine the datagrid that was copied to the new form, you will find that the tablestyle and columnstyle were also copied.

 

 

C'ya,

Jim.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...