📄 defaultvb.aspx
字号:
<%@ Page Language="VB" AutoEventWireup="false" Codebehind="DefaultVB.aspx.vb" Inherits="Telerik.GridExamplesVBNET.Client.ClientSideEvents.DefaultVB" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" Assembly="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" TagName="Header" Src="~/Common/Header.ascx" %>
<%@ Register TagPrefix="telerik" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
<%@ Register TagPrefix="telerik" TagName="Footer" Src="~/Common/Footer.ascx" %>
<%@ Register TagPrefix="radG" Namespace="Telerik.WebControls" Assembly="RadGrid" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<telerik:HeadTag runat="server" ID="Headtag1"></telerik:HeadTag>
<!-- custom head section -->
<link href="../../Styles/ColorSchemes/WinXP/Styles.css" rel="stylesheet" type="text/css" />
<!-- end of custom head section -->
<script type="text/javascript">
<!--
function GridCreated()
{
var text = "";
text += "Grid was created";
text += ", ClientID: " + this.ClientID;
document.getElementById("OutPut").innerHTML = text;
}
function RowResized(index, height)
{
var text = "";
text += "Row was resized";
text += ", Index: " + index;
text += ", Height: " + height;
document.getElementById("OutPut").innerHTML = text;
}
function RowClick(index)
{
var text = "";
text += "Row was clicked";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function RowDblClick(index)
{
var text = "";
text += "Row was double clicked";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function RowMouseOver(index)
{
var text = "";
text += "Mouse is over row";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function RowMouseOut(index)
{
var text = "";
text += "Mouse is out row";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function RowSelected(rowObject)
{
var text = "";
text += "Row with index: " + rowObject.Index + " was selected";
document.getElementById("OutPut").innerHTML = text;
}
function RowDeselected(rowObject)
{
var text = "";
text += "Row with index: " + rowObject.Index + " was deselected";
document.getElementById("OutPut").innerHTML = text;
}
function ColumnMouseOut(index)
{
var text = "";
text += "Mouse is out column";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function ColumnMouseOver(index)
{
var text = "";
text += "Mouse is over column";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function ColumnClick(index)
{
var text = "";
text += "Column was clicked";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function ColumnDblClick(index)
{
var text = "";
text += "Column was double clicked";
text += ", Index: " + index;
document.getElementById("OutPut").innerHTML = text;
}
function ColumnResized(index, width)
{
var text = "";
text += "Column was resized";
text += ", Index: " + index;
text += ", Width: " + width;
document.getElementById("OutPut").innerHTML = text;
}
function ColumnSwapping(columnIndex1, columnIndex2)
{
var text = "Swapping columns with indexes: " + columnIndex1 + " and " + columnIndex2;
document.getElementById("OutPut").innerHTML = text;
}
function ColumnSwapped(columnIndex1, columnIndex2)
{
var text = "Columns with indexes: " + columnIndex1 + " and " + columnIndex2 + " was swapped";
document.getElementById("OutPut").innerHTML = text;
}
function ColumnContextMenu(columnIndex)
{
var text = "Context menu on column with index: " + columnIndex;
document.getElementById("OutPut").innerHTML = text;
}
function RowContextMenu(rowIndex)
{
var text = "Context menu on row with index: " + rowIndex;
document.getElementById("OutPut").innerHTML = text;
}
-->
</script>
<!-- end of custom head section -->
</head>
<body class="body">
<form runat="server" id="mainForm" method="post" style="width:100%;">
<telerik:Header runat="server" ID="Header1" NavigationLanguage="VB"></telerik:Header>
<!-- content start -->
<div class="module" style="height:50px;width:92%;">
<span style="font-weight: bold;">Last event: </span><span id="OutPut" style="font-weight: bold; color: navy"></span>
<hr/>
<asp:Button CssClass="button" Text="PostBack" Runat="server" id="Button1"></asp:Button>
</div>
<br/>
<radG:RadGrid id="RadGrid1" CssClass="RadGrid" runat="server" AllowPaging="True" AllowSorting="True" GridLines="None"
PageSize="10" Width="95%">
<headerstyle cssclass="GridHeader"/>
<pagerstyle mode="NumericPages" cssclass="GridPager" Height="18px"/>
<itemstyle cssclass="GridRow" Height="20px"/>
<alternatingitemstyle cssclass="GridRow" Height="20px"/>
<mastertableview cssclass="MasterTable" Width="100%">
<RowIndicatorColumn>
<ItemStyle width="17px" CssClass="ResizeItem"></itemstyle>
<HeaderStyle width="17px"></HeaderStyle>
</RowIndicatorColumn>
</mastertableview>
<SelectedItemStyle BackColor="#ffffe1"></SelectedItemStyle>
<ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True">
<ClientEvents
OnGridCreated="GridCreated"
OnColumnResized="ColumnResized"
OnColumnSwapping="ColumnSwapping"
OnColumnSwapped="ColumnSwapped"
OnColumnClick="ColumnClick"
OnColumnDblClick="ColumnDblClick"
OnColumnMouseOver = "ColumnMouseOver"
OnColumnMouseOut = "ColumnMouseOut"
OnRowResized="RowResized"
OnRowClick="RowClick"
OnRowDblClick="RowDblClick"
OnRowMouseOver = "RowMouseOver"
OnRowMouseOut = "RowMouseOut"
OnRowSelected = "RowSelected"
OnRowDeselected = "RowDeselected"
OnRowContextMenu = "RowContextMenu"
OnColumnContextMenu = "ColumnContextMenu"
>
</ClientEvents>
<Selecting AllowRowSelect="True"></Selecting>
<Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"
AllowColumnResize="True"></Resizing>
</ClientSettings>
</radG:RadGrid>
<!-- content end -->
<telerik:Footer runat="server" ID="Footer1"></telerik:Footer>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -