data presenttion with dynamic header and columns also fliping rows/columns

 I have to data in data set in the form

 CustomerName , dateof theWeek

 abc                    1 january

abc1                    1 january

xyz                     1 january

dfg                       2 january

hsg                       2 january

and similarly for the week


i want to present the same in a report in / using controls only


1 january      2 january till saturday starting from monday so headers and columns can vary acc to month selected

customer1    customer 1

cutomer2      customer 2


so neither the header nor the rows are static how to present this , using which control


thanks in advance please advice

4/13/2008 4:39:55 PM 72751 articles. 3 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 51

 Any reason you can't put the data into the dataset in the format you want to see it on the screen?

Your column names would be your dates.

A default datagrid or gridview control (depending on what version you are using) would be a piece of cake.

To me, this is a database problem (return the data in the right format) rather than a UI layer problem.


4/14/2008 8:58:46 AM

No there is no specific reason of doing that in UI layer , i can do the same

in database but it is not coming out .... if you have particular query plz help 

4/14/2008 3:14:00 PM

Hi dextar,

This is called cross table.

These articles can help you.

sqlserver 2005 :
c# code:

Samu Zhang
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
4/15/2008 2:56:24 AM

Similar Artilces:

Is there a control that offers the same data presentation as a GridView, but allows users to copy and paste many rows/columns at once?
 Hi Is there a control that offers the same data presentation as a GridView, but allows users to copy and paste many rows/columns at once onto the grid? What I mean is some grid that 's as flexible as MS Excel grid for example.  Any suggestions will be very much appreciated.E The Repeater control is a highly customisable data presentation controlRohin.NET developerNever trust a computer you can't throw out a window. - Steve WozniakPlease remember to click on 'Mark as answer', if this post helped you......

Presenting data from column to row
hi, I am encountering one problem regarding data presenting in data grid. Actaully I want to show column data in one row as record for example as follow column A AAAA BBBB CCC DDD EEE now instead of showing as column i want to show as single row in datagrid as follow AAAA BBBB CCC DDD EEE please help me asadregards,Asad Mahmood In a Datalist (not sure about datagrid) you can use the propertier RepeatColumns and RepeatDirection to do the aboe. For example, RepeatColumns=5 and RepeatDirection=horizontal ...

