Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
272 views
Hello,

In my current project I am using the RadWindow object quite a bit and I am running into a lot of trouble with it.

One page in my project calls the RadWindow object twice. The RadWindow populate data in a radgrid and on the select command of the grid the RadWindow should close. The RadWindow is called from server side code.

The issue I have noticed is that when I first load the page and make the RadWindow call, the RadWindow page_load event gets called once, the next time I call the RadWindow object from another location on the same page, the page_load of the RadWindow triggers twice. The page_load triggers as many times as I call the RadWindow object from the page.

Combine the above with the radgrid select. If the radwindow page_load happens twice then the radgrid select happens twice. The normal behavior of select in my code is to pass the selected item to the parent page and close the RadWindow and return to the parent control. However the select of the radgrid triggers as many times as the page_load event triggers.

Could you please let me know how to handle this scenario.

Thanks!!

Below are snippets of my code.
Parent page from where the RadWindow is loaded.
<telerik:RadWindowManager runat="server" ID="WindowMgr" Skin="abc" EnableEmbeddedSkins="false"> 
</telerik:RadWindowManager>

Javascript on the parent page to handle the OnClientClose event.
<script type="text/javascript">
        function SetTextBoxValue(oWnd, args) {
            //check if a value is returned from the dialog           
            var arg = args.get_argument();
            if (arg) {
                //do something
            }
        }
</script>

Code to invoke the RadWindow server side
Dim popUp As Telerik.Web.UI.RadWindow = New Telerik.Web.UI.RadWindow()
popUp.ID = "selectOrg"
popUp.OnClientClose = "SetTextBoxValue"
popUp.NavigateUrl = "someurl"
popUp.VisibleOnPageLoad = True
popUp.EnableEmbeddedSkins = False
popUp.Skin = "abc"
popUp.VisibleStatusbar = False
popUp.VisibleTitlebar = False
popUp.Modal = True
popUp.Behaviors = Telerik.Web.UI.WindowBehaviors.None
popUp.ShowContentDuringLoad = True
popUp.Height = Unit.Pixel(450)
popUp.Width = Unit.Pixel(500)
 
WindowMgr.Windows.Add(popUp)

Code in the select index changed event for the radgrid in the radwindow
ClientScript.RegisterStartupScript(Page.GetType(), "ey", "returnToParent('" + strSomeValue + "');", True)

Javascript code to handle the returntoParent function of the radwindow
function returnToParent(refControl) {
    //create the argument that will be returned to the parent page
    var oArg = new Object();
 
    //get the control to modify on Parent
    oArg.ControlToModify = refControl
 
    //get a reference to the current RadWindow
    var oWnd = GetRadWindow();
 
    //Close the RadWindow and send the argument to the parent page
    if (oArg.ControlToModify) {
        oWnd.close(oArg);
    }
}
Georgi Tunev
Telerik team
 answered on 24 Aug 2010
1 answer
316 views
Hi,

I have a page with several RadComboBoxes.

Each combobox filters on the text that is typed (for instance, I type "er", eric, frederic, meredith appear in the dropdown).

