or
private void InsertLocations() { Telerik.Web.UI.GridItemCollection gic = this.RadGrid2.SelectedItems; foreach (Telerik.Web.UI.GridItem gi in gic) { string location = DataBinder.Eval(gi.DataItem, "Location").ToString(); } }function tsCoding_OnClientTabSelected(sender, args) {
var tab = args.get_tab();
if (tab.get_tabs().get_count() != 0) {
tab.get_tabs().getTab(0).enable();
tab.get_tabs().getTab(0).select();
}
}
<%@ Page Language="C#" MasterPageFile="~/MasterPageDialogs.master" AutoEventWireup="true" CodeFile="Photos.aspx.cs" Inherits="Dialogs_Photos" %> <%@ MasterType VirtualPath="~/MasterPageDialogs.master" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentHead" Runat="Server"> <link href="../Rotator.css" rel="stylesheet" type="text/css" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentBody" Runat="Server"> <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"></telerik:RadAjaxManagerProxy> <script type="text/javascript"> function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well) return oWindow; } function CloseOnReload() { GetRadWindow().VisibleOnPageLoad = false; GetRadWindow().close(); } function RefreshParentPage() { GetRadWindow().BrowserWindow.location.href = GetRadWindow().BrowserWindow.location.href; } </script> <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="thumbRotator"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="imgPhoto" /> <telerik:AjaxUpdatedControl ControlID="detailsPanel" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="ibtnSavePhoto"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ibtnSavePhoto" /> <telerik:AjaxUpdatedControl ControlID="thumbRotator" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="ibtnDeletePhoto"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ibtnDeletePhoto" /> <telerik:AjaxUpdatedControl ControlID="thumbRotator" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy> <asp:Label ID="lblPhotoType" runat="server" Text="" style="display:none"></asp:Label> <asp:Label ID="lblPhotoKey" runat="server" Text="" style="display:none"></asp:Label> <asp:Label ID="lblPhotoSubKey" runat="server" Text="" style="display:none"></asp:Label> <table width="743" cellpadding="0" cellspacing="0" border="0"> <tr> <td style="height: 22px"> <img src="../Images/Rotator/white.gif" height="22" width="60" alt="" style="float: left;" /></td> <td style="height: 22px"> <img src="../Images/Rotator/cornerLeftTop.gif" height="22" width="50" alt="" style="float: left;" /></td> <td style="height: 22px"> <img src="../Images/Rotator/topLeft.gif" height="22" width="292" alt="" style="float: left;" /></td> <td style="height: 22px"> <img src="../Images/Rotator/topRight.gif" height="22" width="280" alt="" style="float: left;" /></td> <td style="height: 22px"> <img src="../Images/Rotator/cornerRightTop.gif" height="22" width="62" alt="" style="float: left;" /></td> </tr> <tr> <td> <img src="../Images/Rotator/whiteMiddle.gif" height="243" width="60" alt="" style="float: left;" /></td> <td> <img src="../Images/Rotator/leftFrame.gif" height="243" width="50" alt="" style="float: left;" /></td> <td class="previewPane"> <div style="margin-top: 20px"> <telerik:RadBinaryImage ID="imgPhoto" runat="server" Height="192" Width="192" ResizeMode="Fit" ImageAlign="Middle" /> </div> </td> <td class="infoPane"> <div class="infoPaneBg" runat="server" id="detailsPanel"> <div class="imageDetailsHeader"> <table width="100%"> <tr> <td width="70%"> Image details: </td> <td width="15%" align="center"> <asp:ImageButton ID="ibtnSavePhoto" runat="server" ImageUrl="~/Images/Save.png" onclick="ibtnSavePhoto_Click" /> </td> <td width="15%" align="center"> <asp:ImageButton ID="ibtnDeletePhoto" runat="server" ImageUrl="~/Images/Delete.png" onclick="ibtnDeletePhoto_Click" /> </td> </tr> </table> </div> <div id="viewPanel"> <div class="details"> <strong>Title:</strong> <asp:Label ID="lblPhotoID" runat="server" Text="" style="display:none"></asp:Label> <asp:TextBox ID="txtPhotoTitle" runat="server" Text=""></asp:TextBox> </div> <div class="details"> <strong>Description:</strong> <asp:TextBox ID="txtPhotoDescription" runat="server" Text=""></asp:TextBox> </div> <div class="details"> </div> <div class="details" style="margin-top: 5px; margin-left: 28px"> </div> </div> </div> </td> <td> <img src="../Images/Rotator/rightFrame.gif" height="243" width="62" alt="" style="float: left;" /></td> </tr> <tr> <td> <img src="../Images/Rotator/whiteShadow.gif" height="117" width="60" alt="" /></td> <td> <img src="../Images/Rotator/left.gif" id="img_left" height="117" width="50" alt="" style="cursor: pointer" /></td> <td colspan="2" class="thumbsViewer"> <telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="ButtonsOver" Width="572" Height="118px" ItemHeight="118" ItemWidth="145" FrameDuration="1" ScrollDirection="Left,Right" DataSourceID="dsThumbnails" OnItemClick="ShowImage"> <ItemTemplate> <div class="itemTemplate"> <asp:Label runat="server" ID="lblPhotoID" Text='<%# Eval("PhotoID") %>' style="display:none"></asp:Label> <asp:Label runat="server" ID="lblTitle" Text='<%# Eval("Title") %>' style="display:none"></asp:Label> <asp:Label runat="server" ID="lblDescription" Text='<%# Eval("Description") %>' style="display:none"></asp:Label> <telerik:RadBinaryImage ID="imgHiddenPhoto" runat="server" DataValue='<%# Eval("PhotoFile") %>' style="display:none"/> <telerik:RadBinaryImage ID="imgThumbnail" runat="server" DataValue='<%# Eval("Thumbnail") %>' Height="118px" Width="118px" ResizeMode="Fit" CssClass="RotatorImage" AlternateText='<%# Eval("Title") %>' ToolTip='<%# Eval("Title") %>' /> </div> </ItemTemplate> <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" /> </telerik:RadRotator> </td> <td> <img src="../Images/Rotator/right.gif" id="img_right" height="117" width="62" alt="" style="cursor: pointer" /></td> </tr> </table> <asp:SqlDataSource ID="dsThumbnails" runat="server" ConnectionString="<%$ ConnectionStrings:EventMgmtCSDev %>" SelectCommand="SELECT [PhotoID], [Thumbnail], [PhotoFile], [Title], [Description] FROM [Photos] WHERE (([PhotoKey] = @PhotoKey) AND ([PhotoType] = @PhotoType) AND ([PhotoSubKey] = @PhotoSubKey))"> <SelectParameters> <asp:ControlParameter ControlID="lblPhotoKey" Name="PhotoKey" PropertyName="Text" Type="Int64" /> <asp:ControlParameter ControlID="lblPhotoType" Name="PhotoType" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="lblPhotoSubKey" Name="PhotoSubKey" PropertyName="Text" Type="Int64" /> </SelectParameters> </asp:SqlDataSource> <br /> <asp:Button ID="btnUploadPhotos" runat="server" Text="Upload Photos"/> <telerik:RadToolTip ID="ToolTipAddQuote" runat="server" Width="300px" Height="300px" TargetControlID="btnUploadPhotos" Position="Center" RelativeTo="BrowserWindow" HideEvent="ManualClose" ShowEvent="OnClick" Animation="Slide" AnimationDuration="1000"> <telerik:RadProgressManager runat="server" ID="RadProgressManager1" /> <table width="90%"> <tr> <td> <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic" TemporaryFileExpiration="0:15:00"> </telerik:RadAsyncUpload> </td> <td align="right"> <asp:Button ID="btnUpload" runat="server" Text="Upload Selected Files" onclick="btnUpload_Click" /> </td> </tr> </table> <telerik:RadProgressArea runat="server" ID="RadProgressArea1"> </telerik:RadProgressArea> </telerik:RadToolTip> </asp:Content> using System; using System.Data; using System.Data.SqlClient; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Telerik.Web.UI; public partial class Dialogs_Photos : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblPhotoType.Text = HttpContext.Current.Request.QueryString["PhotoType"]; lblPhotoKey.Text = HttpContext.Current.Request.QueryString["PhotoKey"]; lblPhotoSubKey.Text = HttpContext.Current.Request.QueryString["PhotoSubKey"]; } } protected void ShowImage(object sender, RadRotatorEventArgs e) { if (e.Item is RadRotatorItem) { RadRotatorItem rotatorItem = (RadRotatorItem)e.Item; string PhotoID = (rotatorItem.FindControl("lblPhotoID") as Label).Text; string strTitle = (rotatorItem.FindControl("lblTitle") as Label).Text; string strDescription = (rotatorItem.FindControl("lblDescription") as Label).Text; RadBinaryImage thumbNail = (rotatorItem.FindControl("imgHiddenPhoto") as RadBinaryImage); imgPhoto.ImageUrl = thumbNail.ImageUrl; lblPhotoID.Text = PhotoID; txtPhotoTitle.Text = strTitle; txtPhotoDescription.Text = strDescription; } } protected void btnUpload_Click(object sender, EventArgs e) { foreach (UploadedFile f in AsyncUpload1.UploadedFiles) { byte[] photo = EM_Functions.GetFileBytes(f.InputStream); photo = EM_Functions.ResizeImage(photo, 400); byte[] thumbnail = EM_Functions.ResizeImage(photo, 115); string fileType = EM_Functions.GetFileType(f.FileName); EM_Data.UploadPhoto(lblPhotoType.Text, int.Parse(lblPhotoKey.Text), int.Parse(lblPhotoSubKey.Text), photo, thumbnail, f.FileName, fileType, photo.Length, f.FileName, User.Identity.Name); } AsyncUpload1.Dispose(); thumbRotator.DataBind(); } protected void ibtnDeletePhoto_Click(object sender, ImageClickEventArgs e) { EM_Data.DeletePhoto(int.Parse(lblPhotoID.Text)); thumbRotator.DataBind(); } protected void ibtnSavePhoto_Click(object sender, ImageClickEventArgs e) { EM_Data.SavePhoto(int.Parse(lblPhotoID.Text), txtPhotoTitle.Text, txtPhotoDescription.Text); thumbRotator.DataBind(); } }public static void LoadGridConfiguration(RadGrid pRdg, long pIdGruppoUtente, bool loadDefaultString = false) { GridSettingsPersister gsp = new GridSettingsPersister(pRdg); using (DMWEntities context = new DMWEntities()) { long idControlloAspx = (from ctrl in context.ControlliAspx where (ctrl.NomeControllo == pRdg.ID) select ctrl.IdControlloAspx).SingleOrDefault(); if (idControlloAspx == 0) { throw new Exception("Grid Control not defined in database [ControlliAspx]"); } var stringaConfigurazioneGruppoUtente = (from pg in context.ProprietaGriglie where (pg.IdControlloAspx == idControlloAspx) && (pg.IdGruppoUtente == pIdGruppoUtente) select new { pg.StringaConfigurazione, pg.StringaConfigurazioneDefault }).FirstOrDefault(); if (loadDefaultString) { gsp.LoadSettings(stringaConfigurazioneGruppoUtente.StringaConfigurazioneDefault); } else { gsp.LoadSettings(stringaConfigurazioneGruppoUtente.StringaConfigurazione); } } }protected void btnPersistConfiguration_Clicked(object sender, EventArgs e) { MachinaWeb.ServerControls.RadPageView paginaConComboIdGruppoUtente = (MachinaWeb.ServerControls.RadPageView)((System.Web.UI.Control)MachinaWeb.ServerControls.Utility.FindControlType((Control)sender, typeof(MachinaWeb.ServerControls.RadPageView))); MachinaWeb.ServerControls.RadGrid gridUC = (MachinaWeb.ServerControls.RadGrid)((System.Web.UI.Control)MachinaWeb.ServerControls.Utility.FindControlType((Control)sender, typeof(MachinaWeb.ServerControls.RadGrid))); long selectedGU = long.Parse( ((RadComboBox)paginaConComboIdGruppoUtente.FindControl("blccmbGruppoUtente")).SelectedValue ); //MessageBox.ShowTelerik(Page, this, "Configurazione salvata (Id Gruppo " + blccmbGruppoUtente.SelectedValue + ")"); string gridName = gridUC.ID; using (DMWEntities context = new DMWEntities()) { long idControlloAspx = (from ctrl in context.ControlliAspx where (ctrl.NomeControllo == gridName) select ctrl.IdControlloAspx).SingleOrDefault(); if (idControlloAspx == 0) { throw new Exception("Grid Control not defined in database [ControlliAspx]"); } var propGriglia = (from pg in context.ProprietaGriglie where (pg.IdControlloAspx == idControlloAspx) && (pg.IdGruppoUtente == selectedGU) select pg).FirstOrDefault(); GridSettingsPersister gsp = new GridSettingsPersister(gridUC); string stringaConfigurazioneVista = gsp.SaveSettings(); if (propGriglia == null) { //Creates row in database [Proprieta griglie] ProprietaGriglie pgNew = new ProprietaGriglie() { IdGruppoUtente = selectedGU, NomeGriglia = gridName, StringaConfigurazione = stringaConfigurazioneVista, IdControlloAspx = idControlloAspx, DataCreazione = DateTime.Now, DataAggiornamento = DateTime.Now, IdUtente = ((SessionInformation)Session["sessionData"]).IdUtente }; context.ProprietaGriglie.AddObject(pgNew); context.SaveChanges(); } else { //Updates row [Proprieta griglie] var pg = (from pgUpd in context.ProprietaGriglie where (pgUpd.IdControlloAspx == idControlloAspx) && (pgUpd.IdGruppoUtente == selectedGU) select pgUpd).Single(); pg.StringaConfigurazione = stringaConfigurazioneVista; context.SaveChanges(); } } }public partial class Configurazione_VisteTabellari : System.Web.UI.Page{ private RadGrid rdg = new RadGrid(); protected void Page_Init(object sender, EventArgs e) { hfdIdCultura.Value = ((SessionInformation)Session["sessionData"]).IdCultura.ToString(); } protected override void InitializeCulture() { System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(((SessionInformation)Session["sessionData"]).Cultura); System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(((SessionInformation)Session["sessionData"]).Cultura); base.InitializeCulture(); } protected void Page_Load(object sender, EventArgs e) { //string resource_ModificareLayoutTabella = (string)GetGlobalResourceObject("Resource", "MessaggioModificaLayoutTabella"); using (DMWEntities context = new DMWEntities()) { if (!String.IsNullOrEmpty(hdfIdMascheraSelezionata.Value)) { long idMascheraSelezionata = long.Parse(hdfIdMascheraSelezionata.Value); string urlVisioneTabellare = (from masc in context.Maschere where masc.IdMaschera == idMascheraSelezionata select masc.UrlControlloVistaTabellare).Single<string>(); try { RadGridStabilimenti uc = ((RadGridStabilimenti)LoadControl(urlVisioneTabellare)); uc.Type = CommonParameters.RadGridType.Configurazione; pnlVistaTabellare.Controls.Clear(); pnlVistaTabellare.Controls.Add(uc); } catch (Exception) { } //Loads stringa configurazione di default per la grid //RadGrid gridUC = ((IUserControlGrid)pnlVistaTabellare.Controls[0]).GetGrid(); //if (!Page.IsPostBack) //{ // try // { // Utility.LoadGridConfiguration(gridUC, ((SessionInformation)Session["sessionData"]).IdGruppoUtente, true); // } // catch (ArgumentNullException) // { // } //} string selectedGU = (((SessionInformation)Session["sessionData"]).IdGruppoUtente).ToString(); blccmbGruppoUtente.SelectedValue = selectedGU; blccmbGruppoUtente.DataBind(); //gridUC.DataBind(); } } } protected void rtsPagina_TabClick(object sender, RadTabStripEventArgs e) { rts_Pagina.SelectedIndex = e.Tab.Index; rmp_Pagina.SelectedIndex = e.Tab.Index; } protected void RadGridVisioniTabellari_ItemCreated(object sender, GridItemEventArgs e) { ////Sets filter's textbox width //if (e.Item is GridFilteringItem) //{ // //30px di differenza rispetto alla larghezza della colonna // GridFilteringItem gridFilteringItem = (GridFilteringItem)e.Item; // ((TextBox)(gridFilteringItem["NomeMaschera"]).Controls[0]).Width = Unit.Pixel((int)(900 - CommonParameters.GridFilterWidthDistances)); //} } protected void btnLoadConfiguration_Click(object sender, EventArgs e) { RadGrid gridUC = ((IUserControlGrid)pnlVistaTabellare.Controls[0]).GetGrid(); string gridName = gridUC.ID; GridSettingsPersister gsp = new GridSettingsPersister(gridUC); Utility.LoadGridConfiguration(gridUC, long.Parse(blccmbGruppoUtente.SelectedValue)); }}<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ Register Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" TagPrefix="telerik" %><script runat="server" language="vbscript"> Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click Dim div As New HtmlGenericControl("div") div.Style("height") = "300px" div.Style("border") = "1px solid #f00" Dim edt As New RadEditor() edt.Height = Unit.Pixel(300) edt.OnClientLoad = "function(editor,args){ editor.set_mode(1); }" div.Controls.Add(edt) pnl.Controls.Add(div) End Sub</script><!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></head><body> <form id="form1" runat="server"> <asp:ScriptManager runat="server" /> <asp:Panel runat="server" ID="pnl"> <asp:Button runat="server" ID="btn" Text="Load Controls" /> </asp:Panel> <telerik:RadAjaxManager runat="server" DefaultLoadingPanelID="loading"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="pnl"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="pnl" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel runat="server" ID="loading"> Loading... </telerik:RadAjaxLoadingPanel> </form></body></html>setTimeout(function() { editor.set_mode(1); }, 100);UpdateCommand="UPDATE [tblClass] SET [ClassName] = @ClassName, [FK_CityID] = 2 %> WHERE [PK_ClassID] = @original_PK_ClassID" <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True" Skin="Windows7" AllowAutomaticInserts="True" PageSize="10" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="SessionDataSource1" OnItemUpdated="RadGrid1_ItemUpdated" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted" OnDataBound="RadGrid1_DataBound"> <PagerStyle Mode="NextPrevAndNumeric" /> <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="PK_ClassID" DataSourceID="SessionDataSource1" HorizontalAlign="NotSet" AutoGenerateColumns="False"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"> <ItemStyle CssClass="MyImageButton" /> </telerik:GridEditCommandColumn> <%-- <telerik:GridBoundColumn DataField="PK_ClassID" HeaderText="ID" SortExpression="PK_ClassID" UniqueName="PK_ClassID" ColumnEditorID="GridTextBoxColumnEditor1"> </telerik:GridBoundColumn>--%> <telerik:GridBoundColumn DataField="ClassName" HeaderText="Class Name" SortExpression="ClassName" UniqueName="ClassName" ColumnEditorID="GridTextBoxColumnEditor2"> </telerik:GridBoundColumn> <telerik:GridDropDownColumn DataField="FK_CityID" DataSourceID="SqlDataSource1" HeaderText="City" ListTextField="City" ListValueField="PK_CityID" UniqueName="PK_CityID" ColumnEditorID="GridDropDownColumnEditor1"> </telerik:GridDropDownColumn> <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings ColumnNumber="2" CaptionDataField="FK_CityID" CaptionFormatString="Bearbeiten der Klasse {0}" InsertCaption="Neue Klasse"> <FormTableItemStyle Wrap="False"></FormTableItemStyle> <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle> <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" /> <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" /> <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record" UniqueName="EditCommandColumn1" CancelText="Cancel edit"> </EditColumn> <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> </EditFormSettings> </MasterTableView> <ClientSettings> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> </telerik:RadGrid> <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="200px" /> <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor2" runat="server" TextBoxStyle-Width="150px" /> <telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor1" runat="server" DropDownStyle-Width="110px" /> <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="40px" /> <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager> <br /> <asp:SqlDataSource ID="SessionDataSource1" runat="server" ConnectionString="Server=.\SQLExpress ;Database=IntraIBZ;Trusted_Connection=True;" ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [tblClass]" DeleteCommand="DELETE FROM [tblClass] WHERE [PK_ClassID] = @original_PK_ClassID" InsertCommand="INSERT INTO tblClass(ClassName, FK_CityID) VALUES (@ClassName, @FK_CityID)" UpdateCommand="UPDATE [tblClass] SET [ClassName] = @ClassName, [FK_CityID] = 2 %> WHERE [PK_ClassID] = @original_PK_ClassID" OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues"> <DeleteParameters> <asp:Parameter Name="original_PK_ClassID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="ClassName" Type="String" /> <asp:Parameter Name="FK_CityID" Type="Int32" /> <asp:Parameter Name="original_PK_ClassID" Type="Int32" /> <asp:Parameter Name="PK_CityID" Type="Int32" /> </UpdateParameters> <InsertParameters> </InsertParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Server=.\SQLExpress ;Database=IntraIBZ;Trusted_Connection=True;" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [PK_CityID], [City] FROM [tblCity]"> </asp:SqlDataSource> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function RowDblClick(sender, eventArgs) { sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); } </script> </telerik:RadCodeBlock>