Hello. I have a modal popup RadWindow being used as an edit form. This RadWindow is launched from a row in a RadGrid. Everything works great, except when the user finishes with the RadWindow and it closes, the calling RadGrid successfully does a rebind, but it doesn't visually update on the screen. The auto-refreshing the RadGrid works great for other uses such as deleting a record, or updating a record, but not when the rebind code runs upon returning from the modal RadWindow. When the radwindow closes, it triggers the RadAjaxManager1_AjaxRequest which does the rebind operation. That runs just fine. The only thing not happening is the rendering of the screen so the user sees the updated data in the radgrid.
Anyone have any ideas why this would be happening or way to force the re-rendering of the screen/radgrid?
This is the script on the source page:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function refreshGrid(arg) {
if (!arg) {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
</script>
</telerik:RadCodeBlock>
This gets calls when the popup closes:
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest If e.Argument = "Rebind" Then rgVehicleConfig.DataSource = Nothing rgVehicleConfig.Rebind() End If End Sub
This is the script on the popup aspx page:
<script type="text/javascript">
function CloseAndRebind(args)
{
GetRadWindow().BrowserWindow.refreshGrid(args);
GetRadWindow().close();
document.getElementById("frmSequencingAreas").submit();
}
function Close(args)
{
GetRadWindow().close();
}
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 as well)
return oWindow;
}
</script>
Finally, this is the code for the final import of the data that closes the RadWindow and returns to the calling page:
Private Sub rgVehicleConfiguration_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles rgVehicleConfiguration.ItemCommand
If e.CommandName = "Export" Then
If ErrorsFound Then
lblMessage.Text = "Highlighted values are invalid. Please correct and try importing file again.</br>Data cannot be imported until all errors are corrected."
Else
ExportData()
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", True)
ShowPopup = False
End If
End If
End Sub
Most of this code was lifted from Telerik's own demo and that seems to work just fine here on the Telerik demo site.
Any help would be wonderful.
Thank you.
Hi,
i open a radwindow fro ma button inside a templatecolumn in a detailtable.
In the radwindow i have a radbutton when i click it the OnClick event doesn't fire.
Here the code.
<%@ Page Title="" Language="C#" MasterPageFile="~/SiteT.Master" AutoEventWireup="true" CodeBehind="AnalisiExc.aspx.cs" Inherits="IPadAdmin.AnalisiExc" %>
Dear Telerik Team,
We have purchased Telerik UI for ASP.NET AJAX UI 2010.1519. Now we are facing vulnerable issues as it is using jQuery 1.4.2.
One of the Telerik doc tells that
When Telerik upgraded jQuery version to 3.3.1, it faces incompatibilities with the MS AJAX framework and its __doPostBack() method. Due to which, Telerik downgraded jQuery version Telerik UI for ASP.NET AJAX R1 2019 - present are using a modified jQuery version 1.12.4 that includes security vulnerability backport fixes.
Is there a fix to overcome this issue other than upgrading the Telerik version to 2019 or greater?
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Linq.aspx.vb" Inherits="CreatePAth.Linq" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function stopPostBack() {
return true;
}
function openAssayErrors() {
var wnd = $find("<%=winAssayErrors.ClientID%>");
wnd.show();
return false;
}
function closeAssayErrors() {
var wnd = $find("<%=winAssayErrors.ClientID%>");
wnd.close();
return false;
}
function RefreshParentPage() {
document.location.reload();
}
function stopPostback() {
return true;
}
</script>
</telerik:RadCodeBlock>
</head>
<body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnCloseWinx">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnSelectComment">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="btnSelectComment" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="bAssayErrors">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="bAssayErrors" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="RadGrid1" AllowAutomaticUpdates="True"
RenderMode="Lightweight" runat="server" AllowSorting="True" ShowStatusBar="true" AutoGenerateColumns="False"
EnableHeaderContextMenu="True"
Height="220"
ViewStateMode="Enabled"
EnableViewState="true">
<ClientSettings>
<Scrolling AllowScroll="true" FrozenColumnsCount="14" SaveScrollPosition="true" UseStaticHeaders="true" />
</ClientSettings>
<MasterTableView HeaderStyle-ForeColor="White" EnableColumnsViewState="false" AllowAutomaticUpdates="true" AllowSorting="True" EnableLinqGrouping="False" GroupsDefaultExpanded="False" Width="100%" TableLayout="fixed" DataKeyNames="Item, ErrorSamples">
<Columns>
<telerik:GridBoundColumn DataField="Item" FilterControlAltText="Item" HeaderText="Item" UniqueName="Item" AllowFiltering="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderStyle-Width="150px" HeaderText="Error Samples" DataField="ErrorSamples" UniqueName="ErrorSamples">
<ItemTemplate>
<telerik:RadButton ID="bAssayErrors" ButtonType="LinkButton" Width="80px" AutoPostBack="true" OnClientClicked="openAssayErrors" CommandName="SelectAssayErrors" runat="server" Text='<%# Eval("ErrorSamples") %>'></telerik:RadButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<div>
<asp:Label ID="lblmessage" runat="server" Text=""></asp:Label>
</div>
<telerik:RadWindow ID="winAssayErrors" runat="server" Modal="true" VisibleTitlebar="True" VisibleStatusbar="false"
ReloadOnShow="true"
ShowContentDuringLoad="false"
Width="950px" Height="500px"
Title="List by Assay" Style="z-index: 100001;">
<ContentTemplate>
<div>
<table>
<tr>
<td>
<asp:Label ID="lblAssayName" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td>
<telerik:RadGrid ID="rgAssays" AllowAutomaticUpdates="True"
RenderMode="Lightweight" Skin="Default" runat="server" AllowSorting="True" ShowStatusBar="true" AutoGenerateColumns="False" OnItemDataBound="rgAssays_ItemDataBound" OnItemCommand="rgAssays_ItemCommand"
EnableHeaderContextMenu="True"
Height="220px"
Width="900px"
ViewStateMode="Enabled"
EnableViewState="true">
<ClientSettings>
<Scrolling AllowScroll="true" FrozenColumnsCount="14" SaveScrollPosition="true" UseStaticHeaders="true" />
</ClientSettings>
<MasterTableView HeaderStyle-BackColor="" EnableColumnsViewState="false" AllowAutomaticUpdates="true"
AllowSorting="True" EnableLinqGrouping="False" GroupsDefaultExpanded="False" Width="100%" TableLayout="fixed" ShowFooter="true"
DataKeyNames="AssayName, NoSamples, OKSamples">
<Columns>
<telerik:GridBoundColumn DataField="AssayName" FilterControlAltText="AssayID" HeaderText="AssayName" UniqueName="AssayName" AllowFiltering="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NoSamples" FilterControlAltText="NoSamples" Display="true" HeaderText="# Samples" UniqueName="NoSamples" AllowFiltering="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OKSamples" FilterControlAltText="OKSamples" HeaderText="Ok Samples" UniqueName="OKSamples" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Comments" FilterControlAltText="Comments" HeaderText="Comments" UniqueName="Comments" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderStyle-Width="150px" HeaderText="Reprocess" DataField="Reprocess" UniqueName="Reprocess">
<ItemTemplate>
<telerik:RadCheckBox ID="chkReprocess" AutoPostBack="false" Width="80px" runat="server"></telerik:RadCheckBox>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderStyle-Width="250px" HeaderText="RPNote" DataField="RPNote" UniqueName="RPNote">
<ItemTemplate>
<telerik:RadComboBox runat="server" ID="cbRPNote" Height="300px" Width="100px "
DropDownWidth="500"
ViewStateMode="Enabled"
MarkFirstMatch="true"
HighlightTemplatedItems="True"
EmptyMessage="select"
CheckBoxes="false"
AllowCustomText="false"
Style="z-index: 200001;">
<HeaderTemplate>
<table style="width: 500px; text-align: left">
<tr>
<td style="width: 50px;">ID</td>
<td style="width: 200px;">Spec. Comments</td>
<td style="width: 200px;">User Comments</td>
<td style="width: 80px;"></td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 550px; text-align: left; float: right;">
<tr>
<td style="width: 50px;">
<asp:Label ID="Rejection_ID" runat="server" Text='<%# Eval("Rejection_ID") %>'></asp:Label>
</td>
<td style="width: 200px;">
<asp:Label ID="Txt_Description" runat="server" Text='<%# Eval("Txt_Description") %>'></asp:Label>
</td>
<td style="width: 200px;">
<asp:TextBox ID="txt_RPNote" runat="server" Text=""></asp:TextBox>
</td>
<td style="width: 80px;">
<telerik:RadButton ID="btnSelectComment" OnClick="btnSelectComment_Click" runat="server" Text="Select"></telerik:RadButton>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="Label1" runat="server" Text=" Do Server stuff and return.... "></asp:Label>
<telerik:RadButton ID="imRP" runat="server" Text="Reprocess" OnClick="imRP_Click" CommandName="Reprocess"></telerik:RadButton>
<telerik:RadButton ID="btnCloseWinx" runat="server" Text="Close"></telerik:RadButton>
</FooterTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</telerik:RadWindow>
</div>
</form>
</body>
</html>
Imports Telerik.Web.UI Public Class Linq Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Page.IsPostBack = False Then Dim AssysGroup = New List(Of Assays) _ From {New Assays With {.AssayName = "C6", .NoSamples = "12", .OKSamples = "1", .Comments = "OK", .Reprocess = True}, New Assays With {.AssayName = "Crtert", .NoSamples = "5", .OKSamples = "2", .Comments = "OK", .Reprocess = False}, New Assays With {.AssayName = "POWEB", .NoSamples = "2", .OKSamples = "1", .Comments = "OK", .Reprocess = False}, New Assays With {.AssayName = "POWELISA", .NoSamples = "4", .OKSamples = "0", .Comments = "fds", .Reprocess = False}, New Assays With {.AssayName = "CTT", .NoSamples = "3", .OKSamples = "0", .Comments = "", .Reprocess = False}, New Assays With {.AssayName = "POWEA", .NoSamples = "5", .OKSamples = "1", .Comments = "", .Reprocess = False}} rgAssays.DataSource = AssysGroup rgAssays.DataBind() Dim MainGrid = New List(Of sItems) _ From {New sItems With {.Item = "AAA", .ErrorSamples = 10}, New sItems With {.Item = "BBB", .ErrorSamples = 12}, New sItems With {.Item = "CCC", .ErrorSamples = 0}, New sItems With {.Item = "DDD", .ErrorSamples = 0}} RadGrid1.DataSource = MainGrid RadGrid1.DataBind() End If End Sub Private Class Assays Property AssayID As String Property AssayName As String Property NoSamples As String Property OKSamples As String Property Comments As String Property Reprocess As Boolean End Class Private Class sItems Property Item As String Property ErrorSamples As String End Class Protected Sub rgAssays_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) If TypeOf e.Item Is GridDataItem Then Dim gridItem As GridDataItem = TryCast(e.Item, GridDataItem) Dim dt As DataTable = New DataTable() Dim combo As RadComboBox combo = gridItem.FindControl("cbRPNote") dt.Columns.Add("Rejection_ID", GetType(Integer)) dt.Columns.Add("Txt_Description", GetType(String)) dt.Columns.Add("txt_RPNote", GetType(String)) dt.Rows.Add(1, "Not enough solution", "") dt.Rows.Add(2, "Positve Result", "") dt.Rows.Add(3, "Damage Specimen", "") dt.Rows.Add(4, "Equipment failute", "") dt.Rows.Add(5, "User mistake", "") combo.DataTextField = "Txt_Description" combo.DataValueField = "Rejection_ID" combo.DataSource = dt combo.DataBind() End If End Sub Protected Sub rgRPNote_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) Dim val As String = e.Text End Sub Protected Sub btnSelectComment_Click(sender As Object, e As EventArgs) Dim button As RadButton = CType(sender, RadButton) Dim s As String = CType(button.NamingContainer.FindControl("Txt_Description"), Label).Text Dim s1 As String = CType(button.NamingContainer.FindControl("txt_RPNote"), TextBox).Text CType(button.NamingContainer.Parent, RadComboBox).Text = s1 End Sub Protected Sub imRP_Click(sender As Object, e As EventArgs) For Each item As GridDataItem In rgAssays.Items Dim chkRP As RadCheckBox = CType(item.FindControl("chkReprocess"), RadCheckBox) If chkRP.Checked = False Then lblmessage.Text = "Please Enter an RPNote for Items to be reprocess" lblmessage.Focus() Exit Sub End If If CType(item.FindControl("cbRPNote"), RadComboBox).Text.Length > 0 Then Dim s As String = "yea doing long background work" End If Next End Sub End Class
function PendingRowSelected(row) {
var guid = $find("<%=PendingRadGrid.ClientID%>").get_masterTableView().get_selectedItems()[0].getDataKeyValue("Guid");
var radWindow = Quest.Utilities.WindowUtil.openRADWindow("PendingEditWindow", "Portlets/ConnectData/PendingEdit.aspx?id=" +guid); //radWindow value as undefined
radWindow.Restore();
var close = document.getElementById("CloseButton" + radWindow.Id);
close.onclick = CloseRadWindow;
}
Can anyone please help to resolve?
When I installed the old offline package (TelerikUIForWinFormsSetup.exe), it showed "Internet Connective Failure" error. Please check the attached screenshot. Would you please help me? Thanks.
Hello!
I am attempting to send the an ID value from one RadGrid Row to a RadGrid in a modal window as a DataKey using rowIndex.
I sucessfully get the cell value but right now it is just sending it to OwnerTableView rather than my modal window grid.
aspx.cs code:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
I only want the modal Grid to populate with values that also have that ID (multiple values).
Any thoughts on this?
Hello.
I'm using CommandItem built in Insert button to open a window with a form to insert new values.
<telerik:RadWindow ID="UserListDialog" runat="server" Title="Atualizar listagem" Height="400px" OnClientClose="OnClientCloseHandler"
Width="800px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false" DestroyOnClose="true"
Modal="true"
Behaviors="Close,Move,Resize" CssClass="opaque" KeepInScreenBounds="True" >
<ContentTemplate>
<uc1:ViewEmissaoTimeSheetEdit ID="EditTimesheet" runat="server" />
</ContentTemplate>
</telerik:RadWindow>
<CommandItemTemplate>
<telerik:RadButton CommandName="InitInsert" RenderMode="Lightweight" ID="AddNewRecordButton" Text="Adicionar nova versão" ToolTip="Adicionar versão"
runat="server" style="background:none; border:none; color:green;">
<Icon PrimaryIconCssClass="rbAdd"></Icon>
</telerik:RadButton>
The problem is, when i use Validators in my form atributtes, the form doesn't open when clicking the insert button.
Validators structure in my form (contained in a user control)
<telerik:RadTextBox ID="txtAssinaturaTimesheet" runat="server" MaxLength="30" Width="220px">
</telerik:RadTextBox>
<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtAssinaturaTimesheet" Display="Static"
CssClass="ValidationFont" Text="Campo Obrigatório!" Font-Size="Medium" ></asp:RequiredFieldValidator> --%>
It is a common issue? How can i overcome it?
Hello
I'm trying to perform insert operation in a RadWindow. My scenario integrates the searchbox selected value, which should not be editable and automatically filled in insert, and for the rest, the normal empty fields, including the primary key.
I've already done the edit operation, with the following structure, but i cannot modify properly to the insert. Besides, when i push Insert button, i get the last assinged values, as the radwindow does not perform reload
Could you help me please?
public void SaveFile(object sender, EventArgs e) { ListagemTimesheet model = new ListagemTimesheet(); model.IDRH = Convert.ToInt32(rdpIE.Text); model.IDState = Convert.ToInt32(rcbEstado.SelectedValue); model.Obs = Obstxt.Text; model.Assin = txtAssin.Text; model.Date = Date.SelectedDate.Value; if (Objecto.ID > 0) { model.ID = Convert.ToInt32(FileID.Text); if (!string.IsNullOrEmpty(FileID.Text) && Convert.ToInt32(FileID.Text) > 0) { model.ID = Convert.ToInt32(FileID.Text); bll.UpdateFile(model); } else { } } else //Insert //Command item events if (e.CommandName == "EditItem") { try { string script = "function f(){openRadWindow(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true); e.Canceled = true; int idts= int.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString()); Dataclass ts= bll.GetFileByID(idts); Editform.Object = ts; Editform.DataBind(); grid.Rebind(); } catch (System.Exception) { } } if (e.CommandName == "InsertItem") //help
Hello,
To provide a bit of background, I have a page which refreshes it's data every two seconds but doesn't actually visibly refresh (By using a RadAjaxPanel). I'd like to click a button on a data row and populate the data from that row into a RadWindow (Like an edit dialog), and also have additional buttons in that dialog for various operations.
I have a RadWindow and code attached to a button which should set the RadWindow to be visible, however the RadWindow does not appear.
Example Code:
In Example.aspx -
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Style="width: 100%">
//////Some MasterTableViews and RadGrids with various data here with buttons to pop up an edit dialog////
</telerik:RadAjaxPanel>
<telerik:radwindow runat="server" id="RadWindow1" Visible="False">
<ContentTemplate>
<asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" Text="I am an example" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</telerik:radwindow>
In Example.aspx.cs
protected void RadGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
this.RadWindow1.Visible= true;
}
When I click the button in the RadGrid to set the RadWindow to be visible, the .cs code executes but the RadWindow does not appear on the page.
Any help will be much appreciated.
Thanks,
Jack