Search Results

Search found 931 results on 38 pages for 'combobox'.

Page 6/38 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • c# combobox autocomplete like method

    - by Willem T
    Ihave been looking for an LIKE autocompletion mode. can anyone help me with this. When i enter a text in the combobox, the database should be asked for the data. all that goes well. But then i want my combobox to behave like the Suggest mode, but it doesn't work. I Tried this: cursorPosition = txtNaam.SelectionStart; string query = "SELECT bedr_naam FROM tblbedrijf WHERE bedr_naam LIKE '%" + txtNaam.Text + "%'"; DataTable table = Global.db.Select(query); txtNaam.Items.Clear(); for (int i = 0; i < table.Rows.Count; i++) { txtNaam.Items.Add(table.Rows[i][0].ToString()); } Cursor.Current = Cursors.Default; txtNaam.Select(cursorPosition, 0); But the behavior that this function creates is off it doesnt work like the suggest mode its a bit buggy. Can anyone help me to get it working properly Thanks

    Read the article

  • How can I get my UserControl to look like a ComboBox?

    - by NoLuke
    I have a user control containing a TextBox, ToggleButton and Popup, just like the real ComboBox. Now my problem is to style it so that it looks just like the normal ComboBox. In Blend, I can "Edit Template/Edit a Copy..." of a real ComboBox to get the bits and pieces I need to get it to look right. For one Windows theme (Aero). If the application is run on another theme (e.g Luna), the control does not change its look, it still has the Aero look. Do I have to supply a style/template for each Windows theme, or can I somehow get hold of (at run-time) the default ComboBox style and apply it to my UserControl? Instead of making a UserControl, I have tried modifying a real ComboBox to my needs, but I just couldn't get it to work. How can I replace ALL the logic of a ComboBox with my own?

    Read the article

  • Wpf Combobox in Master/Detail MVVM

    - by isak
    I have MVVM master /details like this: <Window.Resources> <DataTemplate DataType="{x:Type model:EveryDay}"> <views:EveryDayView/> </DataTemplate> <DataTemplate DataType="{x:Type model:EveryMonth}"> <views:EveryMonthView/> </DataTemplate> </Window.Resources> <Grid> <ListBox Margin="12,24,0,35" Name="schedules" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=Elements}" SelectedItem="{Binding Path=CurrentElement}" DisplayMemberPath="Name" HorizontalAlignment="Left" Width="120"/> <ContentControl Margin="168,86,32,35" Name="contentControl1" Content="{Binding Path=CurrentElement.Schedule}" /> <ComboBox Height="23" Margin="188,24,51,0" Name="comboBox1" VerticalAlignment="Top" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=Schedules}" SelectedItem="{Binding Path=CurrentElement.Schedule}" DisplayMemberPath="Name" SelectedValuePath="ID" SelectedValue="{Binding Path=CurrentElement.Schedule.ID}" /> </Grid> This Window has DataContext class: public class MainViewModel : INotifyPropertyChanged { public MainViewModel() { _elements.Add(new Element("first", new EveryDay("First EveryDay object"))); _elements.Add(new Element("second", new EveryMonth("Every Month object"))); _elements.Add(new Element("third", new EveryDay("Second EveryDay object"))); _schedules.Add(new EveryDay()); _schedules.Add(new EveryMonth()); } private ObservableCollection<ScheduleBase> _schedules = new ObservableCollection<ScheduleBase>(); public ObservableCollection<ScheduleBase> Schedules { get { return _schedules; } set { _schedules = value; this.OnPropertyChanged("Schedules"); } } private Element _currentElement = null; public Element CurrentElement { get { return this._currentElement; } set { this._currentElement = value; this.OnPropertyChanged("CurrentElement"); } } private ObservableCollection<Element> _elements = new ObservableCollection<Element>(); public ObservableCollection<Element> Elements { get { return _elements; } set { _elements = value; this.OnPropertyChanged("Elements"); } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } One of Views: <UserControl x:Class="Views.EveryDayView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Grid > <GroupBox Header="Every Day Data" Name="groupBox1" VerticalAlignment="Top"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <TextBox Name="textBox2" Text="{Binding Path=AnyDayData}" /> </Grid> </GroupBox> </Grid> I have problem with SelectedItem in ComboBox.It doesn't works correctly.

    Read the article

  • combobox value string to int

    - by asli
    Hi,I have a question about converting types each other.I want to change the selected combobox value string to int but I get errors my code: int.Parse(age.SelectedItem.ToString()); What can I do for this problem?Thank you

    Read the article

  • Casting SelectedItem of WPF Combobox to Color causes exception

    - by Nick Udell
    I have a combobox databound to the available system colors. When the user selects a color the following code is fired: private void cboFontColour_SelectionChanged(object sender, SelectionChangedEventArgs e) { Color colour = (Color)(cboFontColour.SelectedItem); } This throws a Casting Exception with the following message: "Specified cast is not valid." When I hover over cboFontColour.SelectedItem in the debugger, it is always a Color object. I do not understand why the system seemingly cannot cast from Color to Color, any help would be much obliged.

    Read the article

  • wpf: getting combobox value

    - by Martin
    I have a WPF ComboBox named cbFileSize. I try to get is selected value like so: string tmp = cbFileSize.SelectedValue.ToString(); MessageBox.Show(tmp); But tmp gets set to "System.Windows.Control.ComboBoxItem: 16". Which function should I use to just get the value "16"?

    Read the article

  • vb.net using SortedDictionary as combobox datasource

    - by user228058
    I have a combobox which i am binding to a sortedDictionary list, so it displays in ascending order. My question is, I need to display "--Select--" as the first option. Is there any way to either: 1) add another item besides for the datasource or 2) add an unsorted item to the top of the sortedDictionary any other ideas welcome as well :) TIA

    Read the article

  • Flex 3 ComboBox skin, limiting text width

    - by Rhys Causey
    I've created a ComboBox skin by extending mx.skins.ProgrammaticSkin. It's working fine, except I can't figure out how to limit the width of the text. Is there a way to control this within the skin? See the attached image for an example of the text going too far. I would like it to stop before the separator line to the left of the down arrow.

    Read the article

  • gwt ext combobox

    - by usman
    hi, i am using gwt ext.i have a combo box.i want to set my own filter to display the value. Any idea please eg: combobox contain : jon , jockey jo, rock k, michle ken, jonty mark, if i enter k the combo box has to show rock k. condition is it has to check the starting letter word of the list

    Read the article

  • Combobox DropDownList and keypress

    - by Jim
    I have a dropdownlist that holds all of the TimeZone.Displayname All of these display names come out as: (GMT +09:00) Seoul, (GMT -06:00) Central Time (US & Canada), etc. Is there a way to have a keypress event that would search through the first letter after the ")"? Right now it only recognizes the first character of the combobox string which is "(" EDIT Changed title because timezones don't really have to do with the issue.

    Read the article

  • how do you control the width of a jquery ui autocomplete combobox

    - by oo
    i am using this jquery ui combobox autocomplete control out of the box off the jquery ui website: my issue is that i have multiple comboboxes on a page and i want them to have different widths for each one. i can change the width for ALL of them by adding this css: .ui-autocomplete-input { width:300px; } but i can't figure out a way to change the width on just one of them

    Read the article

  • WPF Combobox binding

    - by plotnick
    I got two Comboboxes and both of them have binding with the same Source. <ComboBox ItemsSource="{Binding Source={StaticResource UsersViewSource}}" And when I change something in the first one, it reflects also to the second one. And I dunno how to keep their SelectedItem values separately, using the same ItemsSource.

    Read the article

  • Is it possible to set the width of a jquery autocomplete combobox

    - by oo
    i am using this jquery ui combobox autocomplete control out of the box off the jquery ui website: my issue is that i have multiple comboboxes on a page and i want them to have different widths for each one. i can change the width for ALL of them by adding this css: .ui-autocomplete-input { width:300px; } but i can't figure out a way to change the width on just one of them

    Read the article

  • C# invisible items in combobox

    - by Lai
    Hi, I'm loading Strings to a Combobox - cboIndexLanguage.Items.Add("ThisLanguage") i would like to make several of these items invisible. does anyone knows how to do it? Thanks For Advance,

    Read the article

  • Adding two buttons next to an ExtJS ComboBox

    - by Giku Promitt
    Hi. I need to place an Add button and a Remove button next to an ExtJS ComboBox. It's critical for these three elements to be in a single line because I have to apply this to all other ComboBoxes in the fieldset too. Please notice that the given ComboBoxes are items of a fieldset. Replacing the buttons with context menu items is not the desired solution. Can you give me some ideas? Thanks in advance.

    Read the article

  • PHP combobox can't save the selected value on Edit Page

    - by bEtTy Barnes
    hello I've got problem with my combobox. It's not saving the selected value in Edit page. Here what I'm working with: private function inputCAR(){ $html = ""; $selectedId = $this->CAR; //$html .= '<option value="Roadmap Accelerator - Core">Roadmap Accelerator - Core</option>'; //$html .= '<option value="Roadmap Accelerator - Optional Core">Roadmap Accelerator - Optional Core</option>'; //$html .= '<option value="Regulatory">Regulatory</option>'; //$html .= '<option value="Mission Critical">Mission Critical</option>'; //$html .= '<option value="Various CARs/Types">Various CARs/types</option>'; $selection = array( "Roadmap Accelerator - Core", "Roadmap Accelerator - Optional Core", "Regulatory", "Mission Critical", "Various CARs/types" ); $html .= '<label for="car">CAR Type</label>'; $html .= HTML::selectStart("car"); foreach($selection as $value){ $text = $value; $html .= HTML::option($value, $text, $selectedId == $value ? true : false); } $html .= HTML::selectEnd(); return $html; } My option function: public static function option($value, $text, $isSelected=false) { $html = '<option value="' . $value . '"'; if($isSelected) { $html .= ' selected="selected"'; } $html .= '>'; $html .= $text; $html .= '</option>'; return $html; } When I first created a record. The selected value from my combobox got saved into the DB then the page refreshed to display. When I went to edit page, to select another value, and clicked save button. On the display page, it's not saving. For example. on Create page I selected Regulatory. then I changed my mind and changed it to Mission Critical on Edit page. On display page it is not changed. I don't know what's wrong or what I'm missing here. Any help is welcome and truly appreciated. Thanks.

    Read the article

  • Preventing comboBox keyboard selection

    - by Cornel
    As you now the user can select an item from the comboBox by keyboard directly. By mouse I block the user to select some items depending on the behind object state. What's the best solution to stop this when the user uses the keyboard?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >