Hello,
I have a webDataGrid only with one column and a DropDownProvider to add and edit row. To add a row, I select one value from dropdown, press enter and the new row is added. But I have a problem in mobile browsers (tablet or smartphone), because I don’t have the soft keyboard and when I select a value from dropdown I don't know how to do to add the value to a new row in the grid.
There is an option to add automatically a row when a value is chosen from the dropdown?
Thanks for your help.
Thank you for contacting Infragistics!
You can handle the client side dropdown closed event and in that call _commitRow off the row adding behavior:
http://ko.infragistics.com/community/forums/t/71123.aspx
Hello,Thanks for your help. I’ve tried handle the client side dropdown closed event and in then call _commitRow as you said:
In the grid:
<ig:DropDownProvider ID ="ComboMaquinaria"> <EditorControl DropDownContainerMaxHeight="200px" Width ="300px" EnableAnimations="False" EnableDropDownAsChild="False" ClientIDMode="Predictable" DisplayMode="DropDownList" > <ClientEvents DropDownClosed ="fAddRow" /> </EditorControl> </ig:DropDownProvider>
And the function:
function fAddRow (sender, eventArgs) { var grid = $find("<%= wdgMaquinaria.ClientID %>"); grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._commitRow() }
But after close dropdown, the new row is empty and insert a blank row.
I fix this handle ExitedEditMode event:
<ig:RowAdding AddNewRowCssClass ="CustomNewRow"> <EditModeActions MouseClick="Single" /> <ColumnSettings> <ig:RowAddingColumnSetting ColumnKey ="MAQUINARIA" EditorID="ComboMaquinaria" /> </ColumnSettings> <AddNewRowClientEvents ExitedEditMode =" fAddRow " /></ig:RowAdding>
But it's uncomfortable for user's select one element in the dropdown and click in other element to fire the event, select another value, click outside...
Can I force fire the ExitedEditMode event in dropdown closed event for example? Or another solution to fix this problem?
Thanks