protected
void
RadGrid1_PreRender(
object
sender, System.EventArgs e)
{
if
(!
this
.IsPostBack)
{
this
.RadGrid1.MasterTableView.Items[1].Edit =
true
;
this
.RadGrid1.MasterTableView.Rebind();
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<!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
></
title
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
head
>
<
body
>
<
form
runat
=
"server"
id
=
"mainForm"
method
=
"post"
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
//Put your JavaScript code here.
function fnUpdate() {
alert('Default.aspx');
return false;
}
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
//If i didn't comment this one when i click cancel i got error
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
GridLines
=
"None"
AllowPaging
=
"True"
CssClass
=
"RadGrid"
AutoGenerateColumns
=
"False"
ShowStatusBar
=
"True"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
PageSize
=
"10"
CellSpacing
=
"0"
>
<
MasterTableView
DataKeyNames
=
"row_id"
EditMode
=
"PopUp"
HorizontalAlign
=
"Left"
>
<
CommandItemSettings
/>
<
Columns
>
<
telerik:GridEditCommandColumn
UniqueName
=
"EditCommandColumn"
>
</
telerik:GridEditCommandColumn
>
<
telerik:GridBoundColumn
DataField
=
"row_id"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter row_id column"
HeaderText
=
"Row"
ReadOnly
=
"True"
SortExpression
=
"row_id"
UniqueName
=
"row_id"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"description"
FilterControlAltText
=
"Filter description column"
HeaderText
=
"Description"
SortExpression
=
"description"
UniqueName
=
"description"
>
</
telerik:GridBoundColumn
>
<
telerik:GridCheckBoxColumn
DataField
=
"status"
DataType
=
"System.Boolean"
FilterControlAltText
=
"Filter status column"
HeaderText
=
"Status"
SortExpression
=
"status"
UniqueName
=
"status"
>
</
telerik:GridCheckBoxColumn
>
</
Columns
>
<
EditFormSettings
UserControlName
=
"control/WebUserControl.ascx"
EditFormType
=
"WebUserControl"
PopUpSettings-Modal
=
"true"
CaptionFormatString
=
"Current Editing row no. {0}"
CaptionDataField
=
"row_id"
>
<
EditColumn
UniqueName
=
"EditCommandColumn"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>
<
br
/>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [row_id], [description], [status] FROM [tbl_sample]"></
asp:SqlDataSource
>
</
form
>
</
body
>
</
html
>
using
System;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Data;
using
System.Configuration;
using
System.Web.Security;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
using
Telerik.Web.UI;
using
System.Data.SqlClient;
public
partial
class
Default : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
private
static
DataTable GetDataTable(
string
queryString)
{
String ConnString = ConfigurationManager.ConnectionStrings[
"ConnectionString"
].ConnectionString;
SqlConnection MySqlConnection =
new
SqlConnection(ConnString);
SqlDataAdapter MySqlDataAdapter =
new
SqlDataAdapter();
MySqlDataAdapter.SelectCommand =
new
SqlCommand(queryString, MySqlConnection);
DataTable myDataTable =
new
DataTable();
MySqlConnection.Open();
try
{
MySqlDataAdapter.Fill(myDataTable);
}
finally
{
MySqlConnection.Close();
}
return
myDataTable;
}
private
DataTable Employees
{
get
{
object
obj =
this
.Session[
"_tbl"
];
if
((!(obj ==
null
)))
{
return
((DataTable)(obj));
}
DataTable myDataTable =
new
DataTable();
myDataTable = GetDataTable(
"SELECT * FROM tbl_sample"
);
this
.Session[
"_tbl"
] = myDataTable;
return
myDataTable;
}
}
protected
void
RadGrid1_PreRender(
object
sender, System.EventArgs e)
{
if
(!
this
.IsPostBack)
{
this
.RadGrid1.MasterTableView.Items[1].Edit =
true
;
this
.RadGrid1.MasterTableView.Rebind();
}
}
protected
void
RadGrid1_NeedDataSource(
object
source, GridNeedDataSourceEventArgs e)
{
this
.RadGrid1.DataSource =
this
.Employees;
this
.Employees.PrimaryKey =
new
DataColumn[] {
this
.Employees.Columns[
"row_id"
] };
}
protected
void
RadGrid1_EditCommand(
object
sender, GridCommandEventArgs e)
{
}
}
<%@ Control Language=
"C#"
AutoEventWireup=
"true"
CodeFile=
"WebUserControl.ascx.cs"
Inherits=
"control_WebUserControl"
%>
<telerik:RadCodeBlock ID=
"RadCodeBlock1"
runat=
"server"
>
<script type=
"text/javascript"
language=
"javascript"
>
//Put your JavaScript code here.
function fnUpdate() {
alert(
'Control'
);// should be call this function
}
</script>
</telerik:RadCodeBlock>
<telerik:RadAjaxManager ID=
"_radAjManagers"
runat=
"server"
OnAjaxRequest=
"_radAjManager_AjaxRequest"
>
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID=
"_radAjManagers"
EventName=
"OnAjaxRequest"
>
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID=
"_lblstatus"
/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<div>
<asp:Label runat=
"server"
ID=
"_lblstatus"
></asp:Label>
<asp:TextBox ID=
"TextBox1"
runat=
"server"
Text=
'<%# DataBinder.Eval( Container, "DataItem.Description" ) %>'
></asp:TextBox>
<br />
<asp:Button ID=
"btnInsert"
Text=
"Insert"
runat=
"server"
OnClientClick=
"javascript:fnUpdate();return false;"
>
</asp:Button>
<asp:Button ID=
"btnCancel"
Text=
"Cancel"
runat=
"server"
CausesValidation=
"False"
CommandName=
"Cancel"
></asp:Button>
</div>
using
System;
using
System.Data;
using
System.Configuration;
using
System.Collections;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
using
Telerik.Web.UI;
public
partial
class
control_WebUserControl : System.Web.UI.UserControl
{
private
object
_dataItem =
null
;
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
//protected void Button1_Command(object sender, CommandEventArgs e)
//{
// //
//}
protected
void
_radAjManager_AjaxRequest(
object
sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
_lblstatus.Text =
"Done...."
;
}
public
object
DataItem
{
get
{
return
this
._dataItem;
}
set
{
this
._dataItem = value;
}
}
}
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
CssClass
=
"ajaxloader"
runat
=
"server"
InitialDelayTime
=
"0"
Transparency
=
"25"
MinDisplayTime
=
"0"
BackColor
=
"#474747"
Skin
=
"Metro"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"txtMiktar"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"txtTutar"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"txtBirimFiyat"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"txtTutar"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"txtTutar"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"txtBirimFiyat"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
td
>
<
span
>
<
telerik:RadNumericTextBox
ID
=
"txtMiktar"
runat
=
"server"
NumberFormat-DecimalDigits
=
"3"
AutoPostBack
=
"true"
OnTextChanged
=
"txtMiktar_TextChanged"
Culture
=
"Turkish (Turkey)"
MinValue
=
"0"
LabelCssClass
=
""
Width
=
"70px"
Value
=
"0"
></
telerik:RadNumericTextBox
>
</
span
>
</
td
>
<
td
>
<
span
>
<
telerik:RadTextBox
ID
=
"txtBirimKod"
runat
=
"server"
Enabled
=
"false"
Width
=
"80px"
></
telerik:RadTextBox
>
</
span
>
</
td
>
<
td
>
<
span
>
<
telerik:RadNumericTextBox
ID
=
"txtBirimFiyat"
NumberFormat-DecimalDigits
=
"4"
AutoPostBack
=
"true"
OnTextChanged
=
"txtBirimFiyat_TextChanged"
runat
=
"server"
Culture
=
"Turkish (Turkey)"
MinValue
=
"0"
LabelCssClass
=
""
Width
=
"70px"
Value
=
"0"
></
telerik:RadNumericTextBox
>
</
span
>
</
td
>
<
td
>
<
span
>
<
telerik:RadNumericTextBox
ID
=
"txtTutar"
NumberFormat-DecimalDigits
=
"4"
AutoPostBack
=
"true"
OnTextChanged
=
"txtTutar_TextChanged"
runat
=
"server"
Culture
=
"Turkish (Turkey)"
MinValue
=
"0"
LabelCssClass
=
""
Width
=
"70px"
Value
=
"0"
></
telerik:RadNumericTextBox
>
<
telerik:RadTextBox
ID
=
"txtGuncelleId"
runat
=
"server"
Visible
=
"false"
Text
=
""
></
telerik:RadTextBox
>
</
span
>
</
td
>
I tried to open RadWindow from RadTileList in OnClientTileClicked event.
RadWindow is opening, however, then it is closed and result shows in same window as RadTileList
function OnClientTileClicked(tileList, args) {
var tile = args.get_tile();
var url = args.get_oldValue();
//confirm navigation if url has been specified
if (url !== "") {
var oManager = GetRadWindowManager();
var oWnd = oManager.getWindowByName("RadWindow1");
if (oWnd === null) {
oWnd = oManager.open(url, "RadWindow1");
}
else
{
oWnd.setUrl(url);
}
args.set_cancel(true);
}
//request navigation url to be set
else {
tile.set_navigateUrl(prompt("No url specified. Please enter a navigation url:"));
}
}
function RadWindowOnClientClose(sender, args) {
if (args.get_argument() !== null) {
}
}
<
telerik:RadTileList
ID
=
"RadTileList1"
runat
=
"server"
Skin
=
"Office2007"
Width
=
"930px"
Height
=
"500px"
OnClientTileClicked
=
"OnClientTileClicked"
AutoPostBack
=
"false"
SelectionMode
=
"Single"
ScrollingMode
=
"Auto"
>
<
Groups
>
<
telerik:TileGroup
>
<
telerik:RadTextTile
runat
=
"server"
NavigateUrl
=
"/Kodes/Algemeen/Komplexen.aspx"
Target
=
"_self"
Title-ImageUrl
=
"/images/filetypes/access.gif"
Title-Text
=
"Wat is gewijzigd"
Text
=
"Hier komen de wijzigingen. Dit is een test van een heel lange omschrijving."
Shape
=
"Wide"
>
<
Badge
Value
=
"22"
/>
</
telerik:RadTextTile
>
<
telerik:RadImageAndTextTile
runat
=
"server"
ImageUrl
=
"~/Images/FileTypes/Powerpoint24.png"
Title-ImageUrl
=
"/images/filetypes/access.gif"
Title-Text
=
"Gewijzigde prioriteiten kandidaat-huurders"
Text
=
"27 aanpassingen"
Shape
=
"Wide"
>
</
telerik:RadImageAndTextTile
>
<
telerik:RadTextTile
ID
=
"RadTextTile1"
runat
=
"server"
Title-Text
=
"Gewijzigde prioriteiten kandidaat-huurders"
Text
=
"27 aanpassingen"
>
</
telerik:RadTextTile
>
</
telerik:TileGroup
>
</
Groups
>
</
telerik:RadTileList
>
Any idea ?
Best regards,
Guy Van Dyck
Guynius Software
This article describes what to do to fix IE11 when you use the RadCompression and .browser file implementation of Hidden field viewstate compression. When we were fixing this issue we found that the solution doesn't work for certain builds/versions of IE11, specifically the version shipped on touch devices. The userAgent string has additional attributes that interrupt the string from matching the RegEx in the IE11 browser node. We modified the expression to the following and it successfully corrected our issue on touch and non-touch versions of IE:
<browser id="IE11" parentID="Mozilla">
<identification>
<userAgent match="Trident\/7.0;(?:(?: Touch;)?(?: \w*;)?)? rv:(?:(?'major'\d+)(\.(?'minor'\d+)?)(?'letters'\w*))(?'extra'[^)]*)" />
<userAgent nonMatch="IEMobile" />
</identification>
Hope this helps anyone that may run into that scenario.