Hello all, I'm trying to accomplish something that is seemingly
easy....but is driving me bananas due to the fact that it's not
working. I want to setup a function that can be called and that
function will scroll my datagrid to a specific row within that datagrid.
Here's what I've got (that doesn't work)........any thoughts?
_________________________________________________________
public function scrollDG():void {
dgUserRequest.editedItemPosition = {columnIndex:0,
rowIndex:dgUserRequest.dataProvider.length-1};
}
]]>
</mx:Script>
<mx:Button label="Scroll" click="scrollDG()"/>
<mx:Text text="{app.userInfo.firstname}'s Videos"/>
<mx:DataGrid id="dgUserRequest" x="22" y="128"
dataProvider="{app.vidInfo2}"
width="850" height="700" headerStyleName="headerStyle">
<mx:columns>
<mx:DataGridColumn headerText="Thumbnail"
dataField="thumb_name"
itemRenderer="components.dgRenderImage"
width="104"/>
<mx:DataGridColumn headerText="Video Title"
dataField="projectname" id="title"
fontWeight="bold" paddingLeft="10"/>
<mx:itemRenderer>
<mx:Component>
<mx:VBox
verticalAlign="middle">
<mx:Text
text="{data.projectname}"/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn headerText=""
dataField="projectid"
itemRenderer="components.dgEditProject"
width="120"/>
<mx:DataGridColumn headerText="Last Modified"
dataField="lastmodified"
itemRenderer="components.dgLastMod"
width="150"/>
<mx:DataGridColumn headerText=""
dataField="projectid"
itemRenderer="components.dgDeleteProject"
width="75"/>
</mx:columns>
</mx:DataGrid>
____________________________________________________________________
Thanks for the help.
-Cameron