Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't select certain rows in datagrid

    Hello,

    I have a datagrid with 3 columns, that works great until you have 2 rows next to each other w/ the exact first name and last name.
    When that happens, I can select the top row but I can't select the bottom row.

    If I trace the onPatientSelected method, it never gets called.

    here's my datagrid code below:


    <code>
    <mxataGrid
    id="patientList"
    dataProvider="{dataProvider}"
    change="onPatientSelected()"
    styleName="patientlist"
    width="100%"
    height="100%"
    editable="false"
    draggableColumns="false"
    resizableColumns="false" headerRelease="checkColumnSorted(event)">

    <mx:columns>
    <mxataGridColumn headerText="Last Name" dataField="LastName" />
    <mxataGridColumn headerText="First Name" dataField="FirstName"/>
    <mxataGridColumn headerText="Unique Id" dataField="UniqueId" sortable="false"/>
    </mx:columns>

    </mxataGrid>
    </cod>

    Any ideas?

  • #2
    ad7
    ad7 is offline
    New to the CF scene
    Join Date
    Oct 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re:

    It works fine here. Rows are selected as well as trace is called.
    What do you have in your dataprovider ?

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    here's my datagrid code below:
    Please use [CODE][/CODE] tags to wrap your code while posting here.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    ad7
    ad7 is offline
    New to the CF scene
    Join Date
    Oct 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Send your datagrid code

  • #5
    New Coder
    Join Date
    Dec 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So the problem has been solved and sorry for the long reply the culprit was the sort function:

    Previously it was this:

    dataProvider.sort.fields = [new SortField("LastName",true, false), new SortField("FirstName",true, false)];

    and all I had to do was to make it more distinct by adding the PatientId field to the mix.

    dataProvider.sort.fields = [new SortField("LastName",true, false), new SortField("FirstName",true, false), new SortField("PatientId",true, false)];



    Thanks for everyone's reply!


  •  

    Posting Permissions

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