Hi Team,
We are facing a issue in smartGWT grid. When we tab on grid records, it maintain proper sequence in a row but when it switch from one row to another , tabbing goes to last cell of next row. It is not happening always but sometimes. We tried setting tabindex , and also set property : prepsGrid.setRowEndEditAction(RowEndEditAction.NEXT);
Sample code :
private ListGrid createPrepsGrid(int brandId) {
prepsGrid = new ListGrid();
prepsGrid.setCanEdit(true);
prepsGrid.setSelectionType(SelectionStyle.SINGLE);
prepsGrid.setSelectionAppearance(SelectionAppearance.ROW_STYLE);
prepsGrid.setShowFilterEditor(false);
prepsGrid.setRowEndEditAction(RowEndEditAction.NEXT);
prepsGrid.setShowHeader(true);
prepsGrid.setID(test);
prepsGrid.setRowEndEditAction(RowEndEditAction.NEXT);
prepsGrid.setDataSource(testds)
prepsGrid.setFields(getProjectListGridFields(prepsGrid.getDataSource(), prepsGrid));
return prepsGrid;
}
public static ListGridField[] getProjectListGridFields(DataSource dataSource, ListGrid listGrid) {
listGrid.setDataSource(dataSource);
final List<ListGridField> listGridFields = new ArrayList<>();
if (dataSource != null) {
for (final DataSourceField dsField : dataSource.getFields()) {
listGridFields.add(getValuePickerListGridField(dsField));
}
}
return listGridFields.toArray(new ListGridField[0]);
}
public static ListGridField getValuePickerListGridField(final DataSourceField dsField) {
return getListGridField(dsField.getName(), dsField.getTitle(), dsField.getHidden(), dsField.getCanEdit());
}
private static ListGridField getListGridField(final String name, final String title, final Boolean hidden, final Boolean canEdit) {
final ListGridField listGridField = new ListGridField(name, title);
listGridField.setHidden(hidden);
listGridField.setCanEdit(canEdit);
}
TestDs :
<DataSource ID="TestDs" schemaBean="TESTDTO">
<fields>
<field name="feild1" align="center" primaryKey="true" hidden="true"/>
<field name="feild2" align="center" hidden="true"/>
<field name="feild13" align="center" required="true" baseStyle="hdwprepfield " width="10%" />
<field name="feild14" align="center" width="10%" title="Deadlock"/>
<field name="feild15" align="center" baseStyle="hdwprepfield " width="11%" title="Code" />
</fields>
Kindly Let us know if you are able to reproduce this issue. Or kindly suggest the alternate tabbing approch to resolve theissue. Thanks in advance.
We are facing a issue in smartGWT grid. When we tab on grid records, it maintain proper sequence in a row but when it switch from one row to another , tabbing goes to last cell of next row. It is not happening always but sometimes. We tried setting tabindex , and also set property : prepsGrid.setRowEndEditAction(RowEndEditAction.NEXT);
Sample code :
private ListGrid createPrepsGrid(int brandId) {
prepsGrid = new ListGrid();
prepsGrid.setCanEdit(true);
prepsGrid.setSelectionType(SelectionStyle.SINGLE);
prepsGrid.setSelectionAppearance(SelectionAppearance.ROW_STYLE);
prepsGrid.setShowFilterEditor(false);
prepsGrid.setRowEndEditAction(RowEndEditAction.NEXT);
prepsGrid.setShowHeader(true);
prepsGrid.setID(test);
prepsGrid.setRowEndEditAction(RowEndEditAction.NEXT);
prepsGrid.setDataSource(testds)
prepsGrid.setFields(getProjectListGridFields(prepsGrid.getDataSource(), prepsGrid));
return prepsGrid;
}
public static ListGridField[] getProjectListGridFields(DataSource dataSource, ListGrid listGrid) {
listGrid.setDataSource(dataSource);
final List<ListGridField> listGridFields = new ArrayList<>();
if (dataSource != null) {
for (final DataSourceField dsField : dataSource.getFields()) {
listGridFields.add(getValuePickerListGridField(dsField));
}
}
return listGridFields.toArray(new ListGridField[0]);
}
public static ListGridField getValuePickerListGridField(final DataSourceField dsField) {
return getListGridField(dsField.getName(), dsField.getTitle(), dsField.getHidden(), dsField.getCanEdit());
}
private static ListGridField getListGridField(final String name, final String title, final Boolean hidden, final Boolean canEdit) {
final ListGridField listGridField = new ListGridField(name, title);
listGridField.setHidden(hidden);
listGridField.setCanEdit(canEdit);
}
TestDs :
<DataSource ID="TestDs" schemaBean="TESTDTO">
<fields>
<field name="feild1" align="center" primaryKey="true" hidden="true"/>
<field name="feild2" align="center" hidden="true"/>
<field name="feild13" align="center" required="true" baseStyle="hdwprepfield " width="10%" />
<field name="feild14" align="center" width="10%" title="Deadlock"/>
<field name="feild15" align="center" baseStyle="hdwprepfield " width="11%" title="Code" />
</fields>
Kindly Let us know if you are able to reproduce this issue. Or kindly suggest the alternate tabbing approch to resolve theissue. Thanks in advance.
Comment