sharepointsortingpaginationdataviewwebpart

Dataview Webpart > Sort limited to displayed items


sorting in dataviewwebpart only sorting within display items. Paging is enabled to display 10 items per page. Also, How do I put 1,2,3,4,5,6,7,8,9,10, (next, previous) for the paging?

They give you dataview wp but looks like it's also limited. I wish it had more capabilities like gridview. Anyone????


Solution

  • Here is how I solved this issue.

    <asp:TemplateField HeaderText="Campaign Members">
    <ItemTemplate> 
    <%# RemoveCharacters(Eval("CampaignMembers").ToString())%> 
    </ItemTemplate> 
    </asp:TemplateField> 
    

    C# code:

    // Make sure declare using System.Text.RegularExpression; 
    protected string RemoveCharacters(object String) 
    { 
        string s1 = String.ToString(); 
        string newString = Regex.Replace(s1, @"#[\d-];", string.Empty); 
        newString = Regex.Replace(newString, "#", " "); 
        return newString.ToString(); 
    }