Hi folks,
I have a WebGrid set up with a WebCombo as a cell editor so that a user can select a value from the drop down to populate the cell value. I have type ahead set up on the WC and it has been working well.
If you try and type a value that is not in the drop down list, when you click out of the cell it simply blanks the value. Is it possible to modify the WG/WC behaviour to allow a value to be selected from the drop down and also allow a user to type in a value.
I realise what i'm askin kind of goes against having the drop down in the first place but if this can be done it would be very helpful.
I appreciate any help.
Thanks.Jonny
I have read both the rteplies and I am not sure they are talking about the same thing.
If I understand you correctly, you have a combo box with a fixed list of values that you want to use as "Defaults" but not the universe of possible entries. You want to be able to add addtional list items "on the fly" to the available values in the combo box list.
I agree with Helen that this is not a feature design, that said:
I am not sure that you can trasp this in an event I would have to play with it. You may be to catch this on an event before it dumps the value typed into the display. You could then check the selected index which I assue would indicate that no item in the list was selected since what was typed in didn't match, if this is the case you could check the value in the combo box (assuming it is still there), and if its not empty add it to the data that created the inital list and rebind the data and set the selected index to that item.
Now remember that this all hinges on the ability to catch this in an event before it clears the editable combo box...
Cheers.... have fun testin this one.
Hope this helps..... let us know.
Hi folks, I appreciate your input.
I'm getting a little bit confused, whose correct in this case - Helen says it cant be done, Devin seems to think so?
Devin:The datavalues and display values are both the same in my WebCombo.To follow through with your example, currently if I have a WebCombo with Red/Green/Blue as items then if I try to type Black, when I click out of the cell the value dissapears. How can the behaviour you describe in your post be accomplished? Is it through use of client side events?
I have since set up a basic testing page following this example (as I did with my original page):http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=3501but am still seeing the same behaviour.
I should maybe point out that I am using Infragistics 2006 Volume 3 CLR2.0 just in case any of the behviours you describe is new functionality.
Thanks for your help.Jonny
Jonny:
When the user enters a value into the cell, you would you expect that to be handled by the grid? Are you using different display values and data values in the WebCombo?
For example, a pretty common scenario is to have a grid column that is a numeric data type, for example a number that represents a color. The column may have a webcombo embedded in it that contains lookup values to make it easier for a user to select the correct value ("Red", "Green" or "Blue"). In this scenario should the cell only allow the end user to enter numeric values since that it its underlying data type, or should it accept "Black" as the value, and if so how does that get converted to the numeric value required by the column?
Devin
This may not help you at all, but I have the opposite problem of you in that if I type something in the cell I can't get it to validate against the webcombo set as the editor control of the cell even though the webcombo is set to limit to list and I even have a "Itemnotinlist" event. Anyway, while searching around for a solution to my problem I saw "InvalidValueBehavior" property associated with a column. I noted that the selections were things like "Retain Value and Focus", "Retain Value" etc... made me think of your post so I thought I'd pass it along in case it did the trick. Good luck.