Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
284 views
Hi,

In MainPage.aspx, when I click the button Upload in ParentTab2, it will pop up a Rad Window(rdwUpload-Upload.aspx).

Then, I selected the picture and click the button Upload, it will uploaded the photo.

So, when I click the close button of the Rad Window, I want to refresh the data list (dtlPhoto) in MainPage.aspx but it seems did'nt refresh the datalist. I don't want the whole page being refresh, just wana refresh the data list in pgViewTab.

I'm using OnClientClose in RadWindow.

May I know how to do this? Thanks.


(1) MainPage.aspx 
==================  
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestingTab.aspx.cs" Inherits="TestingTab" %>    
    
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>    
    
<!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">    
        
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">    
    </telerik:RadScriptManager>    
        
    <div>    
        
      <telerik:RadTabStrip ID="rtsTab" runat="server" MultiPageID="rmpTab" ScrollChildren="true">      
        <Tabs>     
            <telerik:RadTab Text="ParentTab1" runat="server" Selected="true">      
                <Tabs>     
                    <telerik:RadTab Text="ChildTab1" PageViewID="pgView1" Selected="true">      
                    </telerik:RadTab>     
                    <telerik:RadTab Text="ChildTab2" PageViewID="pgView2">      
                    </telerik:RadTab>     
                </Tabs>     
            </telerik:RadTab>   
    
            <telerik:RadTab Text="ParentTab2" runat="server" PageViewID="pgViewTab"                                               
            </telerik:RadTab>     
        </Tabs>     
       </telerik:RadTabStrip>     
    
    
   <telerik:RadMultiPage ID="rmpTab" runat="server">      
             
           <telerik:RadPageView ID="pgView1" runat="server" Selected="true">      
              ParentTab1, ChildTab1         
           </telerik:RadPageView>     
    
           <telerik:RadPageView ID="pgView2" runat="server">      
              ParentTab1, ChildTab2         
           </telerik:RadPageView>     
    
           <telerik:RadPageView ID="pgViewTab" runat="server">     
   
               ParentTab2     
          
           <button style="width: 70px;" onclick="openRadWin(); return false;">Upload</button> 
    
        <asp:DataList ID="dtlPhoto" runat="server" DataSourceID="odsPhoto">  
                         <ItemTemplate> 
                                <img id="img" alt="" src='<%# Eval("ImageLocation") %>' /> 
                         </ItemTemplate> 
                </asp:DataList> 
 
 
           </telerik:RadPageView>       
               
   </telerik:RadMultiPage>                    
    
      
    
   <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">      
     <AjaxSettings>     
            <telerik:AjaxSetting AjaxControlID="rtsTab">      
                <UpdatedControls>     
                        <telerik:AjaxUpdatedControl ControlID="rtsTab" />     
                        <telerik:AjaxUpdatedControl ControlID="rmpTab" />     
                </UpdatedControls>     
            </telerik:AjaxSetting>   
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="dtlPhoto" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting>    
    </AjaxSettings>     
   </telerik:RadAjaxManager>       
    
        
    </div>    
    </form>   
 
 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
        <Windows> 
            <telerik:RadWindow   
                id="rdwUpload"   
                runat="server" 
                showcontentduringload="false" 
                width="400px" 
                height="200px" 
                title="Upload Photo" 
                behaviors="Pin,Close,Move" 
                Modal="true" OnClientClose="refreshDataList">  
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 
   
        
    <script type="text/javascript">     
        function OnClientTabSelected(sender, args) {     
            var tab = args.get_tab();  
            if (tab.get_tabs().get_count() != 0) {  
                tab.get_tabs().getTab(0).click();  
            }    
        }     
 
 
    function openRadWin() {  
            radopen("http://localhost/Testing/Upload.aspx", "rdwUpload");  
        }  
 
 
    function refreshDataList(arg) {  
            if (!arg) {  
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");  
            }  
        }  
    </script>     
    
</body>    
</html>   
 
 
 
(2) MainPage.aspx.cs 
====================  
    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)  
    {  
            if (e.Argument == "Rebind")  
            {  
                dtlPhoto.DataBind();  
            }  
    }  
 


(3) Upload.aspx 
===============  
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Upload.aspx.cs" Inherits="Upload" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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">  
      
    <script type="text/javascript">  
    function CloseAndRebind(args) {  
 
        GetRadWindow().Close();  
        GetRadWindow().BrowserWindow.refreshDataList(args);  
    }  
 
    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;  
    }  
 
    function returnToParent() {  
          
        //get a reference to the current RadWindow  
        var oWnd = GetRadWindow();  
 
    }  
 
    function RefreshParentPage() {  
        GetRadWindow().BrowserWindow.location.href = GetRadWindow().BrowserWindow.location.href;  
    }  
 
 
    </script> 
      
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
 
        <table border="0" width="100%" cellpadding="5" cellspacing="0">       
            <tr> 
                <td> 
                    <telerik:RadUpload ID="uplPhoto" runat="server" ControlObjectsVisibility="None" MaxFileInputsCount="1" Width="300px"   
                        allowedfileextensions=".jpg,.jpeg,.gif,.png,.bmp">  
                    </telerik:RadUpload> 
                    <asp:Button ID="btnUpload" runat="server" Text="Upload" onclick="btnUpload_Click" /> 
                </td> 
            </tr> 
        </table> 
          
    </div> 
    </form> 
</body> 
</html> 
 


Regards,
Jessie
mihir
Top achievements
Rank 1
 answered on 14 Mar 2011
