If I understand your problem correctly you want to do master and detail grids. When you select an item in a master table (by means of a mouse click) you want to repopulate the details(history) table and make a selection on programmaticaly, right?
I would say you first need to override onItemSelection changed to intercept selection events on your master table: @Override public void onItemSelectionChanged(IModel item, boolean newValue) { super.onItemSelectionChanged(item, newValue); if (newValue) { //selection has changed on the master table //so you have to update //the history table's datasource object updateHistoryTableDatasource(item);//you implementation goes here //mark all items in a detail table for update historyTable.markAllItemsDirty(); //refresh detail table historyTable.update(); } } And for selection of a newest item in a history I would suggest that you sort history by date that the newest item comes first and then simply select the first item in the historyTable. cheers Marcin -- View this message in context: http://www.nabble.com/How-do-I-set-a-selected-item-outside-of-an-inmethod-datagrid--tp24565364p24595335.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org