Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
121 views

Hello,

I'm using a RadGrid to update some info and would like to have a part of the Edit Form change background color as a user prompt after an update operation is performed.

The grid uses the NeedDataSource event
The grid uses Edit Form templates
The grid uses the OnUpdateCommand to do manual updates
The Edit Form Template has three divs to display information in three columns, and I would optimally like one of the three to change background color after the update is successfully performed.

I have found that using the ItemDataBound event and formatting using IsPostBack works, but that also updates the background color just on opening the edit form, which I obviously don't want. Do I need to do this on the client side? Do I need to add a querystring, session, or other hidden parameter to pass to check for a successful update? Or am I missing something simple that will check this for me?

Grid and UpdateCommand code:

    <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" OnNeedDataSource="RadGrid1_NeedDataSource"
        IsExporting="False" AutoGenerateColumns="False" OnItemDataBound="RadGrid1_ItemDataBound"  
         OnItemCreated="RadGrid1_ItemCreated" OnUpdateCommand="RadGrid1_UpdateCommand"  
        >
        <MasterTableView Name="Requests" DataKeyNames="RequestID" EditMode="EditForms" >   
            <NoRecordsTemplate>
                No Requests right now!
            </NoRecordsTemplate>

        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

        <Columns>
        <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
             <telerik:GridBoundColumn DataField="RequestID" 
                FilterControlAltText="Filter RequestID column" HeaderText="Request ID" 
                SortExpression="RequestID" UniqueName="RequestID" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="StudentUID" 
                FilterControlAltText="Filter StudentUID column" HeaderText="StudentUID" 
                SortExpression="StudentUID" UniqueName="StudentUID" Visible="false">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Name" UniqueName="StudentName" Visible="true">
            <ItemTemplate>
                <asp:Label ID="lblStudentName" runat="server" Text='<%# Bind("LastName") %>' />, <asp:Label ID="lblStudentFName" runat="server" Text='<%# Bind("FirstName") %> '></asp:Label>
            </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="Campus" 
                FilterControlAltText="Filter Campus column" HeaderText="Campus" 
                SortExpression="Campus" UniqueName="Campus">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AcphsEmail" 
                FilterControlAltText="Filter AcphsEmail column" HeaderText="AcphsEmail" 
                SortExpression="AcphsEmail" UniqueName="AcphsEmail">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="YearOrProgram" 
                FilterControlAltText="Filter YearOrProgram column" HeaderText="Program Year" 
                SortExpression="YearOrProgram" UniqueName="YearOrProgram">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="MeetingName" 
                FilterControlAltText="Filter MeetingName column" HeaderText="Meeting Name" 
                SortExpression="MeetingName" UniqueName="MeetingName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ReimbursementType" 
                FilterControlAltText="Filter ReimbursementType column" 
                HeaderText="Type" SortExpression="ReimbursementType" 
                UniqueName="ReimbursementType">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TotalRequested" DataType="System.Decimal" 
                FilterControlAltText="Filter TotalRequested column" HeaderText="Amt Requested" 
                SortExpression="TotalRequested" UniqueName="TotalRequested" DataFormatString="{0:C}">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DateSubmitted" DataType="System.DateTime" 
                FilterControlAltText="Filter DateSubmitted column" HeaderText="Submitted" 
                SortExpression="DateSubmitted" UniqueName="DateSubmitted">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="RequestStatus" 
                FilterControlAltText="Filter Status column" HeaderText="Status" 
                SortExpression="RequestStatus" UniqueName="RequestStatus">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AmountApproved" DataType="System.Decimal" 
                FilterControlAltText="Filter AmountApproved column" HeaderText="Amt Approved" 
                SortExpression="AmountApproved" UniqueName="AmountApproved" DataFormatString="{0:C}">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="NotifiedOfApproval" 
                FilterControlAltText="Filter NotifiedOfApproval column" 
                HeaderText="Notified?" SortExpression="NotifiedOfApproval" 
                UniqueName="NotifiedOfApproval">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AmountReimbursed" DataType="System.Decimal" 
                FilterControlAltText="Filter AmountReimbursed column" 
                HeaderText="Amt Reimbursed" SortExpression="AmountReimbursed" 
                UniqueName="AmountReimbursed" DataFormatString="{0:C}">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="HasAttachments" HeaderText="Attachments" AllowFiltering="false">
            </telerik:GridBoundColumn>
        </Columns>
    
        <EditFormSettings EditFormType="Template">
        <FormTemplate>
        <div class="container">
        <div class="column-left"> <%--Request Details--%>
        <p>Request Details</p>
        <asp:Label ForeColor="White" Name="RequestID" ID="Label1" runat="server" Text='<%# Bind("RequestID") %>'></asp:Label><br />
        <asp:Label Name="lblAcphsEmail" ID="lblAcphsEmail" runat="server" Text='<%# Bind("AcphsEmail") %>' Visible="false"></asp:Label><br />
            Status: <asp:Label ID="lblStatus" runat="server" Text='<%# Bind("RequestStatus") %>'>
            </asp:Label><br />
    
            Meeting Name: <asp:Label ID="lblMeetingName" runat="server" Text='<%# Bind("MeetingName") %>'>
            </asp:Label><br />

            Reimbursement Type: <asp:Label ID="lblReimbursementType" runat="server" Text='<%# Bind("ReimbursementType") %>'>
            </asp:Label><br />

            Registration Fee: <asp:Label ID="lblRegFee" runat="server" Text='<%# String.IsNullOrEmpty(Eval("RegFee").ToString()) || Eval("RegFee").ToString() == "0.0000" ? "n/a" : string.Format("{0:C}", Eval("RegFee")) %>'>
            </asp:Label><br />

            Transportation Fee: <asp:Label ID="lblTranspoFee" runat="server" Text='<%# String.IsNullOrEmpty(Eval("TranspoFee").ToString()) || Eval("TranspoFee").ToString() == "0.0000" ? "n/a" : string.Format("{0:C}", Eval("TranspoFee")) %>'>
            </asp:Label><br />

            Hotel Fee: <asp:Label ID="lblHotelFee" runat="server" Text='<%# String.IsNullOrEmpty(Eval("HotelFee").ToString()) || Eval("HotelFee").ToString() == "0.0000" ? "n/a" : string.Format("{0:C}", Eval("HotelFee")) %>'>
            </asp:Label><br />

            Poster Printing Fees/Charges (if applicable): <asp:Label ID="lblPosterFee" runat="server" Text='<%# String.IsNullOrEmpty(Eval("PosterFee").ToString()) || Eval("PosterFee").ToString() == "0.0000" ? "n/a" : string.Format("{0:C}", Eval("PosterFee")) %>'></asp:Label><br />

            Additional Info: <asp:Label ID="lblAdditionalInfo" runat="server" Text='<%# Bind("AdditionalInfo") %>'>
            </asp:Label><br />

            Date Submitted: <asp:Label ID="lblDateSubmitted" runat="server" Text='<%# Bind("DateSubmitted") %>'>
            </asp:Label><br />

            Total Amount Requested: <asp:Label ID="lblTotalRequested" runat="server" Text='<%# string.Format("{0:C}", Eval("TotalRequested")) %>'>
            </asp:Label><br />
            <div style="background-color:Wheat">
            Amount Approved: $<asp:Label ID="Label2" runat="server" Text='<%# String.IsNullOrEmpty(Eval("AmountApproved").ToString()) || Eval("AmountApproved").ToString() == "0.0000" ? "" : string.Format("{0:C}", Eval("AmountApproved")) %>'></asp:Label></div><br />
        
        </div>
        <div class="column-center">
            <p>Approval Actions</p>
            <asp:Label ForeColor="White" Name="RequestID" ID="lblRequestID" runat="server" Text='<%# Bind("RequestID") %>'></asp:Label><br />
            Status:<asp:DropDownList ID="ddlStatus" runat="server" SelectedValue='<%# Bind("RequestStatus") %>'
                DataSource='<%# (new string[] { "Received", "Pending", "Approved", "Declined" }) %>' 
                AppendDataBoundItems="True">
                    <asp:ListItem Selected="True" Text="Select..." Value=""></asp:ListItem>
            </asp:DropDownList><br />
    
            Pre-Approval:<asp:DropDownList ID="ddlPreApproval" runat="server" SelectedValue='<%# Bind("PreApprovalStatus") %>'
                DataSource='<%# (new string[] { "Under Review", "Pending Final Approval", "Incomplete", "Approved", "Declined" }) %>'
                AppendDataBoundItems="True">
                    <asp:ListItem Selected="True" Text="Select..." Value=""></asp:ListItem>
            </asp:DropDownList><br />

            Pre-Approval By: <asp:TextBox ID="txtPreApprovedBy" runat="server" Text='<%#Bind("PreApprovedBy")%>' ></asp:TextBox><span id="dam_return"><asp:LinkButton id="Button1" runat="server" OnClientClick="GetValue();" text="Carla" ></asp:LinkButton><%--<a href="#" onclick="javascript:return AccessOnClient()">Carla</a></span> onclientclick="return AccessOnclient();" --%><br />

            Pre-Approval Date: <asp:TextBox ID="txtPreApprovalDate" runat="server" Text='<%#Bind("PreApprovalDate")%>'></asp:TextBox><br />

            Notes (shared in email???): <asp:TextBox ID="txtApprovalNotes" runat="server" Text='<%#Bind("PreApprovalNotes") %>' TextMode="MultiLine" Rows="5" Columns="10"></asp:TextBox><br />

            Final Approval Required? <telerik:RadButton ID="IsTrue" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox"
            Checked='<%# (DataBinder.Eval(Container.DataItem,"FinalApprovalRequired") is DBNull ?false:DataBinder.Eval(Container.DataItem,"FinalApprovalRequired")) %>'>
            <ToggleStates>
                <telerik:RadButtonToggleState Value="True" />
                <telerik:RadButtonToggleState Value="False" />
            </ToggleStates>
        </telerik:RadButton>
        <br />

            Final Approval Status<asp:DropDownList ID="ddlFinalApproval" runat="server" SelectedValue='<%# Bind("FinalApprovalStatus") %>'
                DataSource='<%# (new string[] { "N/A", "Under Review", "Approved", "Declined" }) %>' 
                AppendDataBoundItems="True">
                    <asp:ListItem Selected="True" Text="Select..." Value=""></asp:ListItem>
            </asp:DropDownList><br />

            Final Approval By: <asp:TextBox ID="txtFinalApprovalBy" runat="server" Text='<%#Bind("FinalApprovalBy")%>'></asp:TextBox><br />

            Final Approval Date: <asp:TextBox ID="txtFinalApprovalDate" runat="server" Text='<%# Bind("FinalApprovalDate") %>' ></asp:TextBox><br />

            Amount Approved: $<telerik:RadNumericTextBox ID="txtAmountApproved" runat="server" Text='<%# Bind("AmountApproved") %>'></telerik:RadNumericTextBox><br />

        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>&nbsp;
        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
        </div>
        <div class="column-right">
        <asp:Panel ID="pnlmessages" runat="server">
        <p>Send approprate mail message(s)</p>
        <p>Approved!<a href="#" title="Send Approved Message" onclick="openMailWindow('<%#DataBinder.Eval(Container.DataItem, "RequestID") %>','Approved');return false;"><img style="border:0px;vertical-align:middle;" height="24px" width="24px" alt="RequestMail" src="Images/mail_next.png"/></a>&nbsp;</p>
        <p>Declined<a href="#" title="Send Declined Message" onclick="openMailWindow('<%#DataBinder.Eval(Container.DataItem, "RequestID") %>','Declined');return false;"><img style="border:0px;vertical-align:middle;" height="24px" width="24px" alt="RequestMail" src="Images/mail_next.png"/></a>&nbsp;</p>
        <p>Incomplete<a href="#" title="Send Incomplete Message" onclick="openMailWindow('<%#DataBinder.Eval(Container.DataItem, "RequestID") %>','Incomplete');return false;"><img style="border:0px;vertical-align:middle;" height="24px" width="24px" alt="RequestMail" src="Images/mail_next.png"/></a>&nbsp;</p>
        <p>New, blank message to Requestor<a href="#" title="Send New, Blank Mail" onclick="openMailWindow('<%#DataBinder.Eval(Container.DataItem, "RequestID") %>','Blank');return false;"><img style="border:0px;vertical-align:middle;" height="24px" width="24px" alt="RequestMail" src="Images/mail_next.png"/></a>&nbsp;</p>
        </asp:Panel>
        </div>
        </div>
    </FormTemplate>
        <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
    </MasterTableView>

        <FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>


    protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
    {
        ErrorLog oErrorLog = new ErrorLog();
        GridEditableItem editedItem = e.Item as GridEditableItem;
        
        if (!e.Item.IsInEditMode)//(changedRows.Length != 1)
        {
            lblProblem.Text += "Unable to locate the Request for updating.";
            e.Canceled = true;
            return;
        }
        string savedoldvaluescount = editedItem.SavedOldValues.Count.ToString();
        string ddlPreOld = editedItem.SavedOldValues["PreApprovalStatus"].ToString();
        //Update new values
        Hashtable newValues = new Hashtable();
        newValues["RequestID"] = (editedItem.FindControl("lblRequestID") as Label).Text;
        newValues["AcphsEmail"] = (editedItem.FindControl("lblAcphsEmail") as Label).Text;
        newValues["RequestStatus"] = (editedItem.FindControl("ddlStatus") as DropDownList).SelectedValue;
        newValues["PreApprovalStatus"] = (editedItem.FindControl("ddlPreApproval") as DropDownList).SelectedValue;
        newValues["PreApprovedBy"] = (editedItem.FindControl("txtPreApprovedBy") as TextBox).Text;
        newValues["PreApprovalDate"] = (editedItem.FindControl("txtPreApprovalDate") as TextBox).Text;
        newValues["PreApprovalNotes"] = (editedItem.FindControl("txtApprovalNotes") as TextBox).Text;
        newValues["FinalApprovalRequired"] = (editedItem.FindControl("IsTrue") as RadButton).Value.ToString() == "True" ? true : false;
        newValues["FinalApprovalStatus"] = (editedItem.FindControl("ddlFinalApproval") as DropDownList).SelectedValue;
        newValues["FinalApprovalBy"] = (editedItem.FindControl("txtFinalApprovalBy") as TextBox).Text;
        newValues["FinalApprovalDate"] = (editedItem.FindControl("txtFinalApprovalDate") as TextBox).Text; //Convert.ToDateTime((editedItem.FindControl("txtFinalApprovalDate") as TextBox).Text);
        if (String.IsNullOrEmpty(newValues["FinalApprovalDate"].ToString())) { newValues["FinalApprovalDate"] = DBNull.Value;}
        newValues["AmountApproved"] = String.IsNullOrEmpty((editedItem.FindControl("txtAmountApproved") as RadNumericTextBox).Text.ToString()) ? 0 : Convert.ToDecimal((editedItem.FindControl("txtAmountApproved") as RadNumericTextBox).Text);
        //changedRows[0].BeginEdit();

        try
        {
            //construct the connection
            String strConn = WebConfigurationManager.ConnectionStrings["CAMSConnectionString"].ConnectionString;
            SqlConnection conn = new SqlConnection(strConn);
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = conn;

            //load up the parameters with variable values
            cmd.Parameters.Add("@RequestID",  SqlDbType.Int).Value = newValues["RequestID"];
            cmd.Parameters.Add("@RequestStatus",  SqlDbType.NVarChar).Value = newValues["RequestStatus"];
            cmd.Parameters.Add("@PreApprovalStatus",  SqlDbType.NVarChar).Value = newValues["PreApprovalStatus"];
            cmd.Parameters.Add("@PreApprovedBy",  SqlDbType.NVarChar).Value = newValues["PreApprovedBy"];
            cmd.Parameters.Add("@PreApprovalDate",  SqlDbType.DateTime).Value = newValues["PreApprovalDate"];
            cmd.Parameters.Add("@PreApprovalNotes",  SqlDbType.NVarChar).Value = newValues["PreApprovalNotes"];
            cmd.Parameters.Add("@FinalApprovalRequired",  SqlDbType.Bit).Value = newValues["FinalApprovalRequired"];
            cmd.Parameters.Add("@FinalApprovalStatus",  SqlDbType.NVarChar).Value = newValues["FinalApprovalStatus"];
            cmd.Parameters.Add("@FinalApprovalBy",  SqlDbType.NVarChar).Value = newValues["FinalApprovalBy"];
            cmd.Parameters.Add("@FinalApprovalDate",  SqlDbType.DateTime).Value = newValues["FinalApprovalDate"];
            cmd.Parameters.Add("@AmountApproved",  SqlDbType.Money).Value = newValues["AmountApproved"];

            conn.Open();

            //update the request with new info
            cmd.CommandText = "UPDATE ACPHS_RequestToTravel_Approval SET RequestStatus = @RequestStatus, PreApprovalStatus = @PreApprovalStatus, PreApprovedBy = @PreApprovedBy, PreApprovalDate = @PreApprovalDate, PreApprovalNotes = @PreApprovalNotes, FinalApprovalRequired = @FinalApprovalRequired, FinalApprovalStatus = @FinalApprovalStatus, FinalApprovalBy = @FinalApprovalBy, FinalApprovalDate = @FinalApprovalDate, AmountApproved = @AmountApproved WHERE RequestID = @RequestID";
            cmd.ExecuteNonQuery();
            conn.Close();
            //HERE IS WHERE I WOULD LIKE TO UPDATE THE COLOR. I AM PRODUCING AN ALERT INSTEAD.
   //Panel pnlm = (Panel)e.Item.FindControl("pnlmessages");
            //pnlm.BackColor = System.Drawing.Color.Wheat;
            string scriptstring = "radalert('Remember to send the email!', 330, 210);";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", scriptstring, true);


            
        }
        catch (Exception ex)
        {
            //changedRows[0].CancelEdit();
            lblProblem.Text += "Unable to update Request. Reason: " + ex.Message;
            oErrorLog.WriteErrorLog(ex.ToString());
            e.Canceled = true;
        }
        
    }

 

