Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
162 views
We're using a GridAttachmentColumn to upload stuff within a databound Grid.

How can I hide this column in View mode and only display it when an item is in Edit mode? We also use InPlace editing and I suppose we would need to rebind the grid. Possible to hide the column via JavaScript?
Peter
Top achievements
Rank 1
 answered on 06 Dec 2012
2 answers
103 views
Hi,

I use RadWindow throughout my application.
I typically close the window in code behind using winPDF.VisibleOnPageLoad = false; and this works just fine.
However, if I'm using the following code to cause a file to be downloaded to the client, then the RadWindow remains open:

Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + fullfilename + "\"");
Response.TransmitFile(fullfilename);
 
winPDF.VisibleOnPageLoad = false; // Close the RadWindow

Placing the last line above before the Response. statements has no effect.
I have tried adding  OnClientClicked="closePDF();return false;" to the RadButton on the RadWindow that performs the export, but that results in an error since the function can't seem to find the window.  My idea was to cause the window to close and then the postback to occur to cause the above code behind to fire.  Here's the relevant code in my aspx page:

function closePDF() {
 
                var window = $find("ctl00_ContentPlaceHolder_winPDF");
                window.close();
            }
 
<telerik:RadWindow ID="winPDF" Width="300px" Height="240px" runat="server" Title="Export to PDF" Style="z-index: 999999"
                VisibleOnPageLoad="false" Behaviors="Move" EnableShadow="true" Modal="true" OnClientClose="OnClientClose">
                <ContentTemplate>
                    <div style="padding: 5px;">
                        <telerik:RadButton ID="btnEx2PDF" OnClick="Export2PDF" CommandName="Export" Text="Export" OnClientClicked="closePDF();return false;"
                            runat="server">
                        </telerik:RadButton>
                        <telerik:RadButton ID="btnCancel" OnClick="Export2PDF" CommandName="Cancel" Text="Cancel"
                            CausesValidation="false" runat="server">
                        </telerik:RadButton>
                    </div>
...

When the application is run, the "window" variable in the above function is null.
If I remove the OnClientClicked event from the RadButton, I get no errors, but the RadWindow will not close.

Any ideas?

Thanks in advance

Jim
jlj30
Top achievements
Rank 2
 answered on 05 Dec 2012
2 answers
52 views
I have an extremely simple radwindow, called as follows: 
     var oWnd = window.radopen(url, "title");
     oWnd.show();

Once in the window I want to be able to close it simply by hitting the Esc key.  

I have this code, essentially pieced together from various threads.  :
The code below works, but only if I click within the body of the RadWindow first or, if on load, I set the focus to a control within the body.

 Anything particularly wrong with this?

   $(window).ready(function () {
            // Handler for .ready() called.
            $(window).keydown(function (e) {              
                // ESCAPE key pressed
                if (e.keyCode == 27) {                  
                    var oWnd = GetRadWindow();
                    oWnd.close();
                }
            });
   });

function closeWindow() {
            var oWnd = GetRadWindow();
            oWnd.close();
        }
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
Boris
Top achievements
Rank 1
 answered on 05 Dec 2012
2 answers
456 views
Tried to add a RadGrid using the version of Ajax controls I downloaded yesterday and when I try to change the theme, I get the "No Skins Assembly Found" error.  I added a reference to the Telerik.Wec.UI.Skins to my project, closed the solution and reopened it and I am still getting the error.  I have included screenshots of the error and my references folder below.
Gary
Top achievements
Rank 1
 answered on 05 Dec 2012
2 answers
78 views
Hi,
Grid losses while exporting. Pl's help me.

Thanks & Regards
Anzar.M
Manuel Buendia
Top achievements
Rank 1
 answered on 05 Dec 2012
5 answers
108 views
Hi, if I develop a site for a company and use my developer licensed dll's. how can I make sure that the company doesn't use the dll's for themselves after? All they have to do ist to download them and use them ... Is there a way I can protect myself?
Thanks, Thomas
Boyan Dimitrov
Telerik team
 answered on 05 Dec 2012
1 answer
52 views
Hi,

Am working on a requirement in my application and came across this situation with the Grid FilterMenu during postbacks.
There is a SharePoint WebPart with a RadGrid which is being updated every 10 seconds using a Timer. Filtering is enabled on the grid is being updated in an Ajax way using RadAjaxManager.
The issue is that: when ever a user tries to enter something in the filter text box of a column and tries to select an option from the FilterMenu and if there is a partial postback caused by the timer before the user selects an menu item, the FilterMenu just collapses and has to be reopened to select an option. As the timer's interval is set to 10 seconds, the user has a maximum of just 9 seconds to enter something in the filter text box and select an option from the menu. It would be very annoying for the users if the menu keeps closing every time they try to do some filtering. 

