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

ASP.NET Bound Columns

Hi,
I have recently started developing ASP.net applications using VB.net.
Well, I created this huge query to retrieve data from SQL Server and create a pivot table, which means I'm creating columns of values. It all works fine and I have a datagrid which displays the data like the way I want.

I'm using Bound columns where I'm defining the Name and Datafields to show for my datagrid columns. All of this was the easy part.

Now, my query creates 55 columns which makes my data grid look like an I-Max screen (weeeheee). To shorten the looks of the grid what I can do is show columns which has a value > 0 and do not show the ones which do not. As I review the data in my I MAX grid there are loads of columns which have zeros and there visibility of no use to me. However, I cannot have zero values columns totally not show in my grid as they might have values based on selection made(business logic).

So, how can I make something like this.... in my code behind

IF <asp:boundcolumn headertext="3RT " datafield="3RT " /> < 0 THEN <asp:boundcolumn headertext="3RT FEE " datafield="Z510" /> .Visible = false


I know the above does not make sense as coding goes but this is just to show what I wanna do in the terms of logic. Remember I have 55 columns like that and I wanna have the same condition for all of 'em.

I'll appreciate any help.
Thanks.
Feb 8 '07 #1
0 1009

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Cindi Simonson | last post by:
Hi, I have a form with a combo box containing 4 columns of data. The form also contains 3 print buttons where the goal is to open 3 different reports according to the value in one of the...
15
by: John Blair | last post by:
Hi, Code attached but the line that gives me an error is MyDataGrid.Columns(2).Visible = False It actually gives me an error for any value instead of 2 even when 9 bound columns of data exist....
1
by: Chad Devine | last post by:
Alright, I am posting my solution to a problem I've been having. I have finally found the answer, and it took me a while so I thought I'd provide the final solution here, since it may be benificial...
4
by: Raed Sawalha | last post by:
i have datagrid , I added a bound column and I need to map it with two data fields ...is this possible? <asp:datagrid id=dgInbox runat="server" EnableViewState="False"...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
0
by: Dave | last post by:
I'm having trouble trying to get some bound datagrids to work. I even tried to use some examples that were given to me, but I can't get those to work, either. I have customers, who have orders,...
4
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
5
by: njb35 | last post by:
Hi all I'm beginning my foray from VBA into VB 2005 Express, and enjoying some of the efficiencies it provides! I'm stuck with some dataset handling however that I _think_ can be automated but...
1
by: sivagururaja | last post by:
Hi All, How can i bound the column in the gridview dynamically. When i tried to bound the column using the Code behind, it won't work. Here is my code. BoundColumn bc = new BoundColumn();...
0
by: TonyJ | last post by:
Hello! I'm unsure when I can use a bound datagrid and when I can't. What limitations has a bound datagrid? 1. For example if I want to manipulate the data in the datasource before displaying...
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: 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...
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.