This is a migrated thread and some comments may be shown as answers.

[Solved] Help binding grid to Membership.GetAllUsers

1 Answer 143 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 14 Apr 2009, 07:53 PM
Im having a hard time getting the paging to work. I tried this the easy way and just databound membership.getallusers and it seemed to work fine only paging didn't work. Then I followed these instructions. Still does not work. I know the instructions work because I just bound to an asp:gridview autogenerated the columns turned on paging and it worked fine. When I try the same with the radgrid i have data but no paging. Im sure I'm doing something wrong I just don't know what....

  <asp:ObjectDataSource ID="objdsUsers" runat="server" selectmethod="CustomGetAllUsers" typename="MyNameSpace.Data.GetAllUsers"></asp:ObjectDataSource> 
              <asp:gridview id="gvUsers" allowpaging="true" runat="server" autogeneratecolumns="true" pagesize="2" pagersettings-mode="Numeric" 
                datasourceid="objdsUsers" /> 
                 <telerik:radgrid id="rgUsers" pagesize="2" runat="server" allowfilteringbycolumn="True" 
                    allowpaging="True" allowcustompaging="true" allowsorting="True" autogeneratecolumns="False" 
                    datasourceid="objdsUsers" 
                    gridlines="None" onupdatecommand="rgUsers_Update" skin="Gray" 
                    > 
                    <headercontextmenu enabletheming="True"
                       <collapseanimation duration="200" type="OutQuint" /> 
                    </headercontextmenu> 
                    <mastertableview editformsettings-editformtype="Template" editmode="EditForms"
                    <headerstyle font-size="X-Small" /> 
                       <columns> 
                          <telerik:grideditcommandcolumn canceltext="Cancel" edittext="Edit" 
                             updatetext="Save" /> 
                          <telerik:gridboundcolumn datafield="UserName" headertext="Username" /> 
                          <telerik:gridboundcolumn datafield="Email" headertext="E-mail" /> 
                          <telerik:gridcheckboxcolumn datafield="IsApproved" headertext="Is Approved" 
                             readonly="true" /> 
                          <telerik:gridcheckboxcolumn datafield="IsLockedOut" headertext="Locked Out" /> 
                          <telerik:gridboundcolumn datafield="CreationDate" headertext="Registered" /> 
                          <telerik:gridboundcolumn datafield="LastLoginDate" headertext="Last Login" /> 
                       </columns> 
                       <editformsettings editformtype="Template"
                          <editcolumn uniquename="rdCommondColumnEdit" /> 
                          <formtemplate> 
                             <div class="formarea useredit"
                                <h1 class="title"
                                   Edit <strong><%# DataBinder.Eval(Container,"DataItem.UserName") %></strong></h1> 
                                <fieldset> 
                                   <ul> 
                                      <li> 
                                         <label>Username:</label> 
                                         <telerik:radtextbox focusedstyle-cssclass="textbox focused" runat="server"  text='<%# DataBinder.Eval(Container,"DataItem.UserName") %>' /> 
                                           <asp:textbox id="txtUsername" runat="server" text='<%# DataBinder.Eval(Container,"DataItem.UserName") %>' /> 
                                      </li> 
</ul> 
                                </fieldset> 
                             </div> 
                          </formtemplate> 
                       </editformsettings> 
                       <rowindicatorcolumn> 
                          <headerstyle width="20px" /> 
                       </rowindicatorcolumn> 
                       <expandcollapsecolumn> 
                          <headerstyle width="20px" /> 
                       </expandcollapsecolumn> 
                    </mastertableview> 
                    <pagerstyle mode="Slider" alwaysvisible="true" /> 
                    <filtermenu enabletheming="True"
                       <collapseanimation duration="200" type="OutQuint" /> 
                    </filtermenu> 
                 </telerik:radgrid> 


Please pardon the messy code as its a work in progress and I've been exploring the grid a bit

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 17 Apr 2009, 07:30 AM
Hello Sean,

I believe that this behavior is due to setting AllowCustomPaging to true. If you set this property to true you will have to handle RadGrid paging on your own.
Please try setting it to false you and paging will be working as expected.

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Sean
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or