473,324 Members | 2,473 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,324 software developers and data experts.

Moving a control on the page during runtime.

I have a datagrid that I want to move another part of the page. I'm able to
do this but the datagrid looses it's values after the move.

General_DataGrid_CurrentItems is the datagrid name.
I want to move it to a tablecell called tdControls.

this.Controls.Remove(General_DataGrid_CurrentItems );
tdControls.Controls.Add(General_DataGrid_CurrentIt ems);

This works. It moves the datagrid from the bottom of the page to the middle
where my table cell is. Problem is, it looses the values in the datagrid.
Nov 16 '05 #1
3 1664
Just change the Location and Size properties...

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Punisher" <Pu******@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
I have a datagrid that I want to move another part of the page. I'm able to
do this but the datagrid looses it's values after the move.

General_DataGrid_CurrentItems is the datagrid name.
I want to move it to a tablecell called tdControls.

this.Controls.Remove(General_DataGrid_CurrentItems );
tdControls.Controls.Add(General_DataGrid_CurrentIt ems);

This works. It moves the datagrid from the bottom of the page to the
middle
where my table cell is. Problem is, it looses the values in the datagrid.

Nov 16 '05 #2
> I have a datagrid that I want to move another part of the page. I'm able to
....
where my table cell is. Problem is, it looses the values in the datagrid.


Don't do it.
This is a bad internationalization practice, and if you will
ever need to localize your application is going to hit you.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email
Nov 16 '05 #3
Try to put your DataGrid on panel
and move panel
I dont now if it will work
but it seems to it will solve
"Mihai N." <nm**************@yahoo.com> wrote in message
news:Xn********************@207.46.248.16...
I have a datagrid that I want to move another part of the page. I'm able
to

...
where my table cell is. Problem is, it looses the values in the datagrid.


Don't do it.
This is a bad internationalization practice, and if you will
ever need to localize your application is going to hit you.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email

Nov 16 '05 #4

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

Similar topics

1
by: Lauchlan M | last post by:
Hi. I have an ASP.net project that works fine. I copied it to another project using the following steps: << (i) create a new VS.NET ASP.NET project.
3
by: sean | last post by:
Hi There, I am trying to display some textboxes on my page, When I run the code the textbox is written to the page (when I view source) but not to the screen. Could someone tell me if I have the...
3
by: Guadala Harry | last post by:
I have a simple user control (see below) that has EnableViewState="true". I place it on an ASPX page at runtime using a PlaceHolder - which also has EnableViewState="true". After a postback, the...
7
by: Smithers | last post by:
I have a non trivial ASP.NET Web application that implements its navigation system via a user control (menu.ascx) placed on every page. It is important to note that the user control that hosts...
2
by: Frankie | last post by:
I have a user control into which I insert a bunch of controls dynamically. I have it all working just fine - Everything is there on Postback, etc. I load this user control into a hosting ASPX...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
4
by: Jordan | last post by:
I need to dynamically add an ImageButton control to a user control and and do some server-side processing when the user clicks it. While I the ImageButton is added to the user control at runtime,...
14
by: TS | last post by:
I have this custom data list control and i override the onItemDatabound event. After upgrading to vs 2005, this event is not always getting called, though it does at other times. No changes were...
3
by: SonOf27 | last post by:
Morning all. I was hoping somone would be able to help me with some VBA program that will allow me to move the whole Tab Control on an Access form at runtime. What I have is a form in Access 2000...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.