GRID Column Header replace caption

I’m trying to replace the grid’s column header by doing this

List<Transaction> payment = dbo.getTrannsactions(storeno,orderno);
grid.getColumn("Order_No").setCaption("Order No");

but when it steps on the code it does nothing and with an error like below


Can you help me on this?

You are doing things probably in wrong order and thus grid.getColumn(…) returns null and you get exception. Also normally property should not be named like “Order_No”.

can you give me a good example on this and how will i approach this issue?

You could check demo applications of selected Grid add-ons like


(There are Vaadin 7 versions too if you need those)