Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
398 views
Hello sir

I want call radalert from codebehind.

----------  Code  ---------- 

 

 

public static void ShowMessage(Control control, string message)

 

{

 

 

ScriptManager.RegisterStartupScript(control, typeof(string), "Alert", "<script> window.alert = function (string) { radalert('" + message + "');</script>", false);

 

}

But it is not working.

please give me proper solution.

Thanks

Kishor Dalwadi

Kishor Dalwadi
Top achievements
Rank 2
 answered on 03 Aug 2010
1 answer
175 views
Hi,

We are using the newer version of Telerik. We faced issue with RadAsyncUpload Control on a SharePoint 2007 Site. It is asking for login and does nothing on selection of a file from browse window. It just keeps on loading the content and can see the progressbar rotating continuously.

We are surprised as this was working with Q1 release. 

Seems there are lots of issues going on with Q2 version of this control. Can someone help out in identifying a fix for it. 

We tried with custom handler and also internal build but nothing comes out.

Need this urgent. Please help.

Thanks,
Nutan
T. Tsonev
Telerik team
 answered on 03 Aug 2010
2 answers
82 views
In a RadGrid I use a user control for update and insert:

      <EditFormSettings UserControlName="DetailsDetails.ascx" EditFormType="WebUserControl">
        <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
      </EditFormSettings>

Whenever the "New" is clicked in the radgrid command item template the user control loads find, however the radgrid now displays the last page.

How/where do I set pageindex when the new button is clicked?
Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 03 Aug 2010
1 answer
92 views
Hi,

Am setting the display status of the columns based on condition in prerender event.

When i set display status of a column to false the one successive column also gets the display status false.

But when i use visible attribute for the same it works fine.

Provide me with a solution.


Regards

Sathya
Mira
Telerik team
 answered on 03 Aug 2010
1 answer
54 views
I am uisng the latest release version of radcontrols in visual studio 2010 in a net4 project.

I have a RCB on my main form inside a rad ajax panel with autopost=true.
When I change the selected index of the radcombobox at the server side it runs the rcb_selectedindexchanged function. Inside this function I call the radajaxpanel.responsescripts.add function to call a javascript routine to open the radwindow.

The rad window winodw pops up fine and i can close the window no problems.

Once the modal window closes though the combobox seems to be in a disabled state (for instance I can no longer drop the list down to select another item).

I have tried setting the radwindow modeless and then trying the combobox before closing the window and I still can no longer use the combobox but I can use other controls on the page?

its as though as soon as the radwindow shows it disables the radcombobox and then does not re-enable it?

Is there anyone there who has seen the behaviour before and could shed some light on how to fix this for me please?
Yana
Telerik team
 answered on 03 Aug 2010
3 answers
81 views

Who would I do visual editing of a template for a RadControl embedded within a user control?

Thanks for your help.


Sebastian
Telerik team
 answered on 03 Aug 2010
3 answers
504 views
I am using Rad-Scheduler and Rad Menu (v Q4 2008), and I want my Scheduler Advanced (insert/edit) form to be on TOP of RadMenu.
I tried to set the Z-Index in the same manner as
http://www.telerik.com/support/kb/aspnet-ajax/window/show-radwindow-above-radmenu.aspx
or
http://www.telerik.com/community/forums/dotnetnuke/module-development/radmenu-z-index-with-radscheduler.aspx
I am using skin "Hay" for both of the Rad Controls.
Kindly guide me towards the solution.

Thanks
Sajid
Helen
Telerik team
 answered on 03 Aug 2010
1 answer
101 views
Hello every one,

        my page is using frames and i have two grids with in a frame (occupies 80% height and 100% width of the page). i used two panes with in a splitter, to place grids in each pane. Also splitbar between two panes.

Now my requirement is to,                
                - set the height of splitter according to the height of the frame, so that no vertical scroll bar is visible on page.
                - resize splitter and panes accordingly when split bar is dragged upwards and downwards (height of page may be increased).

just after splitter load, when splitter height is set to height of frame:
    - when split bar is dragged upwards, first pane height must be decreased with drag and splitter height must remain same
    - when splitbar is dragged downwards, height of first pane must be increased and second pane height
            - to be decreased if height of first pane is less than its initial height (upto initial height of splitter)
            - if height of first pane exceeds its initial height, second pane initial height to be maintained and splitter height to be increased accordingly (so that splitter height exceeds its initial height and page height is also increased)

