Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
112 views
Hi, I have a ComboBox inside a ajaxPanel initially set to visible=false, after ajaxpanel postback, visible=true.

I can see the combo, but I can't get a hold of the the client side reference to the combo using $find('<%=combo.ClientID%>'), however, I am able to find the element using document.getElementById('<%=combo.ClientID%>').

anyone knows how to do this?

this link doesn't help, since ajaxPanel has no FindControl
http://www.telerik.com/help/aspnet-ajax/find-combobox-client-side-embedded-another-control.html

thanks
Yana
Telerik team
 answered on 26 Jan 2009
2 answers
179 views
I have splitter on a page.  The page is base off a master page.  The master page has a header div and a footer div.  Here is the simplified code for the master page:

<

 

div class="headingbar">
<table style="width:100%;height:100%" cellpadding="0" cellspacing="0"> 
<tr
<td>Some stuff here</td>
 </tr
</table>  
</div

<asp:ContentPlaceHolder ID="MainContent" runat="server"> 
</asp:ContentPlaceHolder

<div class="footer"> 
<table style="width:100%;height:100%" cellpadding="0" cellspacing="0"> 
<tr>
<td>Some stuff here</td>
</tr
</table
</div

On the actual page, I have insert a splitter with two Vertical Panes in ContentPlaceHolder.  I want the splitter to fill the remaining screen and resize with the window, showing scrollbar depending on the content.  Is there a way to tell the splitter to set height to 100% of the remaining white space (or 100% - hieght of other items on the page).

Thanks in advance.

- Adam

 

AdamL
Top achievements
Rank 1
 answered on 26 Jan 2009
1 answer
179 views
Hi,
    RadGrid version : 4.6.2.0

I have a problem in peformance issue with radgrid. Before we were not using any paging as the data was not large, Now we have a huge data to display in grid.
I want to use virtual scrolling client side, when we drag the vertical scroll to the bottom to load additional records on demand.
As the telerik site does not support the older versions forums. Im not able to find out the excat methods and properties to find the page size and currentpageindex client side.

Can i get the support for this version of radgrid.

Thanks
Georgi Krustev
Telerik team
 answered on 26 Jan 2009
1 answer
142 views
I believe my problem is simple and I have searched for an answer and cannot find one. I have 3 RadDockZones in a RadDockLayout. Each RadDockZone contains 1 RadDock. RadDock1 can be docked in all RadDockZones, RadDock2 cannot be moved and RadDock3 cannot be moved.

What I what to do: When RadDock1 gets docked in RadDockZone2, I want to change the title of RadDock2 to the title of RadDock1 and then move RadDock1 back to its RadDockZone1. And the same for when RadDock1 gets docked in RadDockZone3.

I need this done server side. I got all to work except moving RadDock1 back to its original place. I can manipulate all the docks when I'm in RadDock1_DockPositionChanged. The problem is when I leave RadDock1_DockPositionChanged it sets the DockZoneID back to where RadDock1 was moved to when the routine has ended.

I am using MasterPages.

Protected

 

Sub RadDock1_DockPositionChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.DockPositionChangedEventArgs) Handles RadDock1.DockPositionChanged, RadDock2.DockPositionChanged, RadDock3.DockPositionChanged

 

 

Dim mpContentPlaceHolder As ContentPlaceHolder = CType(Master.FindControl("ContentPlaceHolder3"), ContentPlaceHolder)

 

 

Dim i As Int32

 

 

Dim iDockTo, iDockFrom As Int32

 

 

Dim MyDock As Telerik.Web.UI.RadDock

 

 

Dim MyDockZone As Telerik.Web.UI.RadDockZone

 

iDockFrom = CalcDockNumber(sender.DockZoneID)

iDockTo = CalcDockNumber(e.DockZoneID)

 

If iDockFrom = iDockTo Then Exit Sub

 

 

 

MyDock = CType(mpContentPlaceHolder.FindControl("RadDock" & iDockTo), Telerik.Web.UI.RadDock)

 

MyDock.Title = sender.title

 

 

 

MyDock =

CType(mpContentPlaceHolder.FindControl("RadDock" & iDockFrom), Telerik.Web.UI.RadDock)

 

MyDockZone =

CType(mpContentPlaceHolder.FindControl("RadDockZone" & iDockFrom), Telerik.Web.UI.RadDockZone)

 

MyDock.Dock(MyDockZone.ID)

 

 

 

 

 

End Sub

 

