Wrapping a list of Checkboxes in a Datalist or Repeater - repeater

I have a long list of checkboxes bound in a repeater is there a way of wrapping them so instead of having 1 long list wrapping it across 3 or 4 colouns side by side say 7 items long.
Is it easier to do this with a repeater or a Datalist?
Cheers
Ste

It looks like you need to use one of the repeating controls like the DataList control that has a RepeatDirection property:
MyDataList.RepeatDirection = RepeatDirection.Horizontal
Or, you can play around with the HTML markup in the ItemTemplate of the Repeater control. See here for possible clues on this.

If you truly only need a list of check boxes why not use a CheckBoxList and set the RepeatColumns and RepeatDirection properties.

Related

ionic2: Limit a list to show only X items at time and add a scroll bar

I have an array with many items in it and I want to display it using <ion-list> but the thing is that I don't want the list to cover all my page but limit it to let's say 50% of the page. So basically I want it to show about 5 items at a time and have a scroll bar just for the list view. How do I approach this?
Maybe you want to use an <ion-scroll> (documentation here) like I suggest in my answer to your other question here.

How to do dynamic paging in Grid.MVC

I have using grid.mvc control in my project. I want to use dynamic paging in grid.mvc control.
I have combobox having entries 10,25,50. when I change comboBox value. Grid should display data accordingly. ( E.g. when I select 25, grid will show 25 rows). by deafult grid is showing 10 rows at a time.
Also it should adjust while filtering records.
I tried but didn't found any suitable solution.
This in theory should be pretty easy though I haven't done it myself.
You can link that dropdown (in the view) to an action result (in the controller) that changes a value you pass to the ViewBag (in controller ViewBag.WhateverName = dropdown's value).
Then re-render the same view and in the place when you end your grid, end it with
}).WithPaging(ViewBag.WhateverName)
Basically .WithPaging(10) would give you pages with 10 rows, WithPaging(20) 20 rows per page, etc. So by changing that value with the dropdown and registering that action in the controller to reassign the value, you should be able to achieve this functionality.
I will keep editing and maybe add controller code later if I have time, just wanted to get something up to help you out. Good luck!

Can i change an item in a list from another list?

I´ve created a list in SharePoint. What i´ll like to do is create another list, and retrieve some information from one list to my new one, and be able to change the input data from list A in a single line of text.
So lets say, list A is PopStar, with columns like Genre "Rock", HairColor "Red" and GrammyCount "2".
In list B i only want textboxes to show whats in list A and be able to change (update) them, for example Genre to "Pop", HairColor to "Black" and GrammyCont to "8" ?
Is this possible?
i´m using office 365
In order to achieve exactly what you want you will require either a Workflow or an Event Receiver, however I assume you won't feel confident by struggling with such approaches, furthermore, there are some workarounds that could be very close to your requirement and maybe are even better solutions than the approach you suggest, in terms of maintenance, growth and upgrade.
I suggest to review topics like "SharePoint parent/child list webparts connections" or "sharepoint edit form add child items", here are two videos of which you can get some ideas.
https://www.youtube.com/watch?v=9PWIxk6rF-A
https://www.youtube.com/watch?v=-5CdjfLONgE
Take in count that you can do more than what is displayed in the videos, by example in the Edit Form you could add a webpart to display the Quick Edit View (Grid View) of the related list so the values can be edited in the same Form and thus removing the need to navigate to a second window.

Make input field small?

I have a form based on a model. I create a modelformset and need to display many (possibly hundreds) of individual form fields on a single page. I need to reduce the input size and am achieving this by using this:
widgets = {
'm1_pf': forms.TextInput(attrs={'size':1}),
}
However, this smallest size of 1 is still too big. Is there some other way of accomplishing a data-grid like presentation?
I have looked at using a Datatable with "editable cells" but this will not work for my situation. I need to be able to enter several values quickly by entering the first value, hitting tab, entering the next value, hitting tab, etc. Using the mouse to "click" into each cell and edit it (as is how Datatables works) is out of the question.
Thanks
Nevermind -- I figured it out. I added this to my CSS sheet:
input {
width: 1px;
}
I am OK with all input tags having this value.

Long check list ui pattern for web

I have a data entry page where the user is required so make some selections from a list. Currently it is just a check list with about 10 items they can tick, but is will expand soon to about 230. What is a good UI paradigm for dealing with a large number of selectable items? I am considering dual list type control.
Dual list, BUT, for a large # of non-groupable elements:
MUST have ability to select multiple elements (Duh!)
SHOULD have ability to select ALL elements with a click
SHOULD have ability to search (in either list), and select all matching elements
Also, if the lists are REALLY big (1k+), you may run into trouble with slow rendering.
If so, you can also "paginate" the list - e.g. display only first N elements, allow selection from those, and then ability to shift the "frame" to next N elements.
(all the above, BTW, are real attributes of a solution we implemented in an enterprise web app needing a selection list with 30k possible values which could not be grouped).
Are the items grouped in any way? If so, a collapsible tree-type navigation might be useful.
It really depends on the situation and how much space you have but in most cases I prefer the dual list control, aka list builder, you where thinking about.
Here's a nice link for inspiration (requires silverlight): http://good.ly/qh7aeg8
Here's an accessible way using only HTML and Javascript:
Use the HTML fieldset tag to chunk them into logical groups;
use (say) JQuery to show/hide each group;
add navigation at the top to jump to each group.
If you hide all the groups initially, users can click the link for the groups they want to complete. Further, if you add a rollover (could just be a tooltip title attribute on the links for accessibility) with a description of each group, users will have a 'preview' before visiting it.
Finally, if the labels are short enough, give the fieldsets a width and make them into columns using CSS float or absolute positioning.
Try to stick to valid (X)HTML, CSS and Javascript - there are plenty of precedents for this.