all the above things working fine. problem occurs when dragging upwards (when the splitter height is greater than its initial height) so that the splitter height would be less than its initial height. i was not able to set the height of splitter at this event.

i am giving you java script i used for this. Please help me in the issue. 

at splitter load event.
- i am setting size of splitter according to frame
- getting initial height of splitter and top pane  and assigning the value to hidden fields ( when splitter loads for first time)
- getting height of splitter and panes and assigning the value to hidden fields  ( each time the splitter is loaded)

java script function for 'OnClientResized' event of first pane:

function

 

OnPane1Resized()

 

{

 

 

 

var FrameHeight = document.getElementById("<%= hdnFrameHeight.ClientID %>").value;

 

 

 

var splitter = $find("<%= RadSplitter1.ClientID %>");

 

 

var topPane = splitter.getPaneById("<%= RadPane1.ClientID %>");

 

 

var btmPane = splitter.getPaneById("<%= RadPane2.ClientID %>");

 

 

 

var sptrHeight = splitter.get_height();

 

 

var topPaneHeight = topPane.get_height();

 

 

var btmPaneHeight = btmPane.get_height();            // i am setting paneOldHeight to hidden fields on splitter 'load' event

 

 

 

var topPaneOldHeight = parseFloat(document.getElementById("<%= hdnTopPaneOldHeight.ClientID %>").value);

 

 

var btmPaneOldHeight = parseFloat(document.getElementById("<%= hdnBtmPaneOldHeight.ClientID %>").value);

 

 

var topPaneNewHeight = topPaneHeight;

 

document.getElementById(

"<%= hdnTopPaneOldHeight.ClientID %>").value = topPaneNewHeight;

 

 

var HeightDiff = topPaneNewHeight - topPaneOldHeight;

 

 

var resizeSptr = sptrHeight + HeightDiff ;

 

 

var resizeBtmPane = btmPaneHeight + HeightDiff ;         // i am setting initialHeight to hidden fields when splitter loads for the first time

 

var initSptrHeight = parseFloat(document.getElementById("<%= hdnInitSptrHeight.ClientID %>").value) ;

 

 

var initTopPaneHt = parseFloat(document.getElementById("<%= hdnInitTopPaneHeight.ClientID %>").value );

 

 

 

var OldSptrHt = topPaneOldHeight + btmPaneOldHeight ;

 

 

var SpaceHeight = initSptrHeight - OldSptrHt ;

 

 

 

// var btmPaneHeight1 = 0.35 * initSptrHeight;

 

 

 

 

if(HeightDiff > 0)

 

{

 

 

if (topPaneHeight > initTopPaneHt)

 

{

 

if(SpaceHeight >= 1)

 

{

 

var b = (resizeSptr - SpaceHeight);

 

 

var c = (resizeBtmPane - SpaceHeight);

 

splitter._setSize(

null,b);

 

btmPane._setSize(

null,c);

 

topPane._setSize(

null,topPaneHeight);

 

}

 

else

 

{

splitter._setSize(

null,resizeSptr);

 

btmPane._setSize(

null,resizeBtmPane);

 

topPane._setSize(

null,topPaneHeight);

 

}

}

 

else

 

{

 

}

 

 

}

 

else if(HeightDiff < 0)

 

{

 

if (topPaneHeight < initTopPaneHt)

 

{

 

var bpHeight = initSptrHeight - topPaneHeight ;

 

 

var Diff = sptrHeight - initSptrHeight ;

 

 

if (Diff > 1)                      // this is not working. as a final try i have set to initial size which can be seen below. even this is not working

 

{

splitter._setSize(

null,initSptrHeight);

 

topPane._setSize(null,initTopPaneHt);

 

else

 

{

splitter._setSize(

null,initSptrHeight);

 

}

 

}

 

else

 

{

splitter._setSize(

null,resizeSptr);

 

btmPane._setSize(

null,resizeBtmPane);

 

topPane._setSize(

null,topPaneHeight);

 

}

 

}

 

 

}

Dobromir
Telerik team
 answered on 03 Aug 2010
5 answers
338 views
Hello.
Sample code TestPage.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" Inherits="TelerikDynamicUserControlJsApp.testPage" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div style="display:none">
            <rad:RadScriptManager runat="server" EnablePageMethods="true">
                <Scripts>
                    <%--Needed for JavaScript IntelliSense in VS2010--%>
                    <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </rad:RadScriptManager>
            <rad:RadAjaxManager runat="server">
                <AjaxSettings>
                    <rad:AjaxSetting AjaxControlID="TestButton">
                        <UpdatedControls>
                            <rad:AjaxUpdatedControl ControlID="TestPlaceHolder" />
                        </UpdatedControls>
                    </rad:AjaxSetting>
                </AjaxSettings>
            </rad:RadAjaxManager>
        </div>
        <div>
            <asp:Button ID="TestButton" runat="server" Text="Test" Width="60" OnClick="TestButton_OnClick" />
            <asp:PlaceHolder ID="TestPlaceHolder" runat="server"/>   
        </div>
    </form>
</body>
</html>

protected void TestButton_OnClick(object sender, EventArgs e)
{
   TestPlaceHolder.Controls.Add(LoadControl("TestUserControl.ascx"));
}

Sample code TestUserControl.ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestUserControl.ascx.cs" Inherits="TelerikDynamicUserControlJsApp.TestUserControl" %>
 
<rad:RadScriptBlock>
    <script language="text/javascript">
        function GridCreated() {
            alert("<%= Grid.ClientID %>");
        }
    </script>
</rad:RadScriptBlock>
 
<div style="display:none">
    <rad:RadAjaxManagerProxy runat="server">
        <AjaxSettings>
            <rad:AjaxSetting AjaxControlID="Grid">
                <UpdatedControls>
                    <rad:AjaxUpdatedControl ControlID="Grid"/>
                </UpdatedControls>
            </rad:AjaxSetting>
        </AjaxSettings>
    </rad:RadAjaxManagerProxy>
</div>
 
<rad:RadGrid ID="Grid" runat="server" AllowSorting="true">
    <ClientSettings>
        <ClientEvents OnGridCreated="GridCreated" />
    </ClientSettings>
</rad:RadGrid>

public class TestData
{
    public string TestField { get; set; }
}
 
protected void Page_Load(object sender, EventArgs e)
{
    Grid.DataSource = new TestData[] { new TestData { TestField = "Test" } };
}

Code throws "Sys.WebForms.PageRequestManagerServerErrorException: Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error". I need create usercontrol in ajaxrequest, usercontrol has javascriptcode with server code(<%%>). How resolve this error?
Mira
Telerik team
 answered on 03 Aug 2010
3 answers
382 views
I'm trying to use an <AppointmentTemplate> to display data for my scheduler.  I have my DataSubjectField="ClassName" and a "ClassName" column defined in the System.Data.DataTable that I'm using as my DataSource.

But the scheduler is ignoring my DataSubjectField setting and giving me this error:  DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'ClassName'.

Is there some kind of "UseMyNames='True'" setting that I also need?

Here's my scheduler:

<telerik:RadScheduler ID="schPlanner" 
    AllowEdit="false" 
    AllowInsert="false" 
    DataEndField="End" 
    DataKeyField="SessionId" 
    DataRecurrenceField="" 
    DataRecurrenceParentKeyField="" 
    DataStartField="Start" 
    DataSubjectField="ClassName" 
    DayEndTime="22:00:00" 
    DayStartTime="06:00:00" 
    Height="100%" 
    RowHeight="21px" 
    runat="server" 
    SelectedView="WeekView" 
    ShowAllDayRow="false" 
    ShowFooter="false" 
    ShowHeader="false" 
    Skin="Web20" 
    Width="100%" 
    WorkDayEndTime="22:00:00" 
    WorkDayStartTime="06:00:00"   
    > 
    <WeekView ColumnHeaderDateFormat="dddd" /> 
    <AppointmentTemplate> 
        <div class="rsCustomAppointmentContainer">  
            <h2> 
                <%#Eval("ClassName")%> 
            </h2> 
            <div> 
            </div> 
        </div> 
    </AppointmentTemplate> 
</telerik:RadScheduler> 
 
T. Tsonev
Telerik team
 answered on 03 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?