Thanks for any suggestions!

Amy

Amy
Top achievements
Rank 1
 asked on 24 Apr 2017
2 answers
204 views

I'd like to add an image to the RadCloudUpload button so it matches other buttons - how can I do that? In the attached image the top button is a normal RadButton with image - below that is the RadCloudUpload to which I'd like to add an image or icon.

Thanks.

Greg
Top achievements
Rank 1
 answered on 24 Apr 2017
2 answers
217 views
I have a Grid with a lot of rows and a different DateTime value on each row. When I mouse hover the rows I set the selectedDate of an outside RadDatePicker client-side using the javascript set_selectedDate().
When the user opens the calendar popup and selects a different date a server side event is fired and the grid is updated with AJAX.

The problem is that the client javasript set_seletedDate method also fires the server side event because of the Autopostback, but I want the server event fired only when the date is changed using the popup.
If I set Autopostback to False then the server event never gets fired..

How can I cancel the server postback after I call set_selectedDate() and make the popup selecteddatechanged server event keep working?


Roger
Top achievements
Rank 1
Veteran
 answered on 24 Apr 2017
1 answer
45 views

I have a radgrid that takes 20 + seconds to databind.

Each row has a button with databound command argument

<telerik:GridTemplateColumn DataField="EnableScript" HeaderText="EnablScript" UniqueName="EnableScript">
    <ItemTemplate>
        <telerik:RadButton ID="EnableButton" runat="server" CommandArgument='<%#Eval("EnableScript")%>' Text="Enable poller" OnClick="EnableButton_Click"/> 
    </ItemTemplate>
