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

Showing/Hiding different headers in Single Datagrid

Hi! Guys
I think some of you can help me here.
Here is the situation......

I have a following columns from different tables and
get a Dataset to Bind with a data grid.

1)ItemId int
2)FeatureId smallint
3)ItemName nvarchar(255)
4)ItemCategory
5)ItemPrice

and so on(not relavent here)

FeatureID =2
==> Best Selling Items
FeatureID =1
==> Best Value Items
FeatureID =0
==> Items
The reason for using a DataGrid is I want to Sort this
Dataset with different fields like Category and Price.

My default Dataset is always sort by featureid in descending order
so that I can have all the Best selling first, then Best value
items and then any Normal items.

My problem is I want to use a SINGLE grid
('casuse easier to handle pagining,sorting and coding)
and want to Display in default mode like

-------------- GRID 1---------------------------------
Best Selling Items
-------------------------------------------------------
Item Name ItemCategory ItemPrice QtyOnHand
-------------------------------------------------------
ITEMA CATEGORY_A $1.00 20
ITEMB CATEGORY_B $1.00 20
Best Value Items
-------------------------------------------------------
Item Name ItemCategory ItemPrice QtyOnHand
-------------------------------------------------------
ITEMA CATEGORY_A $1.00 20
ITEMB CATEGORY_B $1.00 20

Items
-------------------------------------------------------
Item Name ItemCategory ItemPrice QtyOnHand
-------------------------------------------------------
ITEMA CATEGORY_A $1.00 20
ITEMB CATEGORY_B $1.00 20

-------------- END OF GRID 1----------------------------

1)How can I code different headers in the same grid
2)When I sort to another field(e.g Price) all these
different header formatting should no longer be shown
and display in simple format like this

-------------- GRID 1---------------------------------
Items
-------------------------------------------------------
Item Name ItemCategory ItemPrice QtyOnHand
-------------------------------------------------------
ITEMA CATEGORY_A $1.00 20
ITEMB CATEGORY_B $1.00 20
ITEMc CATEGORY_B $2.00 20
ITEMz CATEGORY_B $4.00 20

-------------- END OF GRID 1----------------------------

Don't care about any feature(Best Selling/Value) just
in proper sorted field

Waiting for your replys
Your help is greatly appriciated.

Thanks,
John
Nov 18 '05 #1
0 996

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

Similar topics

3
by: sam | last post by:
Hello Group, Havent had luck posting it to microsoft.public.dotnet.framework.aspnet.datagridcontrol group. Excuse me for the cross posting. I have a datagrid which needs to be split into multiple...
2
by: c.anandkumar | last post by:
Hi All - I have some problems getting a small piece of javascript working correctly for Firefox. Here is what I am trying to do - 1. I have a form (like a search form) 2. I have many groups...
2
by: Kevin | last post by:
Hi Al Can someone tell me how to hide colums in a datagrid. I have a one datagrid that is a master and child and I would like to hide specific columns, how do I do this TI Kevin
3
by: Kenneth | last post by:
Hi, I have an asp.net app that users would like to print out on paper, but the items in the grid are sometimes more than the height of the paper so the grid is divided onto several pages. I...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
2
by: tshad | last post by:
I have a Datagrid that has no rows in it, but I want the title to show, and they aren't. Is there a way to make them visible even if the Datagrid is empty? Thanks, Tom
0
by: Bob Davies | last post by:
Hi I have a webservice that retrieves data from a database, this is then returned to the calling client application built in windows forms within a dataset, however upon attempting to create...
0
by: Rahul Goel | last post by:
Hi I want one datagrid in which if user wishes to rightclick on columns then one context menu should open with Insert Column DeleteColumn and One context menu when user wishes to...
3
by: Gidi | last post by:
Hi, I've a dataGrid, and When I click with the mouse on one of it's header the DataGrid_Click event is called. I don't have problem with the event, but strange things happen to the dataGrid...
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:
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.