Nikolay Raykov
Telerik team
 answered on 26 Jan 2009
1 answer
163 views
I am trying to avoid re-inventing the wheel.  Please help!

I have a list of articles (written) listed by Date, Title, and author, displayed in a grid view,
paged 10 to a page. Content comes from sql server.

This works fine..

But I want a simple way - minimum coding - to display a 'detail' view that includes
the body of the article on clicking an item in the grid view.

When editing an item, there is a great built-in popup window. How do I do the
same thing for just viewing - no editing permitted?

There has to be simple way but I am just not seeing it.

Thanks

Clive
Daniel
Telerik team
 answered on 26 Jan 2009
1 answer
761 views
I read a previous post here to just change the CssClass of the label next to the radio button with JavaScript.  This works visually, but it does not set the checked state of the radio button itself.  So on postback, my radio button does not read as checked.

I saw in the changelog for Q3 2008 that this was changed.  But i do not see any information in the documentation as to how I can now "easily" set these values with JavaScript.  Little help here please?  =)

Also, I have another problem I'm not sure anyone can help me with... My subscription ran out and the last version I was able to download of the Telerik Asp.Net controls was Q1 2008.1.619.  The "free" RadFormDecorator installation told me it was installing ALL controls - so now that DLL contains "trial" versions for ALL the other controls.  Is it possible to have my valid 2008.1.619 AND the new RadFormDecorator Q3 2008?  I would hope so, since the RadFormDecorator Q3 2008 is being advertised as free...
Georgi Tunev
Telerik team
 answered on 26 Jan 2009
3 answers
170 views

Hi

Could any one suggest me ?

I am facing one problem with radcombo.

When I click on radcombo in the borwser when browser is in normal size (not in maximised size), the radcombo itemlist is coming as drop-up. Unlike normal ASP.NET Dropdownlist, the radcombobox items list is going in side the browser window. But where as an ASP.NET dropdownlist items will be  coming on the browser window. (that means the item list will overlap on the browser window).

Is it possible to display the radcombo box itemlist by overlapping it on the browser window ?

Is there any proprety to control/find the itemlist direction (drop-down/drop-up) ?

Thanks in advance.

Balaji Velasiri.

Paul
Telerik team
 answered on 26 Jan 2009
2 answers
216 views
Hi,

I'm having problems with my Telerik RadScheduler.

Basically the appointments get databound fine, I have one resource (categories) and these used to be settable. But for some reason (I don't know what I did to cause this), now when I press the button on inserting or editing to go from basic to advanced form, the loading gif image appears but doesn't go away. If I take the RadAjaxLoadingPanel off, it loads the advanced form, which I can fill in and save. This allows me to insert a new appointment but doesn't exit the advanced form automatically. If I refresh the whole page the calendar loads and shows my event.

So it's fair to say I'm a bit confused.

Can anyone help please?

Here's the important bits of code (I've emptied the subs for appointmentdatabound, appointmentinsert etc to narrow down the problem):

Protected Sub RadScheduler1_AppointmentInsert(ByVal sender As ObjectByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) 
        'save the appointment 
        Dim tempRadResources As ResourceCollection 
        Dim tempRadResource As Resource 
        Dim categoryID As Integer 
        Dim categoryName As String 
        Dim calendarID As Long = Val(ddl_calendars.selectedvalue) 
 
        Try 
            tempRadResources = e.Appointment.Resources 
            Try 
                tempRadResource = tempRadResources.Item(0) 
                categoryID = tempRadResource.Key 
                categoryName = tempRadResource.Text 
            Catch ex As Exception 
                categoryID = 0 
            End Try 
 
            Dim appStartDate As Date = e.Appointment.Start 
            Dim appEndDate As Date = e.Appointment.End 
            Dim appTitle As String = e.Appointment.Subject 
 
            Dim appRecurrenceRule As String = e.Appointment.RecurrenceRule 
 
            AppointmentsDataSource.InsertParameters(0).DefaultValue = categoryID 
            AppointmentsDataSource.InsertParameters(1).DefaultValue = 1 
            AppointmentsDataSource.InsertParameters(2).DefaultValue = appStartDate 
            AppointmentsDataSource.InsertParameters(3).DefaultValue = appEndDate 
            AppointmentsDataSource.InsertParameters(4).DefaultValue = appTitle 
            AppointmentsDataSource.InsertParameters(5).DefaultValue = "" 
            AppointmentsDataSource.InsertParameters(6).DefaultValue = appRecurrenceRule 
            If e.Appointment.RecurrenceParentID = Nothing Then 
                AppointmentsDataSource.InsertParameters(7).DefaultValue = Nothing 
            ElseIf Val(e.Appointment.RecurrenceParentID) > 0 Then 
                AppointmentsDataSource.InsertParameters(7).DefaultValue = CLng(e.Appointment.RecurrenceParentID) 
            End If 
            AppointmentsDataSource.InsertParameters(8).DefaultValue = calendarID 
 
            addedCalendarEvent = True 
 
            Dim tempAppointment As Appointment 
            tempAppointment = New Appointment 
            tempAppointment = e.Appointment 
 
            RadScheduler1.InsertAppointment(tempAppointment) 
 
            'e.Cancel = True ' bodge to clear the lingering edit box 
            'RadScheduler1.Rebind() 
 
        Catch ex As Exception 
 
        End Try