</telerik:GridTemplateColumn>

Is it possible to update the radbutton background per radgrid row, without rebinding the entire radgrid?

Grtz,

Theo (NL)

Marin Bratanov
Telerik team
 answered on 24 Apr 2017
3 answers
197 views

Parent Code

01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Starter.aspx.cs" Inherits="WebWindows.Starter" %>
02. 
03.<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
04. 
05.<!DOCTYPE html>
06. 
08.<head runat="server">
09.    <title></title>
10. 
11.    <script type="text/javascript">
12.        function clientShow(sender, eventArgs)
13.        {
14.            var txtInput = document.getElementById("txtInput");
15.            sender.argument = txtInput.value;
16.        }
17.        function clientClose(sender, args)
18.        {
19.            if (args.get_argument() != null)
20.            {
21.                txtInput.value = args.get_argument();
22.            }
23.        }
24.</script>
25. 
26.     
27.</head>
28.<body>
29.    <form id="form1" runat="server">
30.        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
31.            <Scripts>
32.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
33.                </asp:ScriptReference>
34.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
35.                </asp:ScriptReference>
36.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
37.                </asp:ScriptReference>
38.            </Scripts>
39.        </telerik:RadScriptManager>
40.        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
41.        </telerik:RadAjaxManager>
42.    <div>
43.     
44.                            <telerik:RadWindow ID="RadWindow1" runat="server" Height="600px" Modal="True" Width="800px" NavigateUrl="Childform.aspx" OnClientClose="clientClose" OnClientShow="clientShow" OpenerElementID="showDialog" ReloadOnShow="True">
45.                            </telerik:RadWindow>
46.        <br />
47.            <telerik:RadDockLayout ID="RadDockLayout1" Runat="server">
48.                <telerik:RadDockZone ID="RadDockZone1" Runat="server" Height="300px" Width="1220px">
49.                    <telerik:RadDock ID="RadDock10" Runat="server" Height="136px" Width="1182px">
50.                        <ContentTemplate>
51.                            <br />
52.                            <br />
53.                            <br />
54.                             
55.                          
56.                             
57.                        </ContentTemplate>
58.                    </telerik:RadDock>
59.                </telerik:RadDockZone>
60.        </telerik:RadDockLayout>
61. 
62.                            <asp:TextBox ID="txtInput" runat="server"></asp:TextBox>
63.                            <asp:Button ID="showDialog" runat="server" OnClientClick="clientShow" Text="Open" />
64.          
65.            <br />
66. 
67.    </div>
68.    </form>
69.</body>
70.</html>

 

