<asp:GridView ID="gvCategory" runat="server" AutoGenerateColumns="False" AllowPaging="True" DataSourceID="objDs" EnableSortingAndPagingCallbacks="True" ShowFooter="True" AllowSorting="True" OnRowCommand="gvCategory_RowCommand" Width="100%" OnRowDataBound="gvCategory_RowDataBound" > <Columns> <asp:TemplateField HeaderText="#" HeaderStyle-Width="2%" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Font-Underline="false"> <ItemTemplate> <%# (((GridView)((GridViewRow)Container).Parent.Parent).PageIndex) * ((GridView)((GridViewRow)Container).Parent.Parent).PageSize + Container.DataItemIndex + 1 %> <asp:HiddenField ID="hdfID" runat="server" Value='<%# Eval("ID") %>' /> </ItemTemplate> <HeaderStyle Font-Underline="False" HorizontalAlign="Left" Width="2%" /> </asp:TemplateField> <asp:BoundField DataField="CategoryName" HeaderText="Category Name" SortExpression="CategoryName" /> <asp:BoundField DataField="CategoryDescription" HeaderText="Category Description" SortExpression="CategoryDescription" /> <asp:BoundField DataField="StatusDesc" HeaderText="Status" SortExpression="StatusDesc" /> <asp:TemplateField HeaderStyle-Font-Underline="false" HeaderStyle-Width="5%" ShowHeader="False"> <ItemTemplate> <asp:LinkButton ID="lnkGvSelect" runat="server" CausesValidation="False" CommandArgument='<%# Eval("ID") %>' CommandName="Select" /> </ItemTemplate> <HeaderStyle Font-Underline="False" Width="5%" /> </asp:TemplateField> </Columns> <EmptyDataTemplate> <asp:Label ID="lblNoAvailableData" runat="server" SkinID="GridViewNoDataAvailable" Text="No Record Found"></asp:Label> </EmptyDataTemplate> </asp:GridView> <asp:ObjectDataSource ID="objDs" TypeName="IFBS.Web.Course.Maint.UI.GridViewListingClass" SelectMethod="BindGrid" runat="server" SelectCountMethod="GetGridRowCount" EnablePaging="true" StartRowIndexParameterName="StartRow" MaximumRowsParameterName="PageSize" SortParameterName="SortBy" > <SelectParameters> <asp:ControlParameter Name="srchTxt" ControlID="txtSearch" PropertyName="Text" /> <asp:ControlParameter Name="pgIdx" ControlID="gvCategory" PropertyName="PageIndex" /> </SelectParameters>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)