Hello,
I have a Listgrid, showing 9 columns, and about 80 rows. It loads the data on-demand, which is fine. But in IE, it gives me the
'warning the script is slow, do you want to stop it?' (or at least the dutch version, so not keen on the exact english text)
Is there a way to NOT trigger this warning? I do have some rendering calculations, here is how I initialize my Listgrid. It basically renders some facebook/twitter buttons and it makes the background of the cell have the same colour as chosen with the color picker (instead of the #AEAEAE color code):
Also here are my other initializations:
I have a Listgrid, showing 9 columns, and about 80 rows. It loads the data on-demand, which is fine. But in IE, it gives me the
'warning the script is slow, do you want to stop it?' (or at least the dutch version, so not keen on the exact english text)
Is there a way to NOT trigger this warning? I do have some rendering calculations, here is how I initialize my Listgrid. It basically renders some facebook/twitter buttons and it makes the background of the cell have the same colour as chosen with the color picker (instead of the #AEAEAE color code):
Code:
final ListGrid grid = new ListGrid() { @Override protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) { final String fieldName = this.getFieldName(colNum); FlavourModelMessages messages = (FlavourModelMessages) GWT .create(FlavourModelMessages.class); return null; if (false) { return null; } else if (fieldName.equals("Colour")) { Label l = new Label(); String code = record.getAttribute("Colour"); l.setTitle(code); l.setHeight(22); l.setWidth(130); l.setBackgroundColor(code); return l; } else if (fieldName.equals("Twitter")) { HLayout canv = new HLayout(); canv.setHeight(22); ImgButton tweetButton = new ImgButton(); tweetButton.setShowDown(false); tweetButton.setShowRollOver(false); tweetButton.setAlign(Alignment.CENTER); tweetButton.setSrc(GWT.getHostPageBaseURL() + "images/twitter-icon.png"); tweetButton.setPrompt("Deel dit op Twitter."); tweetButton.setPrompt(messages.Twitter_prompt()); tweetButton.setHeight(20); tweetButton.setWidth(20); tweetButton.setMargin(1); tweetButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { FlavourTwitterTweetWindow l = new FlavourTwitterTweetWindow( record, fieldName); l.show(); l.bringToFront(); } }); canv.addMember(tweetButton); return canv; } else if (fieldName.equals("Facebook")) { HLayout canv = new HLayout(); canv.setHeight(22); ImgButton tweetButton = new ImgButton(); tweetButton.setShowDown(false); tweetButton.setShowRollOver(false); tweetButton.setAlign(Alignment.CENTER); tweetButton.setSrc(GWT.getHostPageBaseURL() + "images/facebook-icon.png"); tweetButton.setPrompt(messages.Facebook_prompt()); tweetButton.setHeight(20); tweetButton.setWidth(20); tweetButton.setMargin(1); tweetButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { FlavourFacebookFacebookWindow l = new FlavourFacebookFacebookWindow( record, fieldName); l.show(); l.bringToFront(); } }); canv.addMember(tweetButton); return canv; } else if (fieldName.equals("Hyves")) { HLayout canv = new HLayout(); canv.setHeight(22); ImgButton tweetButton = new ImgButton(); tweetButton.setShowDown(false); tweetButton.setShowRollOver(false); tweetButton.setAlign(Alignment.CENTER); tweetButton.setSrc(GWT.getHostPageBaseURL() + "images/hyves-icon.png"); tweetButton.setPrompt(messages.Hyves_prompt()); tweetButton.setHeight(20); tweetButton.setWidth(20); tweetButton.setMargin(1); tweetButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { FlavourHyvesHyvesWindow l = new FlavourHyvesHyvesWindow( record, fieldName); l.show(); l.bringToFront(); } }); canv.addMember(tweetButton); return canv; } else { return null; } } };
Code:
grid.setWidth100(); grid.setHeight100(); grid.setAlternateRecordStyles(true); grid.setCellHeight(22); grid.setDataSource(dataSource); grid.setAutoFetchData(false); grid.setCanEdit(true); grid.setModalEditing(true); grid.setShowFilterEditor(true); grid.setDoubleClickDelay(100); grid.setEditEvent(ListGridEditEvent.DOUBLECLICK); grid.setListEndEditAction(RowEndEditAction.NEXT); grid.setCanRemoveRecords(true); grid.setAutoSaveEdits(true); grid.setShowRecordComponents(true); grid.setShowRecordComponentsByCell(true); grid.setRecordComponentHeight(22); grid.setDrawAheadRatio(2);
Comment