Child page code :

01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChildForm.aspx.cs" Inherits="WebWindows.ChildForm" %>
02. 
03.<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
04. 
05.<!DOCTYPE html>
06. 
08.<head runat="server">
09.    <title></title>
10.  
11. <script type="text/javascript">
12.      
13.     function pageLoad() {
14.         
15.         txtInput = document.getElementById('txtUserInput');
16.         var currentWindow = GetRadWindow();
17.         txtInput.value = currentWindow.argument;
18. 
19.           
20.     }
21. 
22. 
23.     function GetRadWindow() {
24.         var oWindow = null;
25.         if (window.radWindow)
26.             oWindow = window.radWindow;
27.         else if (window.frameElement.radWindow)
28.             oWindow = window.frameElement.radWindow;
29.         return oWindow;
30.     }
31. 
32. 
33. 
34. 
35.     //Close the dialog and return the argument to the OnClientClose event handler
36.     function returnArg() {
37.          
38.         var oWnd = GetRadWindow();
39.         oWnd.close(txtInput.value);
40.     }
41. 
42.</script>      
43. 
44. 
45. 
46. 
47.</head>
48.<body>
49.    <form id="form1" runat="server">
50.    <div>
51.     
52.   
53. 
54.        
55.     
56.        <asp:ScriptManager ID="ScriptManager1" runat="server" OnLoad="Page_Load">
57.        </asp:ScriptManager>
58.       
59.        <asp:TextBox ID="txtUserInput" runat="server"></asp:TextBox>
60.        <br />
61.        <br />
62.        <asp:Button ID="Button1" runat="server" Text="Close With Argument" OnClientClick="returnArg(); return false;" />
63.        <br />
64. 
65.        
66.     
67.         
68. 
69. 
70. 
71.    </div>
72.    </form>
73.</body>
74.</html>

 

** The code working perfect if Textbox and Button outside RadDock Control, But inside doesn't work? 

Check attached video files.

Thanks

Vmax

 

HAREESH
Top achievements
Rank 1
 answered on 24 Apr 2017
1 answer
138 views

(If this is the wrong section to post into, please advise and I'll repost in the proper spot.)

So I need some assistance as I have an idea of what I need, but putting it into code is the challenge. (Or pseudo code).

a) Can't I utilize the RadGrid object with different datasets depending on the 'dropdown box' selections?

b) Can't I bind the data, dynamically display headers, AND, have the dataset fields data grouped into filters?

 

I'm challenged, that I need different RadGrids for different datasets.

(Read between the lines, my engineer is saying it's difficult; but my experience with Telerik isn't noob, thus it doesn't sound difficult.)

Marin Bratanov
Telerik team
 answered on 24 Apr 2017
1 answer
141 views
File drag and drop is broken again this time specifically to MS Edge Creator's Edition. It is broken in my own code and your online examples.
Vessy
Telerik team
 answered on 24 Apr 2017
5 answers
194 views

Hello,

I am trying to pass two parameters (Red and Blue outlined in attachment) to a radWindow via a Cell double click, which I will then populate a grid. I am able to pass the datakey (Red outlined) value on row double click thanks to this demo, but have had no luck in capturing the Column name to use in the querystring. 

Is there a Cell Double click event that I can use to make this happen or can this be done with Row Double click that captures the cell index I click on? 

The second attachment shows the window opened based on the demo link, but how can I get the querystring URL to show:

Bklg_SupportStatusWIPDetails.aspx?MPC=ABAL1TC7XB00?AREA=DB

where Area is another parameter in my datasource that is looking for the column name. 

Thank you in advance!

 

 
 
   
Peter Milchev
Telerik team
 answered on 24 Apr 2017
1 answer
54 views

To run a vb.net 2010 web form application, I have previously used Telerik ASP.NET UI ASO.NET_AJAX_2016 Dev.msi download files so the application would run successfully.
In the past I have found out that if I do not have the current Telerik tool installed, the application had unpredictable results. Basically when the .net application ran on the test application server, I got errors when I accessed the Telerik tool contained within the .net application. Is this still the same issue? Can I continue to use the version of the Telerik tool the application is accessing currently ? If so, can you tell me how long I can continue to use the same version of the Telerik tool?

If not, can you tell me what version of the Telerik tool I need to install?
**I am asking this question since I do not know if my latest install of the Telerik ASP.NET UI ASO.NET_AJAX_2017_1_228_Dev.msi installed correctly.

Marin Bratanov
Telerik team
 answered on 24 Apr 2017
3 answers
425 views
Hi,

In my radGrid i am placing CheckBox on both the ItemTemplate,HeaderTemplate.My requirement is that if i select checkbox in HeaderTemplate then all the chackBoxes in ItemTemplate  should be selected.If i de-select checkBox in HeaderTemplate then all the checkBoxes in ItemTemplate should be de-selected.

How can i achieve this requirement.Please help me...

Thanks in advance...
Abdul
Top achievements
Rank 1
 answered on 24 Apr 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?