zindex change breaks ListGrid

Can anyone suggest a solution to this problem?

I’m using a ListGrid with some very simple configuration - copy and paste the showcase example for Grids->Edit would reproduce the issue.

I add one line during instantiation of the ListGrid as follows, this works around some issues with using SmartGWT tables with plain GWT popups.

listGrid.setZIndex(0);

Click events on rows in the list grid no longer cause that row to go into edit mode as it should do.

I’m looking for solutions which either avoid the need to change the zindex in the first place or ways to change it correctly for the whole ListGrid (I’m assuming the layer with the click handler has dropped behind something else).

Thanks,
Matt.

You’re talking about issues with other GWT widgets so it doesn’t seem like a copy and paste of a SmartGWT-only sample would reproduce this, right? Try posting more details.

Apologies, yes I was a little vague.

countryGrid.setZIndex(0);
DialogBox dialogBox = new DialogBox();
dialogBox.setWidget(countryGrid);
dialogBox.center();

where countryGrid comes from the showcase example here: http://www.smartclient.com/smartgwt/showcase/#grid_editing_cell

Should demonstrate the problem, i.e. clicking a row doesn’t enable edit.

Search the forums for various statements on what level of interoperability can be expected with native GWT widgets - this is not a recommended usage and it’s very easy to put the Grid inside of a SmartGWT Window instead.

I also had this issue. To fix it i just added the z-index in the .css file:

 reportsGrid.addStyleName("reportsGrid");
 .reportsGrid {
	z-index: 0;
}

The gwt widget I was having troubles with was the suggest box popup being hidden by the listgrid so I boosted the z-index of that:

 .gwt-SuggestBoxPopup {
  z-index: 900000;
}

Hope this helps.

Thanks Chrisem, I’ll try that next time. Unfortunately on this occasion this was a blocker so we backed-out SmartGWT and wrote our own table. Hopefully we’ll get a chance to give it another go.

Hello,

i am using version 2.2 and when i set the ListGrid Zindex,
the options in listbox field doesn’t show but i can still choose from them using keyboard arrows.

Regards

i did manage to edit grid by setting z-index dynamically

(for given EditableGrid.java)

		this.addRowEditorEnterHandler(new RowEditorEnterHandler() {
			public void onRowEditorEnter(RowEditorEnterEvent event) {
				EditableGrid.this.setZIndex(800001);
			}
		});
		this.addRowEditorExitHandler(new RowEditorExitHandler() {
			public void onRowEditorExit(RowEditorExitEvent event) {
				EditableGrid.this.setZIndex(1);
			}
		});

hope this helps