<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True" PageSize="20" EnableAJAX="True" Width="100%" AutoGenerateColumns="False" ShowStatusBar="True" OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand" OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand" CellSpacing="0" Skin="Hay" Culture="zh-CN"> <MasterTableView CommandItemDisplay="Top" DataKeyNames="序号" EditMode="InPlace" NoMasterRecordsText="没有您要查询的数据" GridLines="None"> <PagerStyle Mode="NextPrevAndNumeric" FirstPageToolTip="第一页" LastPageToolTip="最后一页" NextPageToolTip="下一页" PrevPageToolTip="上一页" PageSizeLabelText="每页显示:" ShowPagerText="False" /> <CommandItemSettings AddNewRecordText="新增跳线" RefreshText="刷新" /> <Columns> </Columns> </MasterTableView> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="true"> <Selecting AllowRowSelect="True" /> <ClientEvents OnRowDblClick="RowDblClick" /> <Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True"> </Resizing> </ClientSettings> </telerik:RadGrid>
EnableAJAX="True",更新或插入代码中,在catch中添加 e.Canceled = true; 当你新增或修改异常报错时,没这个属性,它将退出编辑状态,有这个属性,将保持编辑状态
<PagerSStyle>分页的样式
<CommandItemSettings> 在这可以设置导出Excel、Pdf等图标的显示与否。
<ClientSettings EnableRowHoverStyle="true"/>荧光棒的效果
AllowRowSelect="True" 选中时的效果
<Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True" />设置可调整列宽,位置。