0 Replies Latest reply on Nov 22, 2015 5:47 AM by hissizadam

    Datagird Scrolling Problem

    hissizadam Level 1

      Hi all,


      I fetched data from xml database file and listed in datagrid.

      Sorting cells asc. or dsc. using data table headers. I have a

      some buttons (for go to another pages) and using a click handler event.


      I have an another page, it's a details page. When clicked to any cell listed in datagrid,

      showing details a selected item from data grid and i using a selectionChange event for

      binding to details page.


      <?xml version="1.0" encoding="utf-8"?>  
      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"   
              title="Şirket Rehberi"  
                  import mx.events.FlexEvent; 
                  import mx.events.StateChangeEvent; 
                  import spark.events.GridEvent; 
                  import spark.events.GridSelectionEvent; 
                  import spark.events.IndexChangeEvent; 
                  protected function Search_clickHandler(event:MouseEvent):void  
                  protected function list_selectionChangeHandler(event:GridSelectionEvent):void  
                      navigator.pushView(EmployeeDetails, list.selectedItem)     
                  protected function Kategori_clickHandler(event:MouseEvent):void  
              <s:HTTPService id="srv" url="assets/employees.xml"/>      
              <s:Button icon="@Embed('assets/search.png')" click="Search_clickHandler(event)"/>    
              <s:Button icon="@Embed('assets/kategori.png')" click="Kategori_clickHandler(event)"/>   
          <s:VGroup width="100%" height="100%">  
              <s:DataGrid id="list" width="100%" height="100%" color="black"  
                          <s:GridColumn dataField="firstName" headerText="Ad"  />  
                          <s:GridColumn dataField="lastName" headerText="Soyad"/>  
                          <s:GridColumn dataField="title" headerText="Ünvan"/>  
                          <s:GridColumn dataField="city" headerText="Bölge"/>  
                          <s:GridColumn dataField="department" headerText="Müdürlük"/>  
                          <s:GridColumn dataField="detay" headerText="Detay" />  



      it's work


      i have a scrolling problem now. when i touch the screen for scrolling the page, going to details page because i used a selection change event before.

      if i try to using a gridclick event or etc. showing a this error message.


      "1067: Implicit coercion of a value of type spark.events:GridEvent to an unrelated type spark.events:GridSelectionEvent.    Liste.mxml    /EmployeeDirectory/src/views    line 49    Flex Problem"


      this project is very very important for me.

      can somebody help me please?