Table not sorting on a normal addItem

hey guys,

First I am making a table using simple 3 properties like the following:

srchTable.addContainerProperty("Patient ID", Long.class, null);
srchTable.addContainerProperty("First Name", String.class, null);
srchTable.addContainerProperty("Last Name", String.class, null);

and then I am adding the items in it using simple addItem method like the following:

srchTable.addItem(new Object[]{
	1, "Mark", "Twain"
}, 1);

srchTable.addItem(new Object[]{
	2, "Albert", "Einstien"
}, 2);

srchTable.addItem(new Object[]{
	3, "John", "Doe"
}, 3);

now if i use the table.setSortContainerPropertyId(“Last Name”), it should show me the table with last name sorted, but its showing the way i entered it.

anybody correct me if I’m wrong somewhere.