I have a WebDataGrid that uses the DropDownProvider I want the user to be able to start typing and the have the matching item selected automatically. I have it working with a few issues. First, the user is able to delete part of the selected text, thus getting an invalid value that does not match an item in the list. Is there a way to prevent the user from doing this? Also, once the user opens the dropdown list, autocomplete no longer works. The user has to select the selected text or click off of the drop down column and then re-selected it. What I would like is for the selected text to remain highlighted when opening the drop down list.
Another issue is that when clicking on a column with a drop down in a new row "null" appears until the user selects a an item from the list. Is there a way to get it to default to the first item in the list for a new row?
Below is the code for the DropDownProvider:
<ig:DropDownProvider ID="ProjectProvider"> <EditorControl DataSourceID="dsProjects" DropDownContainerMaxHeight="300px" TextField="ProjectName" ValueField="ProjectID" ClientIDMode="Predictable" EnableAnimations="False" EnableDropDownAsChild="False" EnableCustomValues="False" EnableCustomValueSelection="False"> <DropDownItemBinding TextField="ProjectID" ValueField="ProjectID" /><DropDownItemBinding TextField="ProjectName" ValueField="ProjectID"></DropDownItemBinding> </EditorControl> </ig:DropDownProvider>
Hello jlueders,
Thank you for contacting Infragistics!We received your forum post concerning DropDownProvider issue in the WebDataGrid, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and I am looking into this matter and will get back to you by the end of the day Tuesday with more information or questions for you.
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
Thank you for your patience. I have done some looking into this matter and have been able to reproduce these behaviors. The first issue of the using being able to delete part of the value when EnableCustomValues is set to false has been resolved in a later service release. The service release I tested this with is the latest for v12.1 2048. The issue of having null appear in the cell after adding a new row can be resolved by setting the DefaultValueAsString in the RowAdding behavior for the proper column. I am attaching a sample that demonstrates both of these behaviors.
I have been able to see the third behavior of the text in the textbox of the dropdown become unselected when opening the container of the dropdown. I believe this may be the expected behavior. I am currently looking further into this matter and will give you a progress update by the end of the day Friday.
Mike,
Thanks, v12.1 2048 did solve the issue with deleting part of the value and setting DefaultValueAsString does what I need. 2 down, 1 to go.
Jeff
Hello Jeff,
Thank you for your patience. I have done some further looking into this matter. I recommend you see the following forum thread it discusses how you can use the client side events of the dropdown provider to select the text in the input box of the dropdown.
http://ko.infragistics.com/community/forums/p/60740/309684.aspx#309684
As you are using the dropdown provider inside the WebDataGrid instead of just the WebDropDown I recommend you use the DropDownOpened event to select the text instead of focus. Please see the following documentation.
http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=Infragistics4.Web.v12.1~Infragistics.Web.UI.ListControls.DropDownClientEvents~DropDownOpened.html
Please let me know if you have any questions concerning this matter.
Hi Mike and Jeff,
Just wanted to say this helped me too.
Thanks,
Luke
Thanks, that worked great!
Thank you for your patience. I have modified the sample to demonstrate how you can achieve this behavior using the DropDownOpened event and the code mentioned in the forum thread.
Thank you for the update. It seems the DropDownOpened event is too soon for the text to be selected. I am currently working on creating a sample to demonstrate this behavior. I will continue working on this and will give you a progress update by the end of the day Friday.
I have tried the methods from the links you provided, but it still does not work. The event does get fired, but the text is still not selected.