function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Salesforce 283Salesforce 283 

How to delete row from pageblocktable

Hi Guys,
I used same functionality in another page its working fine. But i am using in another page its throwing an error msg when click on Del row button. Please help me out this problem very urgent. 

Apex Class:
 public void delrow(){
        deletestudentslist = new List<students>();
        Indexnum = Integer.valueof(ApexPages.currentPage().getParameters().get('index'));
        del = stdlist.remove(Indexnum);

VF Page: 
<apex:commandlink value="Delete Row" action="{!delrow}" rerender="d">
      <apex:param value="{!rownum}" name="index" />
User-added image
Raja Bipin Chandra  M BRaja Bipin Chandra M B

I suggest debug the value of {!rownum} .Hope it is not sending NULL.

Kind Regards,
Salesforce 283Salesforce 283

Hi Chandra,
Yes..its always passing 0 value. Param is not passsing index values.
Why it is not passing?

Raja Bipin Chandra  M BRaja Bipin Chandra M B
I dont know what logic you are using to capture rownum. I believe, it is instantiated with '0' but not incrementing and the same value being passed. Debug the rownum value before passing.

Kind Regards,