Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7841817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:10:47+00:00 2026-06-02T16:10:47+00:00

As title how a paging wcf can work as datasource? Dataservicequery had setentitysetpagesize the

  • 0

As title how a paging wcf can work as datasource? Dataservicequery had setentitysetpagesize the records of select had limited. How should it work like as datasource in this case. If bind it to web control the total record will be wrong when query all the record and the paging also have paging. I had gonna crazy after due with this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:10:48+00:00Added an answer on June 2, 2026 at 4:10 pm

    You need to use generic classes as a return type and made that classes serializable and then use Object datasource in front end . I am sure about that it works.

    Like:
    Bizz layer as W.C.F service

     public List<Employee> GetEmployees()
            {
    
                try
                {
    
                    List<Employee> emp = new List<Employee>();
                    emp.Add(new Employee { Code = 1, DepartMentCode = 2, FatherName = "FatherName", ManagerCode = 2,  Name = "Bilal",ManagerName="mnagername", PhoneNumber = "24421" });
                return emp;
            }
    
            catch (TimeoutException te)
            {
                throw te;
            }
            catch (FaultException fe)
            {
                throw new FaultException();
            }
            catch (CommunicationException ce)
            {
                throw new CommunicationException();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (client != null)
                {
                    client.Close();
                }
            }
        }
    

    //entity class

     [Serializable()]
      [DataContract()]
      public class Employee
      {
        [DataMember]
        public int Code { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string FatherName { get; set; }
        [DataMember]
        public string PhoneNumber { get; set; }
        [DataMember]
        public int DepartMentCode { get; set; }
        [DataMember]
        public int ManagerCode { get; set; }
        [DataMember]
        public string ManagerName { get; set; }
    }
    

    //this is page level code . i hope you willunderstand that.

      <div class="EmployeeMain">
        <div class="link" onclick="Show_Popup();">
            New Employee</div>
        <fieldset>
            <legend>Employees Details </legend>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ODSEmployee"
                OnRowEditing="GridView1_RowEditing" BackColor="LightGoldenrodYellow" BorderColor="Tan"
                BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None" Width="100%"
                AllowPaging="True">
                <AlternatingRowStyle BackColor="PaleGoldenrod" />
                <Columns>
                    <asp:BoundField FooterText="EmployeeID" DataField="Code" HeaderText="EmployeeID" />
                    <asp:BoundField FooterText="Name" DataField="Name" HeaderText="Name" />
                    <asp:BoundField FooterText="Father Name" DataField="FatherName" HeaderText="Father Name" />
                    <asp:BoundField FooterText="Phone Number" DataField="PhoneNumber" HeaderText="Phone Number" />
                    <asp:TemplateField FooterText="manager" HeaderText="Manager">
                        <ItemTemplate>
                            <asp:Label ID="lblMangerName" Text='<%# Eval("ManagerName") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlManager" runat="server" DataSourceID="ManagersDataSource"
                                DataTextField="ManagerName" DataValueField="ManagerCode" SelectedValue='<%# Bind("ManagerCode") %>'
                                AppendDataBoundItems="True">
                            </asp:DropDownList>
                            <asp:ObjectDataSource runat="server" ID="ManagersDataSource" SelectMethod="GetManagers"
                                TypeName="mytest.WebApplication.BizzLayerService.EmployeeClient"></asp:ObjectDataSource>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
                </Columns>
                <FooterStyle BackColor="Tan" />
                <HeaderStyle BackColor="Tan" Font-Bold="True" />
                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                <SortedAscendingCellStyle BackColor="#FAFAE7" />
                <SortedAscendingHeaderStyle BackColor="#DAC09E" />
                <SortedDescendingCellStyle BackColor="#E1DB9C" />
                <SortedDescendingHeaderStyle BackColor="#C2A47B" />
            </asp:GridView>
            <asp:ObjectDataSource ID="ODSEmployee" runat="server" DeleteMethod="DeleteEmployeeRecord"
                InsertMethod="SaveEmployeeRecord" SelectMethod="GetEmployees" TypeName="mytest.WebApplication.BizzLayerService.EmployeeClient"
                UpdateMethod="UpdateEmployeeRecord">
                <DeleteParameters>
                    <asp:Parameter Name="empCode" Type="Int32" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:Parameter Name="empCode" Type="Int32" />
                    <asp:Parameter Name="empName" Type="String" />
                    <asp:Parameter Name="empFatherName" Type="String" />
                    <asp:Parameter Name="empPhoneNumber" Type="String" />
                    <asp:Parameter Name="empAddress" Type="String" />
                    <asp:Parameter Name="empDeparmentCode" Type="Int32" />
                    <asp:Parameter Name="EmpManagerCode" Type="Int32" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="empCode" Type="Int32" />
                    <asp:Parameter Name="empName" Type="String" />
                    <asp:Parameter Name="empFatherName" Type="String" />
                    <asp:Parameter Name="empPhoneNumber" Type="String" />
                    <asp:Parameter Name="empAddress" Type="String" />
                    <asp:Parameter Name="empDeparmentCode" Type="Int32" />
                    <asp:Parameter Name="EmpManagerCode" Type="Int32" />
                </UpdateParameters>
            </asp:ObjectDataSource>
            <br />
        </fieldset>
    </div>
    <div class="newAcount">
        <table>
        <tr>
        <td colspan="2">
        <h1>New Employee Record</h1>
        </td>
        </tr>
            <tr>
                <td>
                    Name
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Father Name
                </td>
                <td>
                    <asp:TextBox ID="txtFathername" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Phone Number
                </td>
                <td>
                    <asp:TextBox ID="txtPhonuNumber" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Address
                </td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Department code
                </td>
                <td>
                    <asp:DropDownList ID="ddlDeptCode" runat="server">
                    </asp:DropDownList>
    
                </td>
            </tr>
            <tr>
                <td>
                    Manager Code
                </td>
                <td>
                  <asp:DropDownList ID="ddlManagerName" runat="server">
                    </asp:DropDownList>
    
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnSaveRecord" runat="server" Text="Button" />
                </td>
                <td>
                    <input id="Button1" type="button" value="close" onclick="Close_Popup()" />
                </td>
            </tr>
        </table>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Title is most of the question, what allows this to be valid code? Is
i'm trying to implement paging in xml using this code and got around to
I have a stored procedure which does sorting pnd Paging like the Sorting Custom
I'm using this query to get results in a paging manner. However, when I
I'm trying to use url_rewrite to work around nonfriendly parameters in URL of paging
Title is basic enough, why can't I: Dictionary<string, string> dic = new Dictionary<string, string>();
I am trying to get a telerik grid to work (paging works fine). My
I have a GridView filled with the most recent 100 documents records (Title, Description,
I'm trying to select DISTINCT rows from a view using ROW_NUMBER() OVER for paging.
I want create for paging a usercontrol. How can I access properties in usercontrol.ascx

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.