---
title: "Sencha Touch 2.0 — How can I hide my list item?"  
description: "Sencha Touch 2.0 — How can I hide my list item?"  
author: "Anonymous User"  
published: 2013-05-31  
updated: 2013-06-01  
canonical: https://www.mindstick.com/forum/955/sencha-touch-2-0-how-can-i-hide-my-list-item  
category: "sencha touch"  
tags: ["sencha touch"]  
reading_time: 1 minute  

---

# Sencha Touch 2.0 — How can I hide my list item?

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances)! \
Given a list and a segmentedButton in my [panel](https://www.mindstick.com/blog/11988/restructuring-corporate-offenses-government-appointed-panel-suggests-in-house-adjudication-system)'s [items](https://www.mindstick.com/forum/33812/getting-number-of-items-selected-in-uicollectionview-in-ios):[{ xtype:'segmentedbutton', id:'segmented-btn', items: [{ ui:'[action](https://www.mindstick.com/forum/155752/what-is-action-result-with-its-types)', text: 'A', pressed: true },{ ui:'action', text: 'B', }]},{ xtype: 'list', id: '[toList](https://www.mindstick.com/forum/159876/what-is-the-difference-between-tolist-and-toarray-when-materializing-linq-queries)', scrollable: false, data: [], itemTpl: ['<div id="{[title](https://www.mindstick.com/articles/12860/how-to-get-financing-for-salvage-title-cars)}-item">{title}</div>']},{ xtype: 'list', id: 'fromList', ui: '[round](https://answers.mindstick.com/qa/45311/what-was-the-agenda-of-the-round-table-conference-1930-1932)', data: [], itemTpl: ['<div id="{title}-item">{title}</div>']}]\
When the segmented [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) A is pressed, the 'To' list item will be [hidden](https://www.mindstick.com/forum/2303/skip-validating-field-from-hidden-div) and when my segmented button B is pressed, the 'From' list item will be hidden and the 'To' list item will shown.\
Thanks in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)!

## Replies

### Reply by AVADHESH PATEL

Hi Hugh,\
Adding a listener function to the segmented button\
listeners: { toggle: function(container, button, pressed){ if(button.text == 'A'){ this.down('#fromList').show(); this.down('#toList').hide(); } else { this.down('#fromList').hide(); this.down('#toList').show(); } }}Should work if the handler function doesn't.\


---

Original Source: https://www.mindstick.com/forum/955/sencha-touch-2-0-how-can-i-hide-my-list-item

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
