I need to use rowIndexVar at every loop of dataGrid. Unforutunately, it does not work when I use on p:dataGrid. It always shows up " 0 " even i have 16 elements in my dataGrid. It works sucessfully on p:dataTable however it always shows up 0 on dataGrid. You can find the simpleCode below. Any assistance will be appreciated.