I am using Infragistics v11.2. I have a WebHeirarchicalDataGrid with only displays 1 column with 10 hidden columns.
I want to add a row that will allow the user to add data to all of the hidden columns. This is my markup to the columns that I want to display:
<ig:RowAdding Alignment="Top" EditModeActions-EnableOnActive="true" > <EditModeActions EnableOnActive="true" /> <ColumnSettings> <ig:RowAddingColumnSetting ColumnKey="AddressPrefix" /> <ig:RowAddingColumnSetting ColumnKey="Address" /> <ig:RowAddingColumnSetting ColumnKey="AddressSuffix" /> <ig:RowAddingColumnSetting ColumnKey="City" /> <ig:RowAddingColumnSetting ColumnKey="CityMailing" /> <ig:RowAddingColumnSetting ColumnKey="State" /> <ig:RowAddingColumnSetting ColumnKey="Zip" /> <ig:RowAddingColumnSetting ColumnKey="CountyID" EditorID="County_DropDownProvider1" /> <ig:RowAddingColumnSetting ColumnKey="Lat" /> <ig:RowAddingColumnSetting ColumnKey="Long" /> </ColumnSettings> </ig:RowAdding>
None of these columns display when I activate the add row behavior. Only the visible column allows text to be added.
How can I have the user added a row to the hidden column fields?
Thanks.
Hi Gloria,
Thank you for posting in our forum.
When a column is hidden it is also hidden in the new row.
You can set default value for a hidden columns in the RowAddingColumnsSetting.
Also you can add a new row with programmatically where can set values for all fields. You can look at:
http://help.infragistics.com/doc/ASPNET/2015.1/CLR4.0/?page=WebDataGrid_Row_Adding.html
Please let me know if I can provide any further assistance.
I am trying to implement the client side javascript to add a row that will allow a user to insert a row that has hidden fields.
This is my BLOCKED SCRIPT
function addRow() { var grid = $find("wdgOffice"); var rows = grid.get_rows(); var rowsLength = grid.get_length(); // Create array of cell values for all values that cannot be null. var row = new Array("AddressPrefix", "Address", "AddressSuffix", "City", "CityMailing", "State", "Zip", "CountyID", "Lat", "Long"); // Add row. rows.add(row); var lastRow = rows.get_row(rowsLength); var cell = lastRow.get_cell(1); grid.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().enterEditMode(cell); }
This is the markup that calls the addRow function:
<ig:RowAdding Alignment="Bottom" AddNewRowClientEvents-Initialize="addRow" > <EditModeActions EnableOnActive="true" />
</ig:RowAdding>
When I run the code, only a blank page displays. Without the addRow function the grid displays correctly.
How do I call the javascript function to add a row to the grid?
Thanks for replying to my post.
I can't use default values because I have to allow the user to enter values into all of the hidden fields.
I will look into adding the row programmatically. Can I add a row programmatically to the top of the grid using the hidden fields to allow the user to enter values.
In addition, one of the fields will be a dropdown list. Is this allowed?
There is a field in the RowAddingColumnSetting that is 'EditorID'. Can I create edit fields and assign the ids to the add row?
Thanks,
Gloria