1. Is it possible to have the filtermenu open, after the partial postback, if it was in an opened state before the postback?
2. Is there any property available which indicates the state of the menu if it is open/closed? 

If not, could you suggest any work around for this issue?


Thanks,
Viddy.
Kostadin
Telerik team
 answered on 05 Dec 2012
3 answers
119 views
Hi,

I have recurrence editor in rad window. i need to bind empty recurrence rule to recurrence editor from client side.

Like this,


Let me know how to do this.

Thanks,
Prasanna.
Plamen
Telerik team
 answered on 05 Dec 2012
1 answer
88 views
Hi,

i've the problem with radlistview and with tag <%..%> into the code.

When start the page, the message error is: Controls collection can not be changed because the control contains code blocks (<%..%>).

Why?

This my code is:
<div align="center" class="Centerpage" id="div_radlistview">
                <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Width="1024px"
                    HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
                    <telerik:RadListView ID="RadListView1" runat="server"  DataKeyNames="idutente"
                    ItemPlaceholderID="Contenitore" AllowPaging="True" Skin="Simple">
                    <LayoutTemplate>
                        <fieldset id="FieldSet1">
                            <legend>Risultati della ricerca:</legend>
                            <asp:PlaceHolder ID="Contenitore" runat="server"></asp:PlaceHolder>
                            <div style="clear: both">
                            </div>
                            <div>
                                <div style="float: left; margin-left: 30%;">
<telerik:RadButton ID="btnFirst" runat="server" Text="Prima" CommandName="Page" CommandArgument="First"
Enabled="<%#Container.CurrentPageIndex > 0 %>" Skin="Sunset">
 </telerik:RadButton>
 <telerik:RadButton ID="btnPrev" runat="server" Text="Precedente" CommandName="Page" CommandArgument="Prev"
Enabled="<%#Container.CurrentPageIndex > 0 %>" Skin="Sunset">
 </telerik:RadButton>
                                    <span style="vertical-align: top; position: relative; top: 4px">Pagina
                                        <%#Container.CurrentPageIndex + 1 %>
                                        di
                                        <%#Container.PageCount %></span>
 <telerik:RadButton ID="btnNext" runat="server" Text="Successiva" CommandName="Page" CommandArgument="Next"
Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" Skin="Sunset">
 </telerik:RadButton>
  <telerik:RadButton ID="btnLast" runat="server" Text="Ultima" CommandName="Page" CommandArgument="Last"
Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" Skin="Sunset">
 </telerik:RadButton>
                   </div>
                      </div>
                        </fieldset>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <fieldset style="float: left; width: 494px; height: 180px">
                            <legend>Categoria:
                                <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
                            </legend>
                            <table cellpadding="0" cellspacing="0" width="95%">
                                <tr>
                                    <td style="width: 80%;">
                                        <table cellpadding="5" cellspacing="0">
                                            <tr>
                                                <td style="width: 20%;">
                                                    Nome:
                                                </td>
                                                <td style="width: 80%; text-align:left; color:#D5842B">
                                                    <%# CType(Container.DataItem, PropertyUtente).utente%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 20%;">
                                                    Città:
                                                </td>
                                                <td style="width: 80%; text-align:left">
                                                    <%# CType(Container.DataItem, PropertyUtente).Desccomune%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 20%;">
                                                    Telefono:
                                                </td>
                                                <td style="width: 80%; text-align:left">
                                                    <%# CType(Container.DataItem, PropertyUtente).Telefono%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 20%;">
                                                    Cellulare:
                                                </td>
                                                <td style="width: 80%; text-align:left">
                                                    <%# CType(Container.DataItem, PropertyUtente).Cellulare%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 20%;">
                                                    Email:
                                                </td>
                                                <td style="width: 80%; text-align:left">
                                                    <%# CType(Container.DataItem, PropertyUtente).Email%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td style="width: 100%; text-align:center">
                                                    <telerik:RadButton ID="RadButton1" runat="server" Text="Visualizza biglietto" Skin="Sunset"
                                                     OnClick="RadButton1_Click">
                                                    </telerik:RadButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                     <td style="vertical-align: top; text-align: right; width: 100px;">
                                         <asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="125px" Width="110px"/>
                                    </td>                            
                                </tr>
                            </table>
                        </fieldset>
                    </ItemTemplate>
                </telerik:RadListView>
                </telerik:RadAjaxPanel>     
            </div>
Fabio Cirillo
Top achievements
Rank 1
 answered on 05 Dec 2012
1 answer
93 views
hello telerik.

we have a problem with tabstrip control.

I tried to write article here many times from IE, Firefox, it does not posted.



Nencho
Telerik team
 answered on 05 Dec 2012
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?