<asp:GridView ID="grVw" runat="server" DataKeyNames="Id, Name" PageSize="10" AllowPaging="true" AllowSorting="true" DataSourceID="ObjectDataSource" AutoGenerateColumns="False" AutoGenerateCheckBoxColumn="True" CheckBoxColumnIndex="0"> <EmptyDataTemplate> No Matching Records Found </EmptyDataTemplate> <Columns> <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="ObjectDataSource" runat="server" MaximumRowsParameterName="p_maxRows" StartRowIndexParameterName="p_startIndex" TypeName="MVCSampleApplication.Controllers.DefaultController" SelectMethod="GetList" SelectCountMethod="GetListCount" SortParameterName="p_sortData" EnablePaging="true"> <SelectParameters> <asp:Parameter Name="p_sortData" Type="String" /> </SelectParameters> </asp:ObjectDataSource>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)