listbox

WP7 difficulties binding data to listbox itemssource - won't refresh

此生再无相见时 提交于 2019-12-11 02:22:43
问题 So I have a detail page on my WP7 app that shows a listbox showing some data from my app. In the codebehind, I set the listbox itemssource = to a collection of objects. Pretty simple so far. I also have few text boxes and a button on the same screen that lets me add to that object collection. Ideally when I navigate to the page, it should show the contents of the collection in the listbox. If I click add, it should add another object to the collection and then refresh the listbox to show the

How to load large amounts of data in a ListBox? ASP.NET MVC application

吃可爱长大的小学妹 提交于 2019-12-11 02:14:44
问题 I am working with an ASP.NET MVC application. There is a requirement that a user be able to select an item from a ListBox that could contain over 30,000 entries. Is there a dynamic way to populate the contents of this ListBox using an Ajax call - that would perform well? Would I be better off just populating the ListBox control on the server and then having the user wait while the page renders with the 30,000 entries? Would performance be better if I adopted some sort of jQuery solution? Any

WPF ListBox bind ItemsSource with MVVM-light

萝らか妹 提交于 2019-12-11 02:11:59
问题 XAML <Window x:Class="Html5Mapper.Mapper.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wpt="http://schemas.xceed.com/wpf/xaml/toolkit" Title="HTML mapper" Height="300" Width="600" > <Window.DataContext> <Binding Path="Main" Source="{StaticResource Locator}"/> </Window.DataContext> <ListBox Name="lbFiles" ItemsSource="{Binding Filescollection, Mode=OneWay}" Width="240" Height="220"> <ListBox

Dragging and reordering listbox items in Windows phone

感情迁移 提交于 2019-12-11 02:10:02
问题 I have been looking for a drag and drop listbox, but I guess there is no such default control. A bit of searching has given me,Jason's Blog in which he has pulled it off very gracefully.. In the code he has written, there is a the drag and drop handler which is present at the right end of every listboxitem.. You press on the handler and move the item up or down. I am trying to implement the same on the long press of the item.. He uses a drag interceptor which is basically a canvas and it sits

textBox embedded in a ListBox initial focus

牧云@^-^@ 提交于 2019-12-11 02:06:51
问题 I want to set the focus to the first ListBox item that is a textbox. I want to be able to write in it immedatelly without the necesity to click it or press any key. I try this but doesn't work: private void Window_Loaded(object sender, RoutedEventArgs e) { listBox1.Items.Add(new TextBox() { }); (listBox1.Items[0] as TextBox).Focus(); } 回答1: it's stupid but it works only if you wait a moment, try this version: using System; using System.Windows; using System.Windows.Controls; namespace

Add items in listbox in view when button is clicked

别等时光非礼了梦想. 提交于 2019-12-11 01:59:05
问题 I have this model public class CreateAppointmentSelectPersons { [DataType(DataType.EmailAddress, ErrorMessageResourceType = typeof (Resource), ErrorMessageResourceName = "CreateAppointment_Email_Invalid_Email_Address")] [EmailAddress] [Display(ResourceType = typeof(Resource), Name = "RegisterViewModel_EmailId_Email_Id")] public string Email { get; set; } public Boolean IsSuperOfficeConnected { get; set; } [Display(ResourceType = typeof (Resource), Name = "CreateAppointmentSelectPersons

Listbox SelectionChanged not working with Button in its ItemTemplate

被刻印的时光 ゝ 提交于 2019-12-11 01:56:45
问题 Code below does not work when I select item in listbox, do you happen to know why? <ListBox BorderBrush="Transparent" Background="Transparent" Name="listbox" HorizontalAlignment="Center" VerticalAlignment="Center" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="selection_changed"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel/> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <Button Height="90" Width="150" Template="

WPF Listbox with File Hyperlink mvvm

一世执手 提交于 2019-12-11 01:45:58
问题 I have a ListBox bound to a string ObservableCollection . Whenever a particular string value in the ObservableCollection contains a path to a file , then it should show as a Hyperlink and when clicked it should open the file. How to implement this in the ItemTemplate? 回答1: You can achieve this using DataTemplateSelector public class HyperlinkDataTemplateSelector : DataTemplateSelector { public DataTemplate RegularTemplate { get; set; } public DataTemplate HyperlinkTemplate { get; set; }

How to allow user to change list box order

拜拜、爱过 提交于 2019-12-11 01:43:49
问题 I am looking for help, I have two lists that both add data to the same list box and it displays them as a summary, I would like to know how to let the user move an index up or down in the list box. Items are added here private void BtnAddpickup_Click(object sender, EventArgs e) { /* * This method creates a new pickup object, allows the user to * enter details and adds it to the List * */ Pickupform.pickup = new Pickups(); //New Visit- note added to the pickupform object Pickupform.ShowDialog(

In struts1.2 how to populate dropdown according to database value

瘦欲@ 提交于 2019-12-11 01:34:34
问题 I have a textboxes and one dropdown on html whose value is getting saved to database on clicking save button but on searching for the value all textboxes and radio button are getting populated except the foloowing dropdown .. <td align= "right" nowrap> <html:select property="standard"> <html:option value="I">I</html:option> <html:option value="II">II</html:option> <html:option value="III">III</html:option> ... and for populating the values i am using th following code.. stuform.setStandard(