Click here to Skip to main content
16,011,170 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
This is my grid view

ASP.NET
<asp:GridView ID="grdEvaluation_Questions" runat="server" Style="width: 900px; height: auto;
                margin-left: 200px; margin-top: 50px; border: 3px solid #ccc;" OnRowCommand="grdEvaluation_Questions_OnRowCommand"
                AutoGenerateColumns="false" OnRowDeleting="grdEvaluation_Questions_RowDeleting"
                OnRowUpdating="grdEvaluation_Questions_RowUpdating">
                <Columns>
                    <asp:BoundField DataField="CategoryName" HeaderText="Category Name" />
                    <asp:BoundField DataField="SubCategoryName" HeaderText="SubCategory Name" />
                    <asp:BoundField DataField="QuestionTypeDesc" HeaderText="Question Type" />
                    <asp:BoundField DataField="QuestionDescription" HeaderText="Question Description" />
                    <asp:BoundField DataField="PossibleAnswers" HeaderText="Possible Answers" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Button ID="btnEdit" CommandArgument='<%# Eval("QuestionID")%>' CommandName="Update"
                                runat="server" Text="Edit" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Button ID="btnDelete" CommandArgument='<%# Eval("QuestionID")%>' CommandName="Delete"
                                runat="server" Text="Delete" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>


This is my code for bind the grid

C#
public void GetAllEvaluation_Question()
        {
            var EvaluationQuestion = clsEvaluationQuestion.GetAllEvaluation_Question().AsQueryable();

            grdEvaluation_Questions.DataSource = EvaluationQuestion;
            grdEvaluation_Questions.DataBind();
        }


this is my DAl function
C#
public IQueryable GetAllEvaluation_Question()
        {
            CastroDataContext objDAL = new CastroDataContext();
            var varEvaluation_Question = objDAL.sp_GetAll_Evaluation_Questions().AsQueryable();
                       
            return varEvaluation_Question;
        }


And this is my store procedure

SQL
alter PROCEDURE sp_GetAll_Evaluation_Questions
	
AS
BEGIN
	select eq.*,c.CategoryName, sc.SubCategoryName, qt.QuestionTypeDesc  from Evaluation_Questions eq

	inner join QuestionTypes qt
	on eq.QuestionTypeID=qt.QuestionTypeID

	inner join Categories c
	on eq.CategoryID =c.CategoryID

	left outer join SubCategories sc
	on eq.SubCategoryID=sc.SubCategoryID

	where eq.IsDeleted = 0
END
GO


My problem is this
i want to use custom paging on my grid
like this
Custom paging with ASP.NET GridView[^]

How can i do this

plz help me
Posted
Updated 11-Mar-13 5:31am
v2
Comments
Richard C Bishop 11-Mar-13 11:33am    
You should ask the author of the article you posted your question.
ZurdoDev 11-Mar-13 14:51pm    
You have to write SQL to manage your paging. What part are you stuck on?
prince_rumeel 12-Mar-13 3:09am    
i am stuck on sql managment.i dont know how to do this paging

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900