<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                    <AjaxSettings> 
                        <telerik:AjaxSetting AjaxControlID="RadScheduler1"
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                    </AjaxSettings> 
                </telerik:RadAjaxManager> 
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
                    <telerik:RadScheduler ID="RadScheduler1" runat="server" Width="750px" Skin="Hay" 
                        EnableEmbeddedSkins="True" SelectedDate="2009-01-21" DayStartTime="08:00:00" 
                        DayEndTime="19:00:00" DataSourceID="AppointmentsDataSource" DataKeyField="calendar_event_id" 
                        DataSubjectField="calendar_event_subject" DataStartField="calendar_event_start_date" 
                        DataEndField="calendar_event_end_date" DataRecurrenceField="calendar_event_recurrence_rule" 
                        DataRecurrenceParentKeyField="calendar_event_recurrence_parent_id" TimeZoneOffset="00:00:00" 
                        OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" 
                        OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                        <ResourceTypes> 
                            <telerik:ResourceType ForeignKeyField="calendar_event_category_name" Name="Category" 
                                KeyField="calendar_event_category_id" TextField="calendar_event_category_name" 
                                DataSourceID="categoryDataSource" /> 
                        </ResourceTypes> 
                    </telerik:RadScheduler> 
                </telerik:RadAjaxPanel> 
                <asp:SqlDataSource ID="AppointmentsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:AJAXdbConnectionString %>" 
                    CancelSelectOnNullParameter="True" SelectCommand="SELECT * FROM view_calendar_events WHERE calendar_id = @calendar_id" 
                    InsertCommand="EXECUTE sp_insertCalendarEventAndLink @calendar_event_category_id,@calendar_event_operator_id,@calendar_event_start_date,@calendar_event_end_date,@calendar_event_subject,@calendar_event_notes,@calendar_event_recurrence_rule,@calendar_event_recurrence_parent_id,@calendarID" 
                    UpdateCommand="UPDATE calendar_events SET calendar_event_category_id = @calendar_event_category_id, calendar_event_operator_id = @calendar_event_operator_id, calendar_event_start_date = @calendar_event_start_date, calendar_event_end_date = @calendar_event_end_date, calendar_event_subject = @calendar_event_subject, calendar_event_notes = @calendar_event_notes, calendar_event_recurrence_rule = @calendar_event_recurrence_rule, calendar_event_recurrence_parent_id = @calendar_event_recurrence_parent_id WHERE calendar_event_id = @appointmentID" 
                    > 
                    <SelectParameters> 
                        <asp:Parameter Name="calendar_id" Type="Int32" /> 
                    </SelectParameters> 
                    <InsertParameters> 
                        <asp:Parameter Name="calendar_event_category_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_operator_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_start_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_end_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_subject" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_notes" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_rule" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_parent_id" Type="Int64" Direction="Input" /> 
                        <asp:Parameter Name="calendarID" Type="Int64" Direction="Input" /> 
                    </InsertParameters> 
                    <UpdateParameters> 
                        <asp:Parameter Name="calendar_event_category_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_operator_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_start_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_end_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_subject" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_notes" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_rule" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_parent_id" Type="Int64" Direction="Input" /> 
                        <asp:Parameter Name="appointmentID" Type="Int64" Direction="Input" /> 
                    </UpdateParameters> 
                </asp:SqlDataSource> 
                <asp:SqlDataSource ID="categoryDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:AJAXdbConnectionString %>" 
                    SelectCommand="SELECT * FROM calendar_event_category"></asp:SqlDataSource> 

