We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

More combobox related questions

Thread ID:

Created:

Updated:

Platform:

Replies:

24318 Feb 1,2005 12:52 PM UTC Feb 2,2005 07:19 PM UTC WinForms 4
loading
Tags: GridControl
Jim Frapper
Asked On February 1, 2005 12:52 PM UTC

Hey Clay, This post is a continuation of our discussion in this post: http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=23449 I have implemented your suggested solution involving using a datatable as the datasource and filtering the data for the combobox with a dataview. During the testing cycle, it seems my testers were able to "break" this solution. Filtering the second combobox in with the CurrentCellShowingDropDown event works great the user is clicking on the combobox column. But during testing the user were navigating between columns with the keyboard and trying to select the data in the combo by using the keyboard. This last part is my problem, by typing to select a value in the combo they are getting the data for the entire list and not the filtered set that I would like them to get. For reference, here is my event handler: private void gridData_CurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs e) { GridCurrentCell cc = this.gridData.CurrentCell; if (cc.ColIndex == 4) { int categoryID = Convert.ToInt32(this.gridData[cc.RowIndex, 3].Text); DataView dv = new DataView(this.items); dv.RowFilter = "PracticalCategoryID = " + categoryID; GridComboBoxCellRenderer render = (GridComboBoxCellRenderer)cc.Renderer; GridComboBoxListBoxPart part = (GridComboBoxListBoxPart)render.ListBoxPart; part.DataSource = dv; } } Cheers, JF

Administrator [Syncfusion]
Replied On February 2, 2005 10:48 AM UTC

Hi Jim, Clay is on vacation until next week. I am not 100% familiar with the other post but here are some general pointers: Try moving the code from CurrentCellShowingDropDown to CurrentCellActivated event. CurrentCellShowingDropDown is only called when you dropdown the list. CurrentCellActivated on the othise is called after the current cell was moved and before the user presses a key. If CurrentCellActivated is too early for you you could also try CurrentCellKeyPress. Stefan

Jim Frapper
Replied On February 2, 2005 01:10 PM UTC

Hey Stefan, Thanks for letting me know Clay is on vacation. Well the functional requirements for what I am asking for is the first post in : http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=23449 A recap of the functional requirements are: Basically I have two combo box columns in a databound grid. When you select a value in column one, I need column two to be dynmaically populated or filtered based on the value from column one. Clay''s previous suggestion was to populate column two with all possible values. Then, when the user selects the combo column two, dynamically filter this column in the CurrentCellShowingDropDown event. This works when the user clicks on the column but doesn''t when the user is on the cell and types a value(the user will get the whole list) Please let me know if you need any more info. Cheers, JF

Administrator [Syncfusion]
Replied On February 2, 2005 01:57 PM UTC

Jim, CurrentCellActivated should be what you look for. Just move the code for populating the list from CurrentCellShowingDropDown to CurrentCellActivated. Stefan

Jim Frapper
Replied On February 2, 2005 07:19 PM UTC

Stefan, Your suggestion worked great... JF

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;