# TEXTGRIDCollection itemChanged method

**URL:** <https://techcommunity.softwareag.com/t/textgridcollection-itemchanged-method/57230>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [February 22, 2006, 5:44pm UTC](https://techcommunity.softwareag.com/t/textgridcollection-itemchanged-method/57230 "2006-02-22T17:44:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onur\_Kutlu\_GAGO](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@Onur\_Kutlu\_GAGO](https://techcommunity.softwareag.com/u/Onur_Kutlu_GAGO)\
**Post date:** [February 22, 2006, 5:44pm UTC](https://techcommunity.softwareag.com/t/textgridcollection-itemchanged-method/57230/1 "2006-02-22T17:44:10Z")

</div>

When you invoke the itemChanged() method of a TEXTGRIDCollection, the selected line does not appear as selected (i.e. the line is not painted to YELLOW or whichever color you set)

---

<div class="post-metadata">

**Author:** ![Bjoern\_Mueller](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@Bjoern\_Mueller](https://techcommunity.softwareag.com/u/Bjoern_Mueller)\
**Post date:** [February 23, 2006, 12:10am UTC](https://techcommunity.softwareag.com/t/textgridcollection-itemchanged-method/57230/2 "2006-02-23T00:10:39Z")

</div>

…this is not the purpose of the method - the method just tells the textgrid that the line has changed.  
Use the SELECTPROP (typically “selected”, but this is part of TEXTGRID definition!) and set it to true.

Bjoern

---

<div class="post-metadata">

**Author:** ![Onur\_Kutlu\_GAGO](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@Onur\_Kutlu\_GAGO](https://techcommunity.softwareag.com/u/Onur_Kutlu_GAGO)\
**Post date:** [February 23, 2006, 1:33pm UTC](https://techcommunity.softwareag.com/t/textgridcollection-itemchanged-method/57230/3 "2006-02-23T13:33:35Z")

</div>

Well I think I asked the question in a wrong way. Let me tell you the problem from the beginning, in three steps:

1- A line of the grid is selected (by the user).  
2- While the line is selected, user clicks a button on the page. And the event of that button changes the line and calls the itemChanged() method.  
3- Suddenly the line appears as NOT SELECTED (it loses its highlight). But if you call the findLastSelectedItem() method, you get the selected line

I think now I expressed myself more clearly,

Thanks

---

<div class="post-metadata">

**Author:** ![Martin\_Grumann](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Martin\_Grumann](https://techcommunity.softwareag.com/u/Martin_Grumann)\
**Post date:** [February 27, 2006, 7:14pm UTC](https://techcommunity.softwareag.com/t/textgridcollection-itemchanged-method/57230/4 "2006-02-27T19:14:28Z")

</div>

… method “itemChanged” is just the signal to CAI to re-render the grid on UI side (“the textgrid’s change index is touched”). The item class provides for a property that indicates if the line is to be highlighted (defined at TEXTGRID-SELECTEDPROP within the XML layout). You may check that the property value is still TRUE after having changed the item (…eg. by a break point within the getter method…).

Martin

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/textgridcollection-itemchanged-method/57230/5 "2021-04-02T14:38:30Z")

</div>


