|
Requirements |
|
| RadControls version | 5.0.1.0 |
| .NET version | 2.0 |
| Visual Studio version | 2005 |
| programming language | C# |
| browser support |
all browsers supported by RadControls |
PROJECT DESCRIPTION
This project describes how to disable the Control key for Multi row selection .
ASPX:
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
| <%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title>Untitled Page</title> |
| <script language="javascript" type="text/javascript"> |
| function OnRowClick(index) |
| { |
| var e = window.event; |
| if (event.ctrlKey==1) |
| return false; |
| else |
| return true; |
| } |
| </script> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <radg:radgrid id="RadGrid1" runat="server" |
| allowmultirowselection="True" autogeneratecolumns="False" datasourceid="SqlDataSource1" |
| gridlines="None" EnableAJAX="True" Skin="Ice" > |
| <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="CategoryID" > |
| <Columns> |
| <radG:GridBoundColumn HeaderText="CategoryID" UniqueName="CategoryID" DataField="CategoryID"> |
| </radG:GridBoundColumn> |
| <radG:GridBoundColumn HeaderText="CategoryName" UniqueName="column" DataField="CategoryName" ></radG:GridBoundColumn> |
| <radg:GridClientSelectColumn UniqueName="column1"> |
| </radG:GridClientSelectColumn> |
| </Columns> |
| <ExpandCollapseColumn Resizable="False" Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| </MasterTableView> |
| <ClientSettings> |
| <ClientEvents OnRowClick="OnRowClick" /> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| <ExportSettings> |
| <Pdf PageBottomMargin="" PageFooterMargin="" PageHeaderMargin="" PageHeight="11in" |
| PageLeftMargin="" PageRightMargin="" PageTopMargin="" PageWidth="8.5in" /> |
| </ExportSettings> |
| </radg:radgrid> |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyNorthwindConnectionString %>" |
| SelectCommand="SELECT TOP 10 [CategoryID], [CategoryName] FROM [Sales by Category]"></asp:SqlDataSource> |
| </div> |
| </form> |
| </body> |
| </html> |
Princy