how to hide column data but keep column header text
 Hello,i want to hide my column data programmatically (C#) but still keep the column and its header.Like if i have a column with header "Title". All the data in this column must not be visible.any suggestion? Thank you  If it is all the data in a given column, then one way of doing it, would be to change: SELECT A, B, C, TITLE FROM TABLEtoSELECT A, B, C, TITLE, '' AS TITLE2 FROM TABLE Duplicate the Title column and change the data that is displayed in the second to TITLE2. For those that are allowed to see the data, show the first, for those tha...

Move data from one column to another column and row
I need some help converting a table which has one row for each year.  Displaying the data so the each row will contain all of the information for the title and all of the years displayed in separate columns. I have a SQL Querry which returns the data looking like this (the querry is grouping by Title and by year, then adding up the quantity of rows): Basic Information needed for Life Insurance 25 2005 Basic Information needed for Life Insurance 45 2006 Ea Chairmans Conference 10 2005 EA Chairmans Conference Press Release 33 2005 EA Chairmans Conferenc...

remove a gridview column dynamically, removes controls in template columns
I have a interface with a treeview and a gridview. The gridview has two templatefields that handles insert/update/deletes. The gridview is handling editing of different tables so I create the other columns in the gridview dynamically as boundfields. The user selects the table to edit in the treeview. The problem I am having happens when the user selects a table to edit the second time. The code that executes removes all bound fields, (dynamically added when user selected the first table in the treeview), but not the two template fields, and then adds boundfields specifi...

How to go through a datatable row by row and column by column
Hello, I have a dataset with a datatable and I need to insert each row from the datatable on my sql table, anyway there may be errors, so some rows may not be inserted because primary key constraints,  So I need to show the rows that are not inserted in a gridview, the hard thing to do is to go through all the datatable,  is there an wasy way to do it?MCPD ENTERPRISE APPLICATION DEVELOPER Start by looking here an update of your dataset, and if a row fails, you can mark it as invalid.You can ...

When is a column not a column?
I have several extremely similar datawindows that I have to maintain that go against the same table. Recently, I had to add a column to that table, and also add the column to ALL of these datawindows that go against this table. I added the column to the first datawindow, set up the edit control style, etc. I then did a copy/paste of the columns edit control to the remaining dw's (of course remembering to first add the column in SQL). Everything (update props, column specs, column props) seems to indicate that the pasted column is linked to the column I selected, HOWEVER, when I...

Want to start new header column 2 columns into first row
I want to add a new header to the first row of my gridview but i want to start 2 columns into the first row. I tried row.Cells.AddAt(2,Cell); but this gives me an how can it be done?    Here is my code so far........     protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)    {        SortedList creatCels = new SortedList();        creatCels.Add("1", "Test,2,1");         GetMyMultiHeader1...

Issue with Template Columns & Bound Columns while updating the data in a GridView control
Hi, I'm facing the below problem (In general, ObjectDataSource is driving me crazy ! ) I have a simple gridview control and an ObjectDataSource is used to populate the grid. I'm trying to update a row and the corresponding tableadapter methods & stored procedure are in place. Each row has 2 checkboxes and 2 textboxes in edit mode. When the change the values in edit mode and hit update, the checkbox values changed are saved into the Database properly, whereas the textbox values are not being saved. If the textbox column is a bound column then the column is updated with <NULL> in...

How do I turn 2 columns of data into 6 columns of data?
I am pulling the Display Name and Fax Number from Active Directory.  It gets put into a datatable, then fed to a DataGrid.  I end up with a format like this: dn fn dn fn dn fn etc. What I need to do is format it like this: dn fn dn fn dn fn dn fn dn fn dn fn I can try a DataList and use <%# DataBinder.Eval(Container.DataItem, "cn" %>, but then the same values would be put in the same place as the code looped through the search results. Does anyone know how to change the actual column layout of a DataGrid or DataList so the data is displayed horizontal...

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

Data Set ---- Data Row ( How to retrieve column data in a array )
Question regarding Dataset in ASP.NET ds = DBFunctions.RunSelect("select * from emp where Userid='" & vUserID & "'") If (ds.Tables(0).Rows.Count > 0) Then Dim dr As DataRow = ds.Tables(0).Rows(0)location= dr("location")  -- this statement only gives me the first locaitonMytable userid          location111              AAA111              BBB111         ...

Calculated column from columns in same row??
Hi everyone - Is there a way to display a calculated value in a column based on values from the same row? Using a datagrid thanks tony Sure. Have a function declared for your OnItemDataBound: Sub CalculateValues(ByVal sender As Object, ByVal e As DataGridItemEventArgs) dim total as Integer = CType(e.Item.FindControl("col1"), Integer) + CType(e.Item.FindControl("col2"), Integer) e.Item.FindControl("totalCOlumn").Text = total End Sub I think it would be something like that.Sara If yo...

Gridview input text field column
Using C# I have a gridview and added a template column called qty. I placed a button on the page and when clicked I call my code behind. While im looping thru the rows, all of the columns appear except the qty field. I'm assuming since I converted it to a template field that I need to do some binding to have it available in the GridView? Here is the code: foreach (GridViewRow row in GridView2.Rows){ Response.Write("text : "+row.Cells[5].Text); } If I change the cell above to - row.Cells[4].text it returns the 4th column just fine, but this column is not a template field - its a regular ...

Web resources about - data presenttion with dynamic header and columns also fliping rows/columns -

The Cartoonist Group - Online Ordering
Online Ordering For republication comics and cartoons cartoons ... Licensing of our great comics and cartoons for diverse uses is easy. While ...

The Comic Strips - On-line Ordering
Online Ordering For republication cartoons ... Licensing of our great comic strips for diverse uses is easy. While we do not offer online ordering, ...

Video Auto / Car Shows -
Home CATEGORY Arts Balloons Crafts Dance Auto Automotive Car Shows Models and Reviews Business Business Tips Career Coaching Economy Entertainment ...

Resources last updated: 1/10/2016 7:17:38 PM