Hi Harry,
Please find the response below,
TreeGrid Control:
Query1: 1. Is there autocomplete function in TreeGrid editing? For example, when adding new row or editing some field, when user starts typing in some field, it will show a list of suggestions to select from (similar to Google search, please see attached image1). Certainly, in this case, the list will come from database.
Solution: We have populated the Autocomplete with database data and included the autocomplete in one of the columns of ejTreeGrid with the help of columnTemplate. Please find the code example for details.
<script type="text/x-jsrender" id="customcolumn"> <input type="text" class="autocomplete" /> </script> @(Html.EJ().TreeGrid("TreeGridContainer"). //… .Columns(co => { co.Field("CustomColumn").HeaderText("Custom column").IsTemplateColumn(true).TemplateID("customcolumn").Add(); } ) .ClientSideEvents(eve=>{ eve.QueryCellInfo("querycellinfo"); }). )
@(Html.EJ().ScriptManager()) <script type="text/javascript"> var Data=@Html.Raw(Json.Encode(ViewBag.autodatasource)); function querycellinfo(args){ if(args.column.field=="CustomColumn"){ $(args.cellElement).find(".autocomplete").ejAutocomplete({ value:args.cellValue, dataSource:Data, close: function(arg) { args.data.item.CustomColumn=arg.value; var modifiedData=args.data.item; $.ajax({ type: "POST", url: "/TreeGrid/Update", //Update is Server side method data: modifiedData, dataType: "json" }); } }) } } </script> |
We were facing some issue while using AutoComplete inside TreeGrid Control, hence we have logged and fixed the issue regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Query2: 2. when adding a new row, when I finished typing part number, I'd like to display description automatically. Please see attached image2. Note that I can accomplish this by press "Update" button, but I wonder if this can be accomplished when I just type in part number.
Solution: Currently we didn’t have event support to fire while editing the column, we can achieve your requirement after the editing completed. Can you please share us your exact requirement? That will be helpful for us to provide you better solution.
Query3: 3. Can we force all the letters input to be upper case?
Solution: At present it is not possible to restrict the column editing with upper case. Hence we have logged feature report regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Query4: 4. I usually press "Add" button to add new row. I wonder if there is any shortcut key to add new row without using mouse.
Solution: At present there is no support for shortcut keys to the toolbar actions. Hence we have logged a feature report regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Grid Control:
We have created a sample based on your requirements. Please refer the attached sample,
Sample: http://www.syncfusion.com/downloads/support/forum/121169/ze/MVCGrid_121169-325881189
Please find the response in bellow table.
Query |
Response | |
1. Is there autoComplete function in grid editing? |
Yes, we can render the ejAutoComplete control inside the edit form instead of input box. By default we have the edit template property to render the custom editor in edit form. Please refer to the code example,
| |
2. When adding a new row, when I finished typing part number, I'd like to display description automatically |
We can achieve this requirement by using ejAutoComplete change event. In this event will trigger while we change any value in input element. Please refer to the code example and online help documentation for change event,
| |
3. Can we force all the letters input to be upper case? |
By using CSS “text-transform” property to input element we can change the letters to uppercase format. Please refer to the code example,
| |
4. I usually press "Add" button to add new row. I wonder if there is any shortcut key to add new row without using mouse |
By default we have the “insert” shortcut key to perform the add operation in grid. We need to focus the dom element(Alt + j) as grid then press “insert” key in keyboard, grid will perform the add operation instead of click the add toolbar items. |
Please let us know if you need further assistance on this, Regards, Mahalakshmi K.