HI Team,
I have been able to achieve setting up multiple columns in web dropdown. Now the issue is how to get autofilter and autocomplete for a specific column in dropdown? If at all custom filtering needs to be done, I wish to do it at Client (javascript), not at server.
Please help.
Gentle reminder!!
Thanks,
Pushkar
Hello,
Thank you for posting in the forum!
What is the template used for the mulicolumn WebDropDown? Is it a WebDataGrid or a Table? For reference: http://www.infragistics.com/samples/aspnet/drop-down/templates
I have used Webdatagrid within template of drop down provider. 2 columns are there. I need to do autocomplete and filtering on 2nd column. That too on client, not server. Kindly help at the earliest!!
Team,
Pls respond.
Hello Priya,
I have investigated the possibilities regarding the use of autocomplete and auto filtering in a multicolumn WebDropDown when using Templated WebDataGrid.
Regarding AutoFiltering - it is done on the TextField column so there is no such inbuilt functionality to filter on the client side when using multicolumn WDD. In general, when implementing WDG as Item Template for the WDD, the WDD does not have items with text/value pairs to be used for AutoFiltering. However it is possible to implement custom filtering by implementing a server-side event handler for the ItemsRequested. For example, using EnableAutoFiltering="Server" and handling WebDropDown_ItemsRequested to apply the custom filtering logic.
I am attaching a sample illustrating this approach. Currently the filtering is performed on the first WDG column “ShipName”. It is possible to choose a particular column to filter upon like setting a ColumnKey for the filter:
filter.ColumnKey = dataFields[i];
If you would like to filter on all of the columns simultaneously, please refer to the code sample and the inline comments.
Additionally, there is more logic applied to enhance the user experience as handling KeyDown and GridKeyDown functions. These will allow the keyboard arrows to be used as navigation trough the multicolumn drop down.I hope this approach will be appropriate for your project.
Templating - Auto complete and filtering can be performed on the WebDropDown even when template is applied. Using the template feature, you can also define a custom control to be in the drop-down container.
In general,Note: The autocomplete feature works only when the WebDropDown control's DisplayMode property is set to DropDown. EnableAutoCompleteFirstMatch Property
Additional:Multiple columns in WebDropDownWebDropDown filter with Unicode - WebDropDown multiple columns
This does not solve the issue. I want at client side not at server, it slows down the performance.
I want to let you know WebDataGrid does not have a pure client side filtering. Being an ASP.NET AJAX control the WDG relies on the server for the filtering and re-rendering the control with the filtered results. Using it as a Template to achieve multicolumn WebDropDown could not extend its functionality. What I could suggest as alternative is handling ServerSide ItemsRequested and implement custom filtering logic.