Search Results

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

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

  • Databinding a list (in an object) to a combobox in VB.net

    - by Casey
    VB 2008 .NET 3.5 I have a custom "Shipment" object that contains a list of "ShippingRate" objects. This list of "ShippingRates" is accessible through a property "Shipment.PossibleShippingRates." That property simply returns a copy of the list of "ShippingRate" for that particular Shipment. My UI layer receives a list of "Shipment" objects from the BLL. This list is databound to a datagridview, and shows details relevant to the Shipment such as Shipping Address, etc. I want to bind the "Shipment.PossibleShippingRates" property to a combobox, such that when the user changes the grid row, the combobox reflects the "PossibleShippingRates" for that "Shipment." In addition, I need a way to store the "ShippingRate" they selected from the combobox for later use. I have tried a few ideas, but none of them work properly. Any ideas on how to do this?

    Read the article

  • fill combobox value in datagridview based on other combobox in datagridview

    - by Purohit Raghu
    I m creating Web Application..in C# I have One Data grid view In that i Have 2 Combo box i m trying 2 bind second combo box based on first combo-box. in First Combo-box I have value Shirt,T shirt so i want if shirt is selected than second combo-box should have value Slim,Regular..and if T shirt Is selected than second Combo-box should have V neck and rounded color. i have different table for thirst and shirt type... I work fine for first time but when i goes on second row and change the combo box value than it will also change value of second combo box value of previous row as well .. Where i need to change to prevent change in upper row i have following code private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { if (dataGridView1.CurrentCell.ColumnIndex == 0) { ComboBox cbx = e.Control as ComboBox; cbx.SelectionChangeCommitted -= new EventHandler(cbx_SelectionChangeCommitted); cbx.SelectionChangeCommitted += new EventHandler(cbx_SelectionChangeCommitted); } } private void cbx_SelectionChangeCommitted(object sender, EventArgs e) { int selectedIndex = ((ComboBox)sender).SelectedIndex; if (selectedIndex == 1) //this condition is true if i have selected shirt from combobox1 { ShirtType(); } if (selectedIndex == 2) { Tshirtype(); } } void ShirtType() { try { string str; str = "select ShirtType_name,ShirtType_Id from ShirtType_master"; ds = new DataSet(); ds = cn.readdata(str); Type.DataSource = ds.Tables[0];//Type is Combobox name of Second Combobox Type.DisplayMember = ds.Tables[0].Columns[0].ToString(); ; Type.ValueMember = ds.Tables[0].Columns[1].ToString(); ; } catch (Exception ee) { } } void Tshirtype() { try { string str; str = "select TShirtType_name,TshirtType_Id from TshirtType_Master"; ds = new DataSet(); ds = cn.readdata(str); Type.DataSource = ds.Tables[0]; Type.DisplayMember = ds.Tables[0].Columns[0].ToString(); ; Type.ValueMember = ds.Tables[0].Columns[1].ToString(); ; }

    Read the article

  • Proper binding data to combobox and handling its events.

    - by Wodzu
    Hi guys. I have a table in SQL Server which looks like this: ID Code Name Surname 1 MS Mike Smith 2 JD John Doe 3 UP Unknown Person and so on... Now I want to bind the data from this table into the ComboBox in a way that in the ComboBox I have displayed value from the Code column. I am doing the binding in this way: SqlDataAdapter sqlAdapter = new SqlDataAdapter("SELECT * FROM dbo.Users ORDER BY Code", MainConnection); sqlAdapter.Fill(dsUsers, "Users"); cbxUsers.DataSource = dsUsers.Tables["Users"]; cmUsers = (CurrencyManager)cbxUsers.BindingContext[dsUsers.Tables["Users"]]; cbxUsers.DisplayMember = "Code"; And this code seems to work. I can scroll through the list of Codes. Also I can start to write code by hand and ComboBox will autocomplete the code for me. However, I wanted to put a label at the top of the combobox to display Name and Surname of the currently selected user code. My line of though was like that: "So, I need to find an event which will fire up after the change of code in combobox and in that event I will get the current DataRow..." I was browsing through the events of combobox, tried many of them but without a success. For example: private void cbxUsers_SelectionChangeCommitted(object sender, EventArgs e) { if (cmUsers != null) { DataRowView drvCurrentRowView = (DataRowView)cmUsers.Current; DataRow drCurrentRow = drvCurrentRowView.Row; lblNameSurname.Text = Convert.ToString(drCurrentRow["Name"]) + " " + Convert.ToString(drCurrentRow["Surname"]); } } This give me a strange results. Firstly when I scroll via mouse scroll it doesn't return me the row wich I am expecting to obtain. For example on JD it shows me "Mike Smith", on MS it shows me "John Doe" and on UP it shows me "Mike Smith" again! The other problem is that when I start to type in ComboBox and press enter it doesn't trigger the event. However, everything works as expected when I bind data to lblNameSurname.Text in this way: lblNameSurname.DataBindings.Add("Text", dsusers.Tables["Users"], "Name"); The problem here is that I can bind only one column and I want to have two. I don't want to use two labels for it (one to display name and other to display surname). So, what is the solution to my problem? Also, I have one question related to the data selection in ComboBox. Now, when I type something in the combobox it allows me to type letters that are not existing in the list. For example, I start to type "J" and instead of finishing with "D" so I would have "JD", I type "Jsomerandomtexthere". Combobox will allow that but such item does not exists on the list. In other words, I want combobox to prevent user from typing code which is not on the list of codes. Thanks in advance for your time.

    Read the article

  • How to sequential filter/Select multiple combobox w/ just one DataSet

    - by pee2002
    Hi! I´m communicating via webservices with the Server (where's installed the database) and the c# application. So, i dont have direct access with the database Somehow, i receive a DataSet with 3 tables inside: And would like to populate 3 combobox like this: Which (as you already see) has a sequential logic. If i perhaps select "Gabicontas1" instead "Gabicontas" from the first combobox, the next ones has to change.. Can anyone help? Regards

    Read the article

  • Displaying FontFamily in Combobox

    - by Torsten
    Hi. My goal is to manipulate the text-styles of my application via DependencyProperties. I got a diagram in which the texts are to be manipulated in size, fontfamily, color, etc. So I'd like to use an interface similar to a rich text editor like Word. I'm using this code in my TextStyleVM http://shevaspace.blogspot.com/2006/12/i-have-some-fun-with-formattedtext_14.html So I have a FontFamilyProperty and a Getter and Setter for it: public static DependencyProperty FontFamilyProperty = DependencyProperty.Register( "FontFamily", typeof(FontFamily), typeof(OutlinedText), new FrameworkPropertyMetadata( SystemFonts.MessageFontFamily, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.AffectsMeasure), new ValidateValueCallback(IsValidFontFamily)); public FontFamily FontFamily { get { return (FontFamily)base.GetValue(FontFamilyProperty); } set { base.SetValue(FontFamilyProperty, value); } } Then there is a ToStyle method, which sets the style for the labels of the diagram, which are to be manipulated: Style style = new Style(); Binding fontFamilyBinding = new Binding("FontFamily"); fontFamilyBinding.Source = this; Setter fontFamilySetter = new Setter(); fontFamilySetter.Property = TextBlock.FontFamilyProperty; fontFamilySetter.Value = fontFamilyBinding; style.Setters.Add(fontFamilySetter); return style; Now this works for a TextBox. The textbox displays the current FontFamily, and if I enter a new, valid FontFamily like Arial into the textbox the FontFamily of the labels are changed. However, what I'd like to have is a combobox, which displays the SystemFonts and where I can choose one FontFamily for my labels. However, the binding doesn't seem to work. Neither the system fonts nor the current fonts of the labels are displayed. The combobox is just empty. This is my xaml: <r:RibbonLabel Content="FontFamily" /> <!--these do not work--> <r:RibbonComboBox SelectedItem="{Binding FontFamily}"/> <r:RibbonComboBox ItemsSource="{Binding FontFamily}"/> <!--this works--> <r:RibbonTextBox Text="{Binding FontFamily}"/> Now, I assume I have to set a different Setter for a ComboBox in the ToStyle Method. But I have no clue, which one. Maybe someting like this: fontFamilySetter.Property = ComboBox.ItemSource; However, if I set that Property, the TextBox still works. So is this the wrong place to start at? I'd also be grateful if someone could hint me to some documentation about using these Style-, Setter-, Binding-key-words, which are used in the ToStyle method, since this is somebody elses code I'm working with.

    Read the article

  • C#: Set ComboBox Height

    - by thelost
    Hi guys, I'm trying to set the Height of a ComboBox in C#.NET CF / WinCE6. So far I managed to do it by using the MessageWindow.SendMessage() with CB_SETITEMHEIGHT. The issue is the ComboBox gets to its initial Height when being clicked. Is there a workaround for this ? Thanks.

    Read the article

  • WPF: ComboBox DisplayMemberPath is suddenly not shown anymore ?

    - by msfanboy
    Hello, in my ComboBox I see 3 times this: MyNameSpace.ViewModel.CustomerViewModel ?? Actually this code worked but now don`t know what I changed: <ComboBox DisplayMemberPath="{Binding Path=CustomerName}" SelectedIndex="0" ItemsSource="{Binding CustomersViewModel}" /> Customers is a ObservableCollection The same code works fine with a ListBox just using DisplayMemberBinding instead of DisplayMemberPath. What is wrong?

    Read the article

  • Multiline values in dropdown (ComboBox)

    - by Vladimir Kuzin
    Is there are any libraries to make ComboBox to select multiline options when expanded. I am looking something similar to Combobox in ExtJS except values have to appear when user clicks down arrow, like in normal dropdown. Does someone know if its possible to do something like that with ExtJS? Because their own community and support sure doesn’t (http://www.extjs.com/forum/showthread.php?t=94079)

    Read the article

  • Adobe Flex Combobox as itemrenderer

    - by JonoB
    I have a flex combobox as a datagrid itemrenderer. However, after selecting an item in the combobox, its necessary to click out of the combo (i.e. into another cell or elsewhere in the app) for the value to be committed to the combo. Prior to this, the combo sits 'proud' of the datagrid and the value hasnt actually been committed. Is there a way to force the value to be immediately committed after an item has been selected and for the combo to 'lose focus'?

    Read the article

  • WPF ComboBox ControlTemplate Background problem

    - by PaN1C_Showt1Me
    This is an example of a ComboBox's ControlTemplate. CLICK HERE I've tried to set the Background / add a trigger to change the background when the ComboBox is focused (with a tab key for example), both without success. I don't even understand why it isn't included by default ! (compared to the original generic template)

    Read the article

  • .NET ComboBox Autocomplete failing on slashes

    - by Clyde
    The .NET ComboBox autocomplete will not fully autocomplete with the display text contains a slash. It completes only up to the slash, leaving SelectedIndex == -1 and SelectedValue == null. This behavior stupidly persists no matter whether your autocompletesource is set to ListItems rather than FileSystem or URL. Is there any workaround for this that doesn't involve just throwing the ComboBox class away and writing a "MyComboBox" class?

    Read the article

  • Populating a Combobox inside a Gridview

    - by Nawait
    i'm having a few problems working with a gridview and a combobox inside of it. Here is the code for my ListView control: <ListView Height="139" HorizontalAlignment="Left" Margin="10,158,0,0" Name="lvAppointment" VerticalAlignment="Top" Width="250" MinWidth="350"> <ListView.View> <GridView> <GridViewColumn Header="Appointment" Width="120"> <GridViewColumn.CellTemplate> <DataTemplate> <DatePicker SelectedDate="{Binding Path=Appointment}"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Type" Width="170"> <GridViewColumn.CellTemplate> <DataTemplate> <ComboBox ???/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Done" Width="50"> <GridViewColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding Path=Done}" IsThreeState="False"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> I'm popluating the list from a sql ce database via c# with the following code using (SqlCeCommand sqlCeAppointment = new SqlCeCommand("SELECT appid,appointment,done,apptype.type FROM appointment INNER JOIN apptype ON appointment.refatid = apptype.atid WHERE refeventid = @eventid;", sqlCeConn)) { sqlCeAppointment.Parameters.AddWithValue("@eventid", ((cListEventItem)lvEvent.SelectedItems[0]).id); using (SqlCeDataReader sqlCeAppointmentReader = sqlCeAppointment.ExecuteReader()) { lvAppointment.Items.Clear(); while (sqlCeAppointmentReader.Read()) { lvAppointment.Items.Add(new cListAppointmentItem { id = sqlCeAppointmentReader.GetGuid(sqlCeTerminReader.GetOrdinal("appid")), Appointment = sqlCeAppointmentReader.GetDateTime(sqlCeTerminReader.GetOrdinal("appointment")), Type = sqlCeAppointmentReader.GetString(sqlCeTerminReader.GetOrdinal("type")), Done = sqlCeAppointmentReader.GetByte(sqlCeTerminReader.GetOrdinal("done")) }); } } } I can popluate the list just fine. But i want "Type" to be a combobox so the user can select the apropriate type of the appointment (its a list of appointments connected to an event). This combobox should be filled with data thats inside a table of the sql ce database (apptype). This table is not static, the users can add and delete items from this list. I have tried a few ways i found via google, but failed. I guess i'm having problems understanding how this works/should work. I hope someone can help me :( Thanks in advance

    Read the article

  • Flex ItemRenderer/Editor ComboBox Issue...Puhleezz Help

    - by Mohit
    Hi EveryOne Beginner in Flex ...Even worse with item renderers... Have managed to add a Combobox to a datagrid using a itemEditor... I want to change the options in a combo box depending on the value selected by the user on a previous combo.. In the combo box i want to display a certain value (Model Name ) but for quering a table i'll pass the corresponding code of the model :(... sounds simple enough ..unfortunately not able to implement it I have found this problem on this site but the solution seems an overkill for my "small" problem..was hoping if anyone could guide me towards a more simpler solution... My xml comes as <item><mstValue>CH1</mstValue><mstRemarks>CARRIER</mstRemarks></item> <item><mstValue>CH2</mstValue><mstRemarks>TRANS</mstRemarks></item> <item><mstValue>CH3</mstValue><mstRemarks>YORK</mstRemarks></item> Now i have been able to show the values in a combo .if user selects CARRIER i want to pass CH1(dont know how to do it with itemeditors)...and then fetch values corresponding to CH1 from a table (second part of the problem)...in the sample below i used this.parentDocument.modelComboChanged(this.selectedItem) to pass the selected value ...instedd i need to pass the code for it which comes from the xml...Pls help this making me go crazy.... <mx:DataGrid id="chillerGrid" dataProvider="{chillerGridDp}" editable="true" itemRollOver="{ComponentUtil.setTooltip(event,this)}" itemRollOut="ComponentUtil.resetTooltip(event)" width="70%" height="160"> <mx:columns> <mx:DataGridColumn id="test" headerText="Model" dataField="model" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();};this.parentDocument.modelComboChanged(this.selectedItem)}" dataProvider="{this.parentDocument.arrColl1}" text="mstRemarks" labelField="mstRemarks" editable = "false" > <!--<mx:dataProvider > <mx:String></mx:String> <mx:String>Model1</mx:String> <mx:String>Model2</mx:String> <mx:String>Model3</mx:String> <mx:String>Model4</mx:String> <mx:String>Model5</mx:String> </mx:dataProvider>--> </mx:ComboBox> <!--<components:ComboBoxIn dataProvider="{this.parentDocument.arrColl1}" labelField="mstRemarks" /> --> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Make" dataField="make" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();} }" labelField="@label" editable = "false" > <mx:dataProvider> <mx:String></mx:String> <mx:String>Carrier</mx:String> <mx:String>York</mx:String> <mx:String>Trane</mx:String> </mx:dataProvider> </mx:ComboBox> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Chillers" dataField="chillers" width="200" editable="true"> <mx:itemEditor> <mx:Component> <mx:TextInput maxChars="49" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

  • Combobox with collection view itemssource does not update selection box item on changes to the Model

    - by Vinit Sankhe
    Hello, Sorry for the earlier lengthy post. Here is my concise (!) description. I bind a collection view to a combobox as a itemsSource and also bind its selectedvalue with a property from my view model. I must keep IsSynchronizedWithCurrentItem="False". I change the source list ofr the view and then refresh the view. The changed (added, removed, edited) items appear correctly in the item list of the combo. But problem is with the selected item. When I change its property which is also the displaymember path of the combo, the changed property value does not reflect back on the selecton box of the combo. If you open the combo dropdown it appears correctly on the item list but not on the selection box. Now if I change the combobox tag to Listbox in my XAML (keeping all attributes as it is) then when selected item's displaymember property value is updated, the changes reflect back on the selected item of the list box . Why this issue? Just FYI: My View Model has properties EmployeeCollectionView and SelectedEmployeeId which are bound to combo as ItemsSource and SelectedValue resp. This VM implements the INotifyPropertyChanged interface. My core employee class (list of which is the source for the EmployeeCollectionView) is simply a Model class without INotifyPropertyChanged. DisplayMemberPath is "Name" property of employee Model class. I change this by some means and expect the combo selection box to update the value. I tried refreshing ther SelectedEmployeeId by setting it 0 (where it correctly selects the dummy "-- Select All --" employee entry from itemsSource) and old selected value back. But no use. The old value takes me back to the old label. Items collection has latest entry though. When I make combobox's IsEditable=True before the view's refresh and after refresh I make IsEditable=False then the things work out correctly! But this is a patch and is unnecessary. Thx Vinit Sankhe

    Read the article

  • Why ComboBox hides cursor when DroppedDown is set?

    - by Ivan Danilov
    Let's create WinForms Application (I have Visual Studio 2008 running on Windows Vista, but it seems that described situation takes place almost everywhere from Win98 to Vista, on native or managed code). Write such code: using System; using System.Drawing; using System.Windows.Forms; namespace WindowsFormsApplication1 { public class Form1 : Form { private readonly Button button1 = new Button(); private readonly ComboBox comboBox1 = new ComboBox(); private readonly TextBox textBox1 = new TextBox(); public Form1() { SuspendLayout(); textBox1.Location = new Point(21, 51); button1.Location = new Point(146, 49); button1.Text = "button1"; button1.Click += button1_Click; comboBox1.Items.AddRange(new[] {"1", "2", "3", "4", "5", "6"}); comboBox1.Location = new Point(21, 93); AcceptButton = button1; Controls.AddRange(new Control[] {textBox1, comboBox1, button1}); Text = "Form1"; ResumeLayout(false); PerformLayout(); } private void button1_Click(object sender, EventArgs e) { comboBox1.DroppedDown = true; } } } Then, run app. Place mouse cursor on the form and don't touch mouse anymore. Start to type something in TextBox - cursor will hide because of it. When you press Enter key - event throws and ComboBox will be dropped down. But now cursor won't appear even if you move it! And appears only when you click somewhere. There I've found discussion of this problem. But there's no good solution... Any thoughts? :)

    Read the article

  • Excel VBA Userform Combobox problem

    - by Marc
    I'm having difficulties with a Combobox in a userform in an Excel document. The combobox either doesn't appear in the userform, or the combobox remains blank, and when I enter any character in it, the list of items appears, but 2 or 3 times, instead of just once. When I select an item, the chosen item doesn't appear in the box. It seems as if Excel^picks one at random, and whichever item I choose from the list, it's always the same one that ends up being displayed in the box. Can anyone help me on this one? Thanks a lot!!! This is the code I used: Private Sub ComboBox1_Change() Select Case ComboBox1.Text Case "Een nieuwe start" Case "Alles heeft zijn tijd" Case "De wereld aan je voeten" Case "Een levend boek" Case "Drempels" Case "Kerstmis" Case "Confituur of choco" Case "Hoe groot is de hemel?" Case "Ongelovige Thomas" Case "Feesten" Case "Er is er één jarig!" Case "Eén van hart" Case "Ervoor gaan" Case "Groen gras" Case "RELatie" Case "Vele plaatjes" Case "Iedereen fan" Case "Schattenjacht" Case "Lichtbakens" Case "Rijke Luis" Case "Hemel op aarde" Case "Op bezoek" Case Else End Select End Sub Private Sub UserForm1_Initialize() ComboBox1.Clear ComboBox1.AddItem "Een nieuwe start" ComboBox1.AddItem "Alles heeft zijn tijd" ComboBox1.AddItem "De wereld aan je voeten" ComboBox1.AddItem "Een levend boek" ComboBox1.AddItem "Drempels" ComboBox1.AddItem "Kerstmis" ComboBox1.AddItem "Confituur of choco" ComboBox1.AddItem "Hoe groot is de hemel?" ComboBox1.AddItem "Ongelovige Thomas" ComboBox1.AddItem "Feesten" ComboBox1.AddItem "Er is er één jarig!" ComboBox1.AddItem "Eén van hart" ComboBox1.AddItem "Ervoor gaan" ComboBox1.AddItem "Groen gras" ComboBox1.AddItem "RELatie" ComboBox1.AddItem "Vele plaatjes" ComboBox1.AddItem "Iedereen fan" ComboBox1.AddItem "Schattenjacht" ComboBox1.AddItem "Lichtbakens" ComboBox1.AddItem "Rijke Luis" ComboBox1.AddItem "Hemel op aarde" ComboBox1.AddItem "Op bezoek" ComboBox1.Text = ComboBox1.List(0) End Sub

    Read the article

  • combobox dropdown problem when load AS2 swf file in Flex

    - by him_aeng
    I found the problem about combobox dropdown list in AS2 swf file. My scenario is: There are multiple swf file that was compile from ActionScript2.0 and use Flex to load those swf files in swfLoader component. There are two issue that I found and can't solve it: 1. When I load multiple as2.0 swf file in one flex application the first file that was load will work perfectly but the second and so on file have problem. When I click in their combobox component the dropdown list was not show. 2. swf file that was not first load have problem with popup window also. When the popup was show they can't work properly, I can't make any operation on it such as click button, close popup etc. I solve it by add the empty content AS2.0 swf file in flex to be first swf file that was load and it make something weird happen: When I click button on combobox the dropdown list was appear but it appear on position (x:0, y:0) of its container. I also add the code: this._lockroot = true; in every ActionScript2.0 code but it not solve the problem. I don't know the source of problem. Please help me. Thank.

    Read the article

  • WPF: ComboBox SelectedIndex = -1 ??

    - by msfanboy
    Hello, I am using a MVVM Wizard with several pages. When I set a value in the combobox and go to the next page and switch back I want to reset the value I set before. But all whats happening is that the combobox is empty at top and the index is -1 ? What do I wrong? <ComboBox ItemsSource="{Binding Path=LessonNumbers}" SelectedIndex="{Binding SelectedLessonNumber}" /> private ReadOnlyCollection<int> _lessonNumbers; public ReadOnlyCollection<int> LessonNumbers { get { if (_lessonNumbers == null) this.CreateLessonNumbers(); return _lessonNumbers; } } private void CreateLessonNumbers() { var list = new List<int>(); for (int i = 1; i < 24; i++) { list.Add(i); } _lessonNumbers = new ReadOnlyCollection<int>(list); } private int _selectedLessonNumber; public int SelectedLessonNumber { get { return _selectedLessonNumber; } set { if (_selectedLessonNumber == value) return; _selectedLessonNumber = value; this.OnPropertyChanged("SelectedLessonNumber"); } }

    Read the article

  • How to get the value of a ComboBox within a DataGrid

    - by Jason Towne
    While this may be a simple problem, I'm having a heck of a time coming up with a solution. I have a DataGrid with a ComboBox as an ItemRenderer for one of my columns. When the user selects a row, I want to get the ComboBox's selected value for the selected row. Any suggestions? Some sample code: <mx:DataGrid id="myGrid" dataProvider="{myData}"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="dataField1" /> <mx:DataGridColumn headerText="Column 2" dataField="dataField2_Array"> <mx:itemRenderer> <mx:Component> <mx:HBox paddingLeft="5"> <mx:ComboBox id="myComboBox" dataProvider="{data.dataField2_Array}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

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