0

So I have this line: lvwp.ListViewXml.OrderBy.. - after this I have no Idea what to write?

I would like to assign something like:

Combining like this:

lvwp.ListViewXml.OrderBy<FieldRef Name='Index' Ascending='TRUE' />(); 

will ofcourse not work

I have looked at: http://msdn.microsoft.com/en-us/library/system.linq.enumerable.orderby.aspx , but I just dont get it, Im pretty new with programming and dont really understand concepts like Enumerable and generics

Anyway, is there a simple answer to this?

1 Answer 1

0

ListViewXml is of type string, so you should not use Linq at all on it.

It should be set with a string containing CAML

Something like this:

lvwp.ListViewXml = "<Query><Where>YOUR FILTER CAML IF NEEDED</Where><OrderBy><FieldRef Name='Index' Ascending='TRUE' /></OrderBy><Query>"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.