I am trying to build a datalist of all the media items in a particular folder so I can use paging and use ajax to reload the data once a tag has been selected.
But I am getting stumped at the first hurdle of assigning the GetMedia() to a datalist.
Does anyone have any examples or ideas how I can do this?
GetMedia() returns a XPathNodeIterator object which doesn't implement the IList interface (which is what a datalist is expecting when you're assigning a object to its datasource property). Either:
- work out the datalist in xslt, and build the table structure, paging yourself (Good example to be found on nibble.be)
- create a xslt extension that converts your XPathNodeIterator object to an object that implements IList.
I have already implemented the datalist in xslt, and built the table structure, paging myself using nibble.be example. Only problem is that the client is now requesting the filtering to be done using ajax, hence asking about datalist as I was looking to use AJAX.NET and possibly datalist.
I think I will stick with what I have at the moment and look into the xslt extension later as my understanding of XSLT is still not that great.
Creating a datalist of media items
Hi All,
I am trying to build a datalist of all the media items in a particular folder so I can use paging and use ajax to reload the data once a tag has been selected.
But I am getting stumped at the first hurdle of assigning the GetMedia() to a datalist.
Does anyone have any examples or ideas how I can do this?
Thanks
Tom
Tom,
GetMedia() returns a XPathNodeIterator object which doesn't implement the IList interface (which is what a datalist is expecting when you're assigning a object to its datasource property). Either:
- work out the datalist in xslt, and build the table structure, paging yourself (Good example to be found on nibble.be)
- create a xslt extension that converts your XPathNodeIterator object to an object that implements IList.
Hope this helps.
Cheers,
/Dirk
Hi Dirk,
I have already implemented the datalist in xslt, and built the table structure, paging myself using nibble.be example. Only problem is that the client is now requesting the filtering to be done using ajax, hence asking about datalist as I was looking to use AJAX.NET and possibly datalist.
I think I will stick with what I have at the moment and look into the xslt extension later as my understanding of XSLT is still not that great.
Thanks
Tom
is working on a reply...