Results 1 to 3 of 3

Thread: How do I remove a row a Row from List?

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    25
    Answers
    1
    Vote Rating
    0
      0  

    Question How do I remove a row a Row from List?

    We have created a List using SenchaTouch
    Each row in a List have the Image of (Delete Icon). When a person clicks on the this icon(Image) the respective row of an image should get deleted.
    The main issues are
    1) : The (onclick : function) of an (Html: Image) is not working.
    2) : If this function workes also then there is a scope problem.

    var reviewUrOdrDetailList = Ext.create('Ext.dataview.List',{
    cls : 'transperantPanelCLs'
    ,width : '100%'
    ,scroll : 'none'
    ,id : 'myList'
    ,itemTpl : '<div class="restListDiv">'
    +'<table width ="100%">'
    +'<tr width = "100%" >'
    +'<td width="90%" >'
    +'<table width = "100%" height = "35">'
    +'<tr rowspan = 3>'
    +'<td>'
    +'<p class = "reviewUrOdrDetailName">{reviewUrOdrDetailName}</p>'
    +'</td>'
    +'</tr>'
    +'<tr >'
    +'<td>'
    +'<p class = "reviewUrOdrDetailPrice">{reviewUrOdrDetailPrice}</p>'
    +'</td>'
    +'</tr>'
    +'</table>'
    +'</td>'
    +'<td width="10%" >'
    +'<img src = "Images/Map/minus_red.png" width = "20px" height="20px" onclick="alert(\'Zia\');" >'
    +'</td>'
    +'</tr>'
    +'</table>'
    +'<div>'

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    To remove a row from a list you have to remove the record from the store.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    25
    Answers
    1
    Vote Rating
    0
      0  

    Default

    The issue is when a persion clicks on DELETE icon in each row of list. The respective row of the list should get deleted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •