Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
209 views

Hi all,
I have a user control that contains a RadAjaxManagerProxy configured thus:

<telerik:RadAjaxManagerProxy ID="radajaxmanagerproxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="linkRefreshCCCLogos">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rCCCLogos" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

I have a repeater that is to be refreshed when a record is edited via RadWindow, which in turn triggers a postback OnClientClose against a hidden linkbutton: (refreshPage is the function I've assigned to OnClientClose, and it does get called and passes the correct argument to refreshBrandingOptions)...

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script language="javascript" type="text/javascript">
 
        function refreshPage(sender, args) {
            if (args.get_argument() != null) {
                refreshBrandingOptions(args.get_argument());
            } else { }
        }
 
        function refreshBrandingOptions(ElementTypeID) {
            switch (ElementTypeID) {
                case 52:
                    // __doPostBack('linkRefreshCCCLogos', '');
                    break;
                case 1:
                    __doPostBack('linkRefreshAssets', '');
                    break;
                default:
                    alert('Trying to refresh for ElementTypeID: ' + ElementTypeID);
                    //Do nothing
            }
        }
    </script>
</telerik:RadScriptBlock>

If the OnClientClose function is called and triggers the postback, the whole page refreshes.
If I add some dummy text to the linkbutton, stop the OnClientClose event from firing and then manually click the linkbutton, the repeater updates via ajax as it should.

The linkbutton and repeater code:

<asp:LinkButton ID="linkRefreshCCCLogos" runat="server" Text="dddd"></asp:LinkButton>
<div class="titleDiv" style="padding-left: 24px;">
    <asp:Repeater ID="rCCCLogos" runat="server">
        <HeaderTemplate>
            <div style="height: 10px;">
            </div>
            <div class="defaultText" style="width: 100px; display: inline-block; font-weight: bold;">
                Process</div>
            <div class="defaultText" style="width: 180px; display: inline-block; font-weight: bold;">
                Asset Name</div>
            <div class="defaultText" style="width: 140px; display: inline-block; font-weight: bold;">
                Position</div>
            <div class="defaultText" style="width: 120px; display: inline-block; font-weight: bold;">
                Size</div>
            <div class="defaultText" style="width: 170px; display: inline-block; font-weight: bold;">
                Colour</div>
            <div class="defaultText" style="width: 170px; display: inline-block; font-weight: bold;">
                Colour 2</div>
            <div class="defaultText" style="width: 16px; display: inline-block;">
            </div>
            <div class="defaultText" style="width: 16px; display: inline-block;">
            </div>
            <br />
        </HeaderTemplate>
        <ItemTemplate>
            <asp:Label ID="lblOrderGarmentBrandingID" runat="server" Visible="false" Text=' <%# DataBinder.Eval(Container.DataItem, "OrderGarmentBrandingID")%>'></asp:Label>
            <div class="defaultText" style="width: 100px; display: inline-block;">
                <%# DataBinder.Eval(Container.DataItem, "ProcessName")%></div>
            <div class="defaultText" style="width: 180px; display: inline-block;">
                <%# DataBinder.Eval(Container.DataItem, "AssetName")%></div>
            <div class="defaultText" style="width: 140px; display: inline-block;">
                <%# DataBinder.Eval(Container.DataItem, "PositionName")%></div>
            <div class="defaultText" style="width: 120px; display: inline-block;">
                <%# DataBinder.Eval(Container.DataItem, "SizeName")%></div>
            <div class="defaultText" style="width: 170px; display: inline-block;">
                <%# DataBinder.Eval(Container.DataItem, "Colour1Name")%></div>
            <div class="defaultText" style="width: 170px; display: inline-block;">
                <%# DataBinder.Eval(Container.DataItem, "Colour2Name")%></div>
            <div class="defaultText" style="width: 16px; display: inline-block; padding-left: 10px;">
                <asp:ImageButton ID="btnEditOption" runat="server" ImageUrl="/assets/images/application/icons/small/edit.gif"
                    ImageAlign="Bottom" /></div>
            <div class="defaultText" style="width: 16px; display: inline-block; padding-left: 10px;">
                <asp:ImageButton ID="btnDeleteCCCLogoOption" runat="server" ImageUrl="/assets/images/application/icons/small/delete.gif"
                    ImageAlign="Bottom" /></div>
            <div style="width: 970px; border-top: 1px dotted #ccc;">
            </div>
        </ItemTemplate>
    </asp:Repeater>
</div>


Can anyone shed some light on what's going on here?

Cheers
Rich

Maria Ilieva
Telerik team
 answered on 09 Apr 2012
1 answer
146 views
Hi,

I am using Rad window which i am navigating other .aspx page on button click. There is a save functionality in the window, after closing. Calling this function in RadWindowManager.

function closeRadWindow() {
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
        }

the grids will be rebind. Working good with this code which mentioned below.  

Issue : grd1 and grd2 will be in one panel1 and grd3 is in another panel2. Condition is when Panel1 only visible (Panel2 is visible false ) then getting error : 

Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_cphContent_ctl00_cphContent_wizPageInfo_grd3Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.

Here is my code which i am using:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grd1" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="grd2" UpdatePanelRenderMode="Inline" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grd3" UpdatePanelRenderMode="Inline" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Code Behind:

  protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            grd1.Rebind();
            grd2.Rebind();
            grd3.Rebind();
        }


Maria Ilieva
Telerik team
 answered on 09 Apr 2012
3 answers
175 views
I use radCaptcha  with audio code in my site.

 I use it in localhost it works fine and I can replace another .wav files with default audio files .but when i use it on server, it reads audio files from WebResource not from address I set and I can't replace this audio files.

even I delete this audio files from RadCaptcha folder,it reads audio files from webResource.
my question is how can i replace my custom audio files in RadCapcha in server not in localhost 

Slav
Telerik team
 answered on 09 Apr 2012
4 answers
202 views
Hi,

I have a Grid with items and a TreeView. I can drag and drop items from the Grid to the TreeView and it works fine. Right now dragging and dropping an item from the Grid to the Tree is like making a copy of that item from one node in the tree to another. However I need to extend the functionality and offer the user an option to select what he/she actully needs to do (Copy/Move/Make a Reference).

I need something like: onRowDropping (js event of the TreeVire) to show a pop-up with 3 options and when the user selects one of the options to actually be able to pass it the the server side event NodeDrop of the TreeView.

Is this possible with the Telerik controls?

Regards,
Kamen
Kamen
Top achievements
Rank 1
 answered on 09 Apr 2012
1 answer
77 views
Hi, 

I was wondering how to rebind/refresh only single row in the radgrid using ajax. The idea is that I have serverside function that changes property of an radgrid item (its image) and by clicking a button I want to show the changes.

Thanks, Ivan. 
Maria Ilieva
Telerik team
 answered on 09 Apr 2012
1 answer
366 views
Hello,
I  used the following script for open the radwindow from another radwindow. It is work but i want  to size(width,height) the window.
I can't unsertand how to set the size in this script.
 <telerik:RadScriptBlock runat="server" ID="test1_script">
    <script type="text/javascript">
        var test1Wnd;
        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 && window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow; //IE (and Moz as well)       
            return oWindow;
        }
        function open_fromTest1() {
            var oBrowserWindow = GetRadWindow();
            if (oBrowserWindow) oBrowserWindow = oBrowserWindow.BrowserWindow;
            if (oBrowserWindow == null) {
                window.radopen("Default2.aspx" + "", "NewWindow1");
                
            }
            else {
                setTimeout(function() {
                    test1Wnd = oBrowserWindow.radopen("Default2.aspx", "NewWindow1");
                   
                }, 0);
            }
        }
    </script>
</telerik:RadScriptBlock>
and I used the RadButton:
<telerik:RadButton ID="cmdPrint" runat="server" SkinID="Button" AutoPostBack="false" Text="Print Prescription" OnClientClicked="open_fromTest1" />

I also added this: window.onresize(600, 1000);
It is not work.

Please help me as soon as possible.

Thanks and Regards
Jiten Mutum


rdmptn
Top achievements
Rank 1
 answered on 09 Apr 2012
6 answers
133 views
I currently have a popup with an Update and a Cancel button.
I would like to have 3 buttons - Update, Save and Cancel.
Save would do just that, but NOT close the popup.
This behavior is typical of many applications where Update means save+close and Save means save+leave-open.

How would go about implementing this Save functionality for my popup?

Thanks

Jim
Tsvetina
Telerik team
 answered on 09 Apr 2012
2 answers
242 views
Hi All,

We are having some difficulties on clearing RadDatePicker selected values. We have multiple RadDatePicker on our page and we want to clear its selected date to NULL or empty its input box, we already tried filtering RadDatePicker, DatePickingInput and RadDateInput with no success.

"No problem on JavaScript but we need to do it on server side"

Sample Code:

public void ResetFormControlValue(Control parent)
{
    foreach (Control c in parent.Controls)
    {
        if (c.Controls.Count > 0)
        {
            ResetFormControlValue(c);
        }
        else
        {
            switch (c.GetType().ToString())
            {
                case "Telerik.Web.UI.RadNumericTextBox":
                    break;
                case "Telerik.Web.UI.RadTextBox":
                    break;
 
                case "Telerik.Web.UI.DatePickingInput": // Clear all RadDatePicker
                    ((RadDateInput)c).Clear();
                    break;
            }
        }
    }
}

Thanks for any help!


Renan
Top achievements
Rank 1
 answered on 09 Apr 2012
1 answer
202 views
Hi
How can I use RadDataPager with AspGridView?
Shinu
Top achievements
Rank 2
 answered on 09 Apr 2012
1 answer
206 views
Hello telerik .

I'm looking for a way for adding grid row dynamically.

I don't want to use any datasource for adding  row.

I woud like to finding solution likes combobox or listview control style.

Is there a other way?
Shinu
Top achievements
Rank 2
 answered on 09 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?