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

GridView problem on Page 2+ of a TabControl

I have a four-page tabcontrol with a gridview on each page. I have the
primary key column of each gridview set to hidden (visible = false),
but it still shows up on all but the first page. Anyone else see this
behavior? How might I correct it?

Jan 26 '07 #1
2 2607
Minor correction - I am dealing with datagridviews. Also, I thought I
would detail my subsequent recreating of the problem using a more
simplified environment and fewer variables:

I just reproduced this scenario on another PC with VS 2005 SP1
installed and got the same behavior. To do so, I created a new database
with three simple tables - a parent table and two child tables in the
SQL 2005 Express database. I created primary key columns in each table
and foreign key columns in the two child tables. I defined
relationships in the database for both child tables with the parent
table (child.foreignkey to parent.primarykey).

I created a new dataset in a new VB windows project which automatically
imported those relationships as well. I dragged the parent table from
the project data sources window onto a form as a datagridview as well
as the two related child tables listed below the parent table node.
Running the form showed correct relational behavior, and the primary
key columns I set to visible = false on both child datagridviews were,
indeed, hidden.

I then added a tabcontrol to the form and dragged each child
datagridview to a seperate tab of the tabcontrol. Upon running the
form, the datagridview on the first tab still displays correctly, while
whichever datagridview is on the second tab fails to hide the primary
key column as specified. When I change the tabs collection properties
of the tabcontrol to move Tab2 to the top, and therefore be displayed
first, then the datagridview on Tab2 displays correctly, while that on
Tab 1 (now displayed as the second tab) fails to hide the "hidden"
column.

I can't imagine why this behavior would be by design, so I am assuming
it is a bug. Unfortunately, I also can't imagine that, if it *is* a
bug, they wouldn't consider it important enough to include a fix in
SP1.

Anyone else wrestling with this? How are you getting around it?

On Jan 25, 9:57 pm, "Richard Carpenter" <rumble...@hotmail.comwrote:
I have a four-page tabcontrol with a gridview on each page. I have the
primary key column of each gridview set to hidden (visible = false),
but it still shows up on all but the first page. Anyone else see this
behavior? How might I correct it?
Jan 26 '07 #2
I did find another who had the same problem. I guess persistence in my
Google searching pays off. ;)

http://groups.google.com/group/micro...1afeda1ef320bb
On Jan 26, 10:49 am, "Richard Carpenter" <rumble...@hotmail.com>
wrote:
Minor correction - I am dealing with datagridviews. Also, I thought I
would detail my subsequent recreating of the problem using a more
simplified environment and fewer variables:

I just reproduced this scenario on another PC with VS 2005 SP1
installed and got the same behavior. To do so, I created a new database
with three simple tables - a parent table and two child tables in the
SQL 2005 Express database. I created primary key columns in each table
and foreign key columns in the two child tables. I defined
relationships in the database for both child tables with the parent
table (child.foreignkey to parent.primarykey).

I created a new dataset in a new VB windows project which automatically
imported those relationships as well. I dragged the parent table from
the project data sources window onto a form as adatagridviewas well
as the two related child tables listed below the parent table node.
Running the form showed correct relational behavior, and the primary
key columns I set tovisible= false on both child datagridviews were,
indeed, hidden.

I then added atabcontrolto the form and dragged each childdatagridviewto a seperate tab of thetabcontrol. Upon running the
form, thedatagridviewon the first tab still displays correctly, while
whicheverdatagridviewis on the second tab fails to hide the primary
key column as specified. When I change the tabs collection properties
of thetabcontrolto move Tab2 to the top, and therefore be displayed
first, then thedatagridviewon Tab2 displays correctly, while that on
Tab 1 (now displayed as the second tab) fails to hide the "hidden"
column.

I can't imagine why this behavior would be by design, so I am assuming
it is a bug. Unfortunately, I also can't imagine that, if it *is* a
bug, they wouldn't consider it important enough to include a fix in
SP1.

Anyone else wrestling with this? How are you getting around it?

On Jan 25, 9:57 pm, "Richard Carpenter" <rumble...@hotmail.comwrote:
I have a four-pagetabcontrolwith a gridview on each page. I have the
primary key column of each gridview set to hidden (visible= false),
but it still shows up on all but the first page. Anyone else see this
behavior? How might I correct it?- Hide quoted text -- Show quoted text -
Jan 26 '07 #3

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

Similar topics

2
by: Scott Gunn | last post by:
In my app I want to have a run-time generated tab showing various controls - for instance a form for a user to fill in. I have a tab page in a hidden tabcontrol and all I want to do is clone it...
3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
5
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
8
by: AG | last post by:
ASP.NET 2.0, VS 2005 I have a gridview with paging enabled, bound to an objectdatasource. Both were dropped on to the page and configured via the wizards. Basically working as expected. The...
1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
4
by: Jeff | last post by:
Hi, I have a ASP.NET 2.0 Web Application. Many of the pages use the ASP.NET GridView with paging and sorting. One of the columns of this Gridview is a template column (LinkButton). The data being...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
1
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi all! I have 4 pages in a TabControl. Depending on a selection on the first page, I enable the second page and disable the third one, and vice-versa. What I want is that when the user try to...
4
by: Peter | last post by:
I want to call a JavaScript on PageIndexChanged event, how do I do that? Thank You Peter
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.