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

Filter DataGrid Columns

I have a datagrid that outputs sales data like this:

Customer Month Sales
Acme Corp Jan 1,345
Acme Corp Feb 2,567

I'm trying to make it look like this:

Customer Jan Feb
Acme Corp 1,345 2,567

I just started using template columns and was going to try to pull data from
the same place but put a filter on each template column for each month.
Something like DataGrid runat=server id=dgDetails DataSource='<%#
GetDetails(container.dataitem("AccountID"))%>' WHERE Month = Jan
That doesn't seem to work. I dont' know how to get the WHERE clause in there.

The other option I guess would be to put a several prefiltered nested
datagrids into the datagrid?

Would love someone to set me straight. Thanks.
Nov 10 '05 #1
1 1595
Mike,

Can this one help you?

http://www.vb-tips.com/default.aspx?...8-2b9e762316ab

(It is not complete your answer)

Cor

"Mike C" <Mi***@discussions.microsoft.com> schreef in bericht
news:F6**********************************@microsof t.com...
I have a datagrid that outputs sales data like this:

Customer Month Sales
Acme Corp Jan 1,345
Acme Corp Feb 2,567

I'm trying to make it look like this:

Customer Jan Feb
Acme Corp 1,345 2,567

I just started using template columns and was going to try to pull data
from
the same place but put a filter on each template column for each month.
Something like DataGrid runat=server id=dgDetails DataSource='<%#
GetDetails(container.dataitem("AccountID"))%>' WHERE Month = Jan
That doesn't seem to work. I dont' know how to get the WHERE clause in
there.

The other option I guess would be to put a several prefiltered nested
datagrids into the datagrid?

Would love someone to set me straight. Thanks.

Nov 11 '05 #2

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

Similar topics

1
by: Peter | last post by:
In this topic "Walkthrough: Using a DataGrid Web Control to Read and Write Data" updates/edits of a table are covered for all data and column(s). However no topic or section dedicated to explain...
3
by: Dan V. | last post by:
How can I use real SQL on a DataTable? i.e. not array of rows using a filter... as in DataTable.Select. I read at : microsoft.public.dotnet.framework.adonet "As others have posted: There is no...
3
by: MrNobody | last post by:
I've read that the expression property for DataColumns is used to "Sets or retrieves the expresssion used to filter rows, calculate the values in a column, or create an aggregate column.". I...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
8
by: ruca | last post by:
Hi gurus, How can I filter data in my DataSet and then put the result in a DataGrid? NOTE: I'm reading a txt file into a dataset with 3 columns: Id, Name, Age I have this: ...
3
by: Juanjo | last post by:
I have a datagrid with two temnplate columns. When a row is in edit mode the each template columns show a dropdownlist (its datasource is a dataview). I need to filter data of second dropdownlist...
3
by: jason | last post by:
I'll try to explain in detail what it is I'm struggling with. I created a SQL database with one table called CallSheet which contains the following columns: Caller ID: <--Primary Key, auto...
1
by: Lal | last post by:
Hello, I am using a datagrid and listing items, the datagrid have 4 columns, I want to give multiple columns search option trhu row filter. search on single coulumn is working fine. please help...
1
by: Mike C | last post by:
I have a datagrid that outputs sales data like this: Customer Month Sales Acme Corp Jan 1,345 Acme Corp Feb 2,567 I'm trying to make it look like this: Customer ...
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...
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...
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: 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...

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.