Hi

I have already given the selectable="true".But its stil showing the
selectedItem is null while onclick and onchange..here is the code..

private function getList():void{
    var o:Object = new Object();
    o['do']="getList";
    if(countryId.selectedItem != null){
        Alert.show("SelectedItem is not null");
        o['country']= countryId.selectedItem.value;
    }else{
        o['country']= countryFromWorlkflow;
    }
    myListServices.send(o);
}


<mx:AdvancedDataGrid id="countryId" width="100%" styleName="forDataGrid"
    headerHeight="25" verticalAlign="middle" rowHeight="25" rowCount="10"
     selectable="true" defaultLeafIcon="{null}" verticalScrollPolicy="auto"
     useRollOver="false" wordWrap="true" change="getList()"
itemClick="getList();"
     draggableColumns="false"   height="100%"  selectionMode="singleCell">
     <mx:dataProvider>
            <mx:HierarchicalData source="{countries}"/>
        </mx:dataProvider>
    <mx:columns>
         <mx:AdvancedDataGridColumn  headerText="Countries"  width="100"
dataField="display" textAlign="center"   />
    </mx:columns>
</mx:AdvancedDataGrid>

Regards
Gautham.

On Fri, Apr 1, 2011 at 6:45 PM, Kronos <[email protected]> wrote:

> Hi,
> My guess is that u have not set the "selectable" property in your
> Advanced Data grid to true. That is why u are getting selecteditem as
> null inspite of selecting a row.
> Its a common mistake .... happened to me alot :) Let me know if it
> doesnt work.
>
> On Mar 31, 3:18 pm, Gautham <[email protected]> wrote:
> > hi,
> >
> > Any way to use the header sort arrow in the datagrid using the
> > keyboard..
> > Its working fine with Advance datagrid ..but while using with
> > advanceddatagrid
> > while clicking the row am getting the SelectItem is null in the
> > script..
> > pls help
> >
> > Regards
> > Gautham
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to