how to repeat the direction in listview control - asp.net

i using datalist control where i am displaying images under it. that is( 6 columns * 5 rows)
for thati have property repeat direction is "horiztonal" .
like the above design i need perform in listview Control (i.e )
display like this( here 1,2 are data after 6 data is displayed 7th data start from second row)
1 2 3 4 5 6
7 8 10 11 12 13
any help would be great thank you

A ListView is better suited for this.
EDIT
You can insert basic HTML in the ItemTemplate and use the binding syntax described here:
https://web.archive.org/web/20211020150712/https://www.4guysfromrolla.com/articles/010208-1.aspx

Try RepeatColumns to specify the item count in a row like this :
DataList1.RepeatColumns = 6;
DataList1.RepeatDirection = RepeatDirection.Horizontal;

Related

Vertical-inclied list of elements ( or divs) - AngularJS

I have a list of 15 elements, which I am repeating through with ng-repeat. I would like to display them as a list or divs is kinda of a weird order like this(each number represents the 'index'):
1 4 7 10 14
2 5 8 11 12
3 6 9 13 15
they have to be indented just like this.
Is there any way to do this with angular/bootstrap/css rather than splitting things up on API side?
Solved it myself in very tricky(API side would be the best solution) way but it's working - so I will write the answer if anyone would be looking. I wrote 3 ng-repeats and I am showing only with $index that I would like to. So for the first line that would be : {{$index}}

Am I at the deepest hierarchical grouping

I'm working on a Crystal report which is grouped hierarchically. Sometimes the data goes down to a fifth-level grouping, sometimes only a 4th. I'd like to be able to tell if I'm at the deepest level of the tree, so that I can switch from using the data in the group header to using the data in the detail line, setting it to columns. I've tried to use the Maximum() function to see how deep the tree goes, but that requires a field, not just an expression.
I've also tried writing a hierarchical query in Oracle and using the MAX OVER (PARTITION BY parent) clause, but that's only bringing back the data I already have, and in addition, it seems to be forcing me to lose the level-1 lines.
ETA: I have checked the GroupingLevel and HierarchyLevel functions, but those don't seem to help -- they only tell me where I am, not where I'm going. When I said above that I used Maximum(), I should have clarified I meant Maximum(HierarchyLevel(blah)).
ETA2: Ok, say the data looks like this:
id parentid
1
2 1
3 2
4 3
5 3
6 1
7 6
8 7
9 8
10 8
11 8
I want something that will return True for 4, 5, 9, 10, and 11, because that's as far down the tree as I can go.

Asp.net GridView Control

I want to display the grid view like this -(fig 1)
Sr.no Class ----Division------ Total
A B C
-----------------------------------
1. 1st 10 20 30 60
2. 2nd 20 10 40 70
-----------------------------------
Total 30 30 70 130
values shown are total_no_students in Division A,B,C..
and from table i get data like this-(fig-2)
Class A B C
1st 10 20 30
2nd 20 10 40
i created the gridview..but if i directly bind the data i get same as fig-2
how should i customize gridview so that it displays the data as fig-1
Apart from gridview if there is any other control that i can use please do suggest me
thank you
The bottom row will require a GridView footer.
Footer Example
For the column total the following example will solve your problem (check Rahul's answer)
Row Total Example

Using two datasets in a single report using SQL server reporting service

I need to show a report of same set of data with different condition.
I need to show count of users registered by grouping region, country and userType, I have used drill down feature for showing this and is working fine. Also the reported data is the count of users registered between two dates. Along with that I have to show the total users in the system using the same drill down that is total users by region, country and usertype in a separate column along with each count (count of users between two date)
so that my result will be as follwsinitialy it will be like
Region - Country - New Reg - Total Reg - User Type 1 - UserType2
+ Region1 2 10 1 5 1 5
+ Region2 3 7 2 4 1 3
and upon expanding the region it will be like
Region - Country - New Reg - Total Reg - User Type 1 - UserType2
+ Region1 2 10 1 5 1 5
country1 1 2 1 2 - -
country2 1 8 1 8 - -
+ Region2 3 7 2 4 1 3
Is there a way I can show my report like this, I have tried with two data sets one with conditional datas and other with non conditional but it didn't work, its always bing total number of regiostered users for all the total reg columns
Unless I'm mistaken, you're trying to create an expandable table, with different grouping levels? Fortunately, this can be easily done in SSRS if you know where to look. The totals on your example don't seem to match up in the user columns, so I may have misunderstood the problem.
For starters, set up your query to produce a single dataset like this:
Region Country New Reg - Total Reg - User Type 1 - User Type 2
Region1 country1 1 2 1
Region1 country2 1 8 1
Region2 country3 2 4 1 1
Region2 country4 1 3 1
Now that you've got that, you want to set up a new table with the fields "NewReg", "TotalReg", "UserType1" and "UserType2". Then right-click the table row, and go to "Add Group > Row Group > Parent Group". Select "Country" in the Group by and click okay. Then, repeat this process and select "Region". This time however, tick the "Add group header" box. This will insert another row above the original.
Now, for each of your fields ("NewReg", "TotalReg" etc), click in the new row above and select the field again. this will automaticaly add a Sum(FieldName) value into the cell. This will add together all the individual row totals and present a new, grouped by region row when you run the report.
That should give you the table you require with the data aggregated correctly, so all you need to do is manage the show/hide the detail rows on demand.
To do this, select your detail row (the original row) and right-click "> Row visibility". Set this to "Hide". Now, select the cell that contains the "Region" and take note of its ID using Properties (for now, let's assume it's called "Region"). Click back onto your detail row and look at the properties window. At the bottom you'll see a "Visibility" setting. In there, set "InitialToggleState" to False and "ToggleItem" to the name of your region group's cell (i.e. "Region").
Now all that should be left is to do the formatting etc and tidy up.
I have solved this problem by taking all the records from DB and filtering the records to collect new reg count by using an expression as following
=Sum(IIF(Fields!RegisteredOn.Value >Parameters!FromDate.Value and Fields!RegisteredOn.Value < Parameters!EndDate.Value , 1,0))

ASP.NET - Data Grid and Drop Down list

I am working on a web page that has a data grid and have a need to do
the following:
Have a column that is a drop down when the grid loads (no need to click edit)
This column is bound to a column from the data query (everything up
to this point works fine)
I know need to add more values to this drop down from another
dataset (so the user can change the value if required)
These values come from a query to another table in the database. The
values will be same for all the rows in the table, these values are
based on a master key for the complete webpage.
As an example:
table 1 has:
Mangoes $12
Apricots $13
Peaches $14
This is on the grid.
The other table has:
Prices
12
13
14
15
16
I want these values from the prices table to appear in the drop down
for table 1 in the data grid, with the current values as the selected
item.
Any ideas will help. Thanks for the help.
As far as I know,
U should better change ur table design.
If ur fruit table is concern with price id, then u can easily select the item from dropdown with current value in fruit table.
Fruit
PriceId
PriceId
Price
------------------------ --------------------
Mangoes
1
<--------------------->
1
12
Apricots
2
<--------------------->
2
13
Peaches
3
<--------------------->
3
14
then it is easier to list all price in dropdown list
and also easier to choose selected price based on PriceId from Fruit table.
Sound like little confuse? let me know, if anything u want?
Hope it works!

Resources