Hi,
I have a few questions to ask. first how do i drag a row of data from a listgrid?
Secondly, assuming I want to display an image in response to a click on a row from the grid how would I achieve that? The url is not displayed on the grid but is contained in an xml file used to display the grid.

Drag and drop
8 October, 2007 - 13:16 — EmielHi,
The tricky bit with getting an reference from your listGrid is getting the correct row.
This is something I use which takes the aLocalIndexes from the listGrid. aLocalIndexes is the array of the rows from the dataSource that keeps track of the rows when sorting:
<e:handler event="click" type="application/javascript">
var oListGrid = bb.getControllerFromView(document.getElementById('listGrid'));
var index = oListGrid.aLocalIndexes[bb.getProperty(oListGrid, 'selectedIndex')];
alert(oListGrid.aLocalIndexes);
alert(btl.dataBinding.getValue(bb.getElementById('mySource'), index, '@id'));
</e:handler>
<b:listGridCol query="title" label="Title" width="200px"></b:listGridCol>
<b:listGridCol query="genre" label="Genre" width="100px">
<b:editor>
<select>
<option value=""></option>
<option value="Action">Action</option>
<option value="Adventure">Adventure</option>
<option value="Crime">Crime</option>
<option value="Drama">Drama</option>
<option value="Horror">Horror</option>
<option value="Thriller">Thriller</option>
<option value="War">War</option>
</select>
</b:editor>
</b:listGridCol>
<b:listGridCol query="rating" label="Rating" width="70px" align="right">
<b:editor>
<b:spinner></b:spinner>
</b:editor>
</b:listGridCol>
</b:listGrid>
My dataSource looks like this:
<e:data type="text/xml">
<movies totalRecords="3">
<movie id="film-0">
<new></new>
<title>The Seven Samurai</title>
<genre>Drama</genre>
<rating>88</rating>
</movie>
<movie id="film-1">
<new></new>
<title>City of God</title>
<genre>Drama</genre>
<rating>88</rating>
</movie>
<movie id="film-2">
<new></new>
<title>The Godfather</title>
<genre>Crime</genre>
<rating>91</rating>
</movie>
</movies>
</e:data>
</e:variable>
I think with that you could get the url and set it somewhere to load it.
problem
8 October, 2007 - 23:39 — kuenaalert(btl.dataBinding.getValue(bb.getElementById('mySource'), index, '@id'));the above bit of code doesn't work. I keep getting an error message that says "oDOController has no properties"
Drag and drop
9 October, 2007 - 09:50 — EmielHmmm... that is strange. The only thing that is not there is the dataSource. This is what I use for that.
Include the xml file:
And the dataSource:
Let me know if that changes anything.
mispelling error
9 October, 2007 - 11:59 — kuenaHi,
I had actually mispelled my id within the dataSource. Thanks
how do we drag a litsgrid
15 December, 2007 - 05:00 — nbourdeauhow do we drag a litsgrid item ?
where do we have to define the property e:behavior="b:drag" ?
how do we drag a litsgrid
7 January, 2008 - 09:48 — EmielAt the moment it is not possible to drag listgrid items in a listgrid. I have entered it as a feature request. At the moment we are trying to improve our drag system so I am pushing for also ways to make these things possible.
Thanks
6 January, 2008 - 20:15 — alexfI had the same question. Thank you for your help!!!