We have checked Sample Code provided by you (Infragistics team )does not mention about any specific control for multicolumn combo,
http://es.infragistics.com/community/forums/t/75163.aspx
a) Is there any specific control for Multi Column Combo instead of template use?
b) We are trying to use the solution provided by Infragistics team but we are facing some problems
1. updating the selected value from the combo to multiple column of grid.
Ex. Material No and Material Name display in drop down combo.
When We select Material No then corresponding Material name should be assign to another column of Grid.
Ex. select Material No -"00000001" then "GMCSMATERIAL" should be assign in Next column. (see the attached file for your reference)
2. When a records is selected(click) on dropdown value in multi combo then combo should be fade out(invisible).
3. How can we use function key to open drop combo inside grid.
Ex. If I press F1 then Combo will visible to user.
Hello Vivek,
Thank you for the update. Setting EnableCustomValues and EnableCustomValueSelection to false does not prevent the user from typing to select an item. All it does it prevent the user from typing a value that isn’t in the WebDropDown.
Can you please explain your point b further? What are you trying to achieve with this?
Hello,
Thank you for your quick response.
We have used infragistic control for Client Server Application. Result is good.
Now, We are planning to migrate our current running application into the web using webdatagrid & webdropdown.
Currently we are making sample to take decision to use infragistics or use other grid?
below points are minimum requirement to take decision.
a. Multicolumn combo with manual input (It is done using EnableCustomValues=true & EnableCustomValueSelection=true, else user can not enter using keyboard)
b. the input values existence check in multicolumn combo(template dropdown using Grid).
Kindly support us.
Regards,
Vivek
Thank you for the update. Concerning preventing custom values and custom value selection you can set the EnableCustomValues and EnableCustomValueSelection properties to false. Then you won’t have to check if the user is selecting or entering them.
Concerning the dropdown closing on selection this behavior happens automatically unless you have EnableClosingDropDownOnSelect set to false. And as I mentioned previously you can exit edit mode using the above code.
With selecting a value an updating another cell as I mentioned previously you will have to do this manually as this is not a behavior built into the DropDown or grid. You can do so by handing the ValueChanged event of the DropDownProvider then have the following code:
var string = sender.get_selectedItem().get_element().innerText; var values = string.split(sender.get_selectedItem().get_text()); var grid = $find("<%=WebDataGrid1.ClientID %>"); var row = grid.get_behaviors().get_activation().get_activeCell().get_row(); row.get_cellByColumnKey("Name").set_value(values[1], values[1], true);
var string = sender.get_selectedItem().get_element().innerText;
var values = string.split(sender.get_selectedItem().get_text());
var grid = $find("<%=WebDataGrid1.ClientID %>");
var row = grid.get_behaviors().get_activation().get_activeCell().get_row();
row.get_cellByColumnKey("Name").set_value(values[1], values[1], true);
Note you will want to have activation enabled for this behavior to get the active cell and its row.
Please let me know if you have any further questions concerning this matter.
Thank you for contacting Infragistics!
Concerning having a multi-column dropdown the way to achieve this with the Infragistics controls is through a template in the WebDropDown. In the template you can have as the documentation describes have a WebDataGrid in the template or you can create an html table.
With updating the selected value, selecting a value in the dropdown is only expected to update the value of the column that dropdown is in. If you want to update another column based on that selection you will want to do it manually.
For this I recommend you use the CellValueChanged event of the EditingCore behavior:
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.Web.v14.2~Infragistics.Web.UI.GridControls.EditingClientEvents_members.html
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.Web.v14.2~Infragistics.Web.UI.GridControls.EditingClientEvents~CellValueChanged.html
Doing so you can get access to the other cell and set its value:
function CellValueChangedEvt(sender, args) { var value = args.getCell().get_value(); args.getCell().get_row().get_cellByColumnKey("ColumnKey").set_value(newValue); }
function CellValueChangedEvt(sender, args) {
var value = args.getCell().get_value();
args.getCell().get_row().get_cellByColumnKey("ColumnKey").set_value(newValue);
}
To exit edit mode on close of the dropdown you can handle the DropDownClosed client side event of the dropdown and force the cellEditing behavior to exit edit mode:
function DropDownClosedEvt(sender, args) { var grid = $find("<%=webdatagrid1.clientid%>"); grid.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().exitEditMode(true, true); }
function DropDownClosedEvt(sender, args) {
var grid = $find("<%=webdatagrid1.clientid%>");
grid.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().exitEditMode(true, true);
If you want to enter edit mode on press of a function key you can use the edit mode actions of the CellEditing behavior and set “EnableF2” to true:
<ig:CellEditing> <EditModeActions EnableF2="true" /> </ig:CellEditing>
<ig:CellEditing>
<EditModeActions EnableF2="true" />
</ig:CellEditing>