1 answer
84 views
I have a page that is inside of a master page. This inner page contains a RadTreeView and a Restricted area place holder for the display of a new window opened via javascript. When the user clicks a node in the TreeView a new window is opened using the RadWindowManager and the RadOpen.

This new window contains a RadGrid that the user selects a customer by double click then that customers records are opened.

If the user changes the sorting or moves columns on the search grid I want to save those changes to a cookie to load again for the user later. 

This save setting to a cookie then loading them back works fine in the other pages that have grids that are opened via a redirect that display the customer data but the cookies look like they are not being saved to the cookie collection when created in the search form.

What about the radopened window would cause cookies to be saved under a different authentication or something?

Thank you for any help.
Georgi Tunev
Telerik team
 answered on 14 Mar 2011
13 answers
438 views
Hi All

I want to be able to disable the Delete confimation dialog box when a custom attribute is a certain value,
I have disabled the delete command with the following script
function schedMove(sender, args){
                var app = args.get_appointment();
                var attr = app.get_attributes().getAttribute('schedType');
  
  
                     if (attr == "Movement") {
                        args.set_cancel(true);
                    }
                }

Any help on disabling the delete confirmation would be "GREATLY" appreciated.

Many Thanks

Regards

Darren
Veronica
Telerik team
 answered on 14 Mar 2011
1 answer
71 views
Hi,

Could you please provide me css class of grouping close button .....in radgrid....
Shinu
Top achievements
Rank 2
 answered on 14 Mar 2011
1 answer
84 views
Hi,

I'm working on a french web site.
Is it possible to have the audio captcha in french?


Thanks
Charles
Shinu
Top achievements
Rank 2
 answered on 14 Mar 2011
6 answers
203 views
I have a template edit form in a RadGrid that contains 4 RadComboBoxes.  I would like to add items to these combo boxes on the client side while the grid is in Edit Mode.  So for example I edit row #2, and then the user clicks a button to add another item to the RadComboBox.  Is it possible to get a client side reference to this combo box for the row currently being edited?  Then once I have reference to this combo box I can use the RadComboBox client side API to add the new combo box item.

Also if there is a way to do this, how would I loop through all of the items being edited if the grid is currently editing all items.

Please view attached image for an image that may help.

Thank you.
Princy
Top achievements
Rank 2
 answered on 14 Mar 2011
4 answers
79 views
Code is as follows:

<Columns>
 <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Seminar" UniqueName="Seminar">
  <ItemStyle Width="40%" />
  <ItemTemplate>
   <asp:HyperLink ID="rgtcTitle" runat="server" /><br />
   <asp:Label ID="rgtcLoc" runat="server" /><br />
   <asp:Label ID="rgtcDate" runat="server" />   <asp:Label ID="rgtcTime" runat="server" /><br />
  </ItemTemplate>
 </telerik:GridTemplateColumn>
 <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Speakers" UniqueName="Speakers">
  <ItemStyle Width="40%" />
  <ItemTemplate>
   <asp:Label ID="rgtcSpeakers" runat="server" /><br />
  </ItemTemplate>
 </telerik:GridTemplateColumn>
 <telerik:GridCheckBoxColumn DataField="Rcr" DataType="System.Boolean" HeaderText="Rcr" SortExpression="Rcr" UniqueName="Rcr">
 </telerik:GridCheckBoxColumn>
</Columns>


The issue is when I export to PDF the First gridTemplateColumn "reorders" itself.   the Hyperlink gets moved to the bottom of the 2 labels.  EVERYTHING else is GREAT..

Any help would be appreciated.

Jimm
Jasmin Edwin
Top achievements
Rank 1
 answered on 14 Mar 2011
1 answer
82 views
Hi, I am trying your demo code found here http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx
and used it as a starting point to add a RadComboBox of a column in my grid as shown here. The boldfaced line below throws an error in the browser - Compiler Error Message: BC30108: 'GridItem' is a type and cannot be used as an expression.

here is the code - any thoughts or help greatly appreciated.

<telerik:GridBoundColumn DataField="Difficulty" HeaderText="Difficulty" UniqueName="Difficulty">
                               <FilterTemplate>
                         <telerik:RadComboBox ID="rcbDifficulty" runat="server" OnClientSelectedIndexChanged="difficulty_changed" width="50px">
                         <Items>
                         <telerik:RadComboBoxItem Text="Beginner" value="Beginner"/>
                         <telerik:RadComboBoxItem Text="Intermediate" value="Intermediate"/>
                         <telerik:RadComboBoxItem Text="Advanced" value="Advanced"/>
                         </Items>
                         </telerik:RadComboBox>
                          <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

                                <script type="text/javascript">
                                    function difficulty_changed(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("Difficulty", args.get_item().get_value(), "EqualTo");

                                    }
                                </script>

                            </telerik:RadScriptBlock>
                         </FilterTemplate>
                        </telerik:GridBoundColumn>
Princy
Top achievements
Rank 2
 answered on 14 Mar 2011
1 answer
159 views
Hi All

When i am trying to edit the RadEditor which is inside the Form Template of a Radgrid for the first name, the Editor goes outside the form and its becoming too much wide.

Please see the video here Radeditor breaking width

This is happening for when running inside IE8, in FF it is working perfectly.

I have tried fixing with following code also but its not working..

function OnClientInit(editor) {
     var editorWidth = editor.get_element().style.width;
      
     editor.add_firstShow(function() {
         editor.get_element().style.width = editorWidth;
     });
 }

Thanks
Asutosh

Asutosh
Top achievements
Rank 1
 answered on 14 Mar 2011
1 answer
207 views
How to I make the RadGrid popup editform non-draggable?
Shinu
Top achievements
Rank 2
 answered on 14 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?