MCM Net
Top achievements
Rank 1
 answered on 26 Jan 2009
1 answer
302 views
Hi,

Recently, we bought ASP.NET AJAX telerik controls. Installed Telerik Controls Q3 2008 (default installation) in a server where MOSS is installed and now, wanted to use these controls in the SharePoint sites. I followed the guidelines for usage of these controls but not very much clear for me to use from SharePoint web part or any other component. To test the usage, I did a sample but facing problem.

I created a web part for MOSS by following the guidelines provided at http://www.telerik.com/help/aspnet-ajax/create-ajax-enabled-SharePoint-webpart-radcontrols.html

Note:
I used Visual Studio 2005 with extensions for Windows SharePoint Services.
In the Visual Studio 2005, I created a project for SharePoint Web Part and used the code from your guidelines.

Steps followed for Telerik Controls Installation and web part development:
a. Telerik Controls installation in the SharePoint environment:  I installed the telerik controls by using set up Automatic Install RadControls_for_ASP.NET_AJAX_2008_3_1125_dev.exe.
b. Telerik installed the controls in the default location C:\Program Files\Telerik\RadControls for ASPNET AJAX Q3 2008
c. Deployed the Telerik.Web.UI.dll in GAC from C:\Program Files\Telerik\RadControls for ASPNET AJAX Q3 2008\Bin folder.
d. Followed the guidelines mentioned in http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax.html  and http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html.
e. Developed the web part (code provided below).
f. Deployed the web part  (web part created the required safecontrol entry for web part dll).

Questions:
The web part is using RadTreeView control. On clicking the tree node "What's the time?", the web part should show the current time in the place of "This is a label".  But, the time is not shown and not able to click the tree node.  I checked all the configuration settings for ASP.NET Ajax and also guildelines for Telerik control usage.  Not sure why this web part is not working?

Any help is appreciated and blocked on usage of these controls enterprize level.

Here is my code:

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

using Telerik.Web.UI;

namespace ITSUS_ITrInno_TelerikWebPart
{
    [Guid("e57fdda1-ce58-4d9d-b66a-dfdadd0fea52")]
    public class TelerikWebPart : System.Web.UI.WebControls.WebParts.WebPart
    {
        public TelerikWebPart()
        {
        }

        Label label;

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            Page.ClientScript.RegisterStartupScript(typeof(TelerikWebPart), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);
            if (this.Page.Form != null)
            {
                string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
                if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
                {
                    this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
                }
            }

            ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
            if (scriptManager == null)
            {
                scriptManager = new RadScriptManager();
                this.Page.Form.Controls.Add(scriptManager);
                // this.Page.Form.Controls.AddAt(0,scriptManager);
            }
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            Panel panel = new Panel();
            panel.ID = "Panel1";
            this.Controls.Add(panel);
            RadTreeView treeView = new RadTreeView();
            treeView.ID = "RadTreeView1";
            treeView.Nodes.Add(new RadTreeNode("What's the time?"));
            treeView.NodeClick += new RadTreeViewEventHandler(treeView_NodeClick);
            panel.Controls.Add(treeView);
            label = new Label();
            label.Text = "This is a label";
            panel.Controls.Add(label);
            RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(this.Page);
            if (ajaxManager == null)
            {
                ajaxManager = new RadAjaxManager();
                ajaxManager.ID = "RadAjaxManager1";
                Controls.Add(ajaxManager);
                this.Page.Items.Add(typeof(RadAjaxManager), ajaxManager);
            }
            ajaxManager.AjaxSettings.AddAjaxSetting(treeView, panel);
        }

        void treeView_NodeClick(object sender, RadTreeNodeEventArgs e)
        {
            label.Text = DateTime.Now.ToLongTimeString();
        }

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            // TODO: add custom rendering code here.
            // Label label = new Label();
            // label.Text = "Hello World";
            // this.Controls.Add(label);
        }
    }
}

Dimitar Milushev
Telerik team
 answered on 26 Jan 2009
1 answer
119 views
hello,

i have a radpane within a <div>.
and i am setting the height of <div> at run time.
it's working properly, but radpane is not setting it's height according to it's parent <div> by generating a vertical scrollbar.

as a result of not generating a scrollbar content of radpane is expanded outside of the <div>.
it's working successfully in IE but not in FF.

have you any solution for solve my prblem?
please tell me...
Tsvetie
Telerik team
 answered on 26 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?