That poses a usability problem when a user wants to select another item in the list, the other items are not visible when some text is typed in the combobox. Each time, the user has to manually select the filter text and delete it. Is there a clean (preferably built-in) way of clearing the text in a RadComboBox ? (a "clear selection" option in the dropdown, a "X" button on the selecteditemtemplate field ?

Thank you,

Eric

Simon
Telerik team
 answered on 24 Aug 2010
6 answers
225 views
I have the following situation:

I have a radmenu being used as a context menu on a radtreeview.  When the user clicks (or right clicks) on a node in the treeview, the node is then selected and I need to retrieve some data from the database to populate some textboxes with data relevent to the newly selected node.

The problem I am having is that, of course, when the page is posted back, my context menu is then closed.  I am trying to use the menu.show command, but it wants a dom event as a parameter. In other places I've just used the args.get_DomEvent to grab the event off of the event arguments parameters that are sent to the method.  But, I don't have an "event arguments" parameter if I'm trying to just register a script to open the menu as soon as the page gets done loading.

how can I reshow my menu after the page refreshes following a postback?
Tonino
Top achievements
Rank 1
 answered on 24 Aug 2010
1 answer
73 views
I need to update a legacy Web App using Telerik RadControls for ASP.NET Q3 2007, I have later versions Q3 2009, Q1 2010 and Q2 2010 also installed, I get an exception on installing Q3 2007, 'Error creating virtual directories, Exception details: Unknown Error(0x80005000). Has anyone else experienced this problem and found a workaround? I am using VS2008, I also have VS2010 installed. I have tried uninstalling the later versions first, but installation of Q3 2007 still fails.
Georgi Tunev
Telerik team
 answered on 24 Aug 2010
1 answer
99 views
Hello Telerik,

I'm not sure if you're aware of the issue described here:

http://brianseekford.com/index.php/2010/04/18/bit-by-telerik-redirects-in-my-ajax-panel-not-working-with-net-4-upgrade/

I had the same issue till the moment and removing RadCompression fixed it. I hope that helps someone and hope you're fixing the issue soon. 

Regards,
Apostol Apostolov 

P.S. Sorry for the thread's name, I got distracted.
Sebastian
Telerik team
 answered on 24 Aug 2010
3 answers
148 views
Hello, I am trying to download a file from SQL Server...here is the method I normally use.
Private Sub gvMain_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles gvMain.ItemCommand
      If e.CommandName = "DownLoad" Then
 
          sch = New clsReport
          Dim arr As ArrayList = sch.DownloadLetter(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID"))
 
          Dim fil As Byte() = arr(0)
          Dim nam As String = arr(1)
          Dim ext As String = arr(2)
 
          If Not fil Is Nothing Then
              Response.Clear()
              Response.AddHeader("Content-Dispostiotion", nam & "." & ext)
              Response.AddHeader("Content-Length", fil.Length.ToString)
              Response.ContentType = "application/octet-stream"
              Response.BinaryWrite(fil)
              
          End If
      End If
 
 
 
  End Sub

Do I need to do something with the RadAjaxManager here...or the RadScriptManager? 
Thanks for any help.
Kiara
Top achievements
Rank 1
 answered on 24 Aug 2010
3 answers
76 views

Hi,
I created my own Radgrid class which inherits from the Telerik Radgrid.
In my class, I override the OnItemCreated sub in order to create a specific pager (after a clear with aGridPagerItem.PagerContentCell.Controls.Clear()) :

 

Protected Overrides Sub OnItemCreated(ByVal e As Telerik.Web.UI.GridItemEventArgs)
     MyBase.OnItemCreated(e)
     If TypeOf e.Item Is Telerik.Web.UI.GridPagerItem Then
        .............
     
End If
 End Sub

In my aspx, the property EnableSEOPaging is set to "true" and I ask only for the Bottom pager :
<PagerStyle EnableSEOPaging="true" Mode="NextPrevAndNumeric" SEOPagingQueryStringKey="pageindexes" Position="Bottom" />

The problem is that I enter the OnItemCreated 4 times :
  • 2 times for the non SEO default pager (header and footer) which is not rendered
  • 2 times for the SEO pager (header and footer) which is rendered

Questions:

  1. Why do the OnItemCreated fires for the not rendered default pager ? How can I check this code-behind (to avoid my specific treatment in this case) ?
  2. Why do the OnItemCreated fires for the header even if I explicitly defines Position="Bottom" ?

Thanks a lot.
Good day.
E. Mansion

Veli
Telerik team
 answered on 24 Aug 2010
1 answer
137 views
Hi,

I am trying to decorate a page that should be opened inside RadWindow.
for this purpose I am using RadFormDecorator and using the class "rfdRtl" in order to have the text of radio buttons and checkboxes on the left. my problem is that when clicking on the checkbox/radiobutton, then the vertical scrollbar of RadWindow jumps to the top (very annoying...)

I believe you can reconstruct just by adding the following code snipet under the body tag of RadWindow:
<table style="width:180px" class="rfdRtl">
  <tr>
    <td style="width:20px;padding-top:300px" />
    <td style="width:140px">
      <asp:CheckBox ID="test" runat="server" Text="Testing..." />
    </td>
    <td style="width:20px" />
  </tr>
</table>

Is it a bug? when removing the class "rfdRtl" it works just fine.
The skin I am using is "Default" (but, i am not sure if it matter)

Georgi Tunev
Telerik team
 answered on 24 Aug 2010
2 answers
101 views
I'm using Ajax Q1 2010 net 3.5 controls and have a RadScheduler with an AdvancedEditTemplate.  Code is below.  The problem is that when I right-click on an appointment and click edit, the edit form does nopt display and the day view reverts back to today's date.  There is no error or any indication what the problem is.  Help?
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Simple" 
                DataKeyField="ID" DataSubjectField="subject" DataStartField="start" DataEndField="end"
                    Height="650px" Width="375px" SelectedView="DayView"
                    ShowFooter="true" RowHeight="20px"  ShowViewTabs="false"
                    DayStartTime="08:00:00" DayEndTime="17:00:00"                        
                    FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
                    EnableDescriptionField="true"
                    AppointmentStyleMode="Default"
                    EnableResourceEditing="true"
                    OnAppointmentDelete="RadScheduler1_AppointmentDelete"
                    OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                    OnAppointmentInsert="RadScheduler1_AppointmentInsert">
                <AdvancedForm Modal="true" />
                <TimelineView UserSelectable="false" />
                <AppointmentTemplate>
                    <%# Eval("Subject") %>
                </AppointmentTemplate>
                <TimeSlotContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenuSettings EnableDefault="true" />
                <ResourceTypes>
                    <telerik:ResourceType KeyField="CPK_CATEGORY" Name="Department" TextField="category" ForeignKeyField="category" DataSourceID="dsTodoCategory" />
                </ResourceTypes>
                 <AdvancedEditTemplate>
                    <div id="schform">
                        <table style="width: 80%" align="center">
                            <tr>
                                <td style="width: 25%">Patient:</td>
                                <td style="width: 75%"></td>
                            </tr>
                              
                            <tr>
                                <td>Appt/Task:</td>
                                <td>
                                    <telerik:RadComboBox ID="cmbTodo" runat="server" DataSourceID="dsTodoList" TabIndex="1"
                                        DataTextField="subject" DataValueField="CPK_TODOINFO" Height="300px" Width="300px"
                                        Text='<%# Bind("subject") %>' Skin="Vista" EmptyMessage="- Select -"
                                        ShowDropDownOnTextboxClick="false" AllowCustomText="True">
                                    </telerik:RadComboBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Date:</td>
                                <td>
                                    <telerik:RadDatePicker Skin="WebBlue" ID="txtDueDate" runat="server" DbSelectedDate='<%# Bind("start") %>' BackColor="#f7f8f9" TabIndex="2">
                                        <Calendar ID="Calendar1" Skin="WebBlue" runat="server" ShowRowHeaders="false" />
                                    </telerik:RadDatePicker>
                                </td>
                            </tr>
                              
                            <tr>
                                <td colspan="2" align="center">
                                    <asp:Button ID="btnUpdate" runat="server" Text="Update" CommandName="Update" />
                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" CausesValidation="false" />
                                </td>
                            </tr>
                        </table>
                    </div>
                 </AdvancedEditTemplate>
            </telerik:RadScheduler>
Veronica
Telerik team
 answered on 24 Aug 2010
2 answers
114 views
hi, i need to write some javascript functions  for the radcalendar, but i don't know which properties are available and what's their names.

Where can i find documentation of all properties i can use?
Ronen
Top achievements
Rank 1
 answered on 24 Aug 2010
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?