Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
234 views
am using assembly RadSplitter.Net2

The method 
splitter.GetPaneById('EndPane')
throws error as object doesnt support this property or method...
This is where am calling the method...OnClientLoaded="CollapsePane()".
code is
function CollapsePane()
{
var splitter = "<%= RadSplitter1.ClientID %>";
var pane = splitter.GetPaneById('EndPane');
}

The following is the pane code
 <radspl:RadSplitter ID="RadSplitter1" runat="server" Height="100%" LiveResize="true" OnClientLoaded="CollapsePane()"
                        ResizeWithBrowserWindow="true" Width="100%" Skin="Outlook" BorderSize="0" BorderStyle="None">
 <radspl:RadPane ID="EndPane" runat="server" Scrolling="none" Width="22" MinWidth="22"
                            Visible="false">
                            <radspl:RadSlidingZone ID="Radslidingzone1" runat="server" Width="22"  SlideDirection="Left"
                                ClickToOpen="false">
                                <radspl:RadSlidingPane ID="Radslidingpane5" Title="Sections" runat="server" Width="150"
                                    TabView="TextAndImage" IconUrl="../assets/favorites.gif" >
                                    <div id="radSecSub">
                                    <table class="right_navigation" id="tblRightPane" runat="server">
                                    </table>
                                    </div>
                                </radspl:RadSlidingPane>
                            </radspl:RadSlidingZone>
                        </radspl:RadPane>
                    </radspl:RadSplitter>
Niko
Telerik team
 answered on 14 Sep 2011
5 answers
217 views
Hi,

I am working on Telerik RadScheduler.

I have different sessions called screening, evaluation, discussions and etc....

So depending upon the dates of the above sessions, I have to highlight the calendar in Radscheduler.
All the other dates other than this should be blocked.

For example:
Screening : 2/23/2011 to 3/29/2011
Evaluation :4/12/2011-4/30/2011
Discussions-1/2/2011-1/5/2011.

All the dates other than this should be blocked and not be highlighted to the user.Is there any way to do it?
Peter
Telerik team
 answered on 14 Sep 2011
10 answers
318 views
We're trying to use a RadWindow for printing some information entered by the user:

Here are the basic steps we're using in code behind:
  • New up a RadWindow

RadWindow window = new RadWindow();
window.ID = "windowShowPrintDialog";
//window.NavigateUrl = "PrintAdHoc.aspx";
window.VisibleOnPageLoad = true;
window.Modal = true;
window.Width = 200;
window.Height = 300;

  • Use LiteralControl to add info and JavaScript to window

string jsPrint = null;
using (StreamReader sr = new StreamReader(Server.MapPath("PrintWindowJavaScript.txt")))
{
    jsPrint = sr.ReadToEnd();
}
 
window.ContentContainer.Controls.Add(new LiteralControl(jsPrint));
 
...
 
 
 
window.ContentContainer.Controls.Add(new LiteralControl(name));
window.ContentContainer.Controls.Add(new LiteralControl(startdate));
window.ContentContainer.Controls.Add(new LiteralControl(enddate));
window.ContentContainer.Controls.Add(new LiteralControl("<button onclick=\"printWin(); return false\">print content</button><br />"));


  • PrintWindowJavaScript.txt is:

<script type="text/javascript">
function GetRadWindow()
{
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
 
 
 function printWin()
            {
                var oWnd = GetRadWindow();
                var content = oWnd.GetContentFrame().contentWindow;
                var printDocument = content.document;
                if (document.all)
                {
                    printDocument.execCommand( "Print");
                }
                else
                {
                    content.print();
                }
 
            }  
 
</script>
  • Show window by adding it to the for controls

this.Form1.Controls.Add(window);


The RadWindow is displayed along with the print button.  When the print button is clicked, we get a java script error:

Microsoft JScript runtime error: Object required

at (see bold text):

function GetRadWindow()
{
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}

Is it possible to print and/or run javascript code from a RadWindow created like this?

Thanks,

Jerry



Marin Bratanov
Telerik team
 answered on 14 Sep 2011
4 answers
885 views
I have just downloaded the trial version of Rad Controls for ASP.NET AJAX. When I create a new rad control project in VS2010 I can add controls and they work properly. When I add rad controls to an exsisting project they no longer work. I have changed the web.config file of my exsisting project to match that of the rad control project that works, with the exception of the membership profile and connection strings for my databases. When I run the project that works with the date picker I get the calender image button that is supposed to be there, but when I run the project that doesn't work, instead of the button, I get text that says "Open the Pop Up Calender". Not sure if that info is helpful but may help with wny it isn't working. Any help on where to look to get things working is greatly appreciated.

Thanks
Maria Ilieva
Telerik team
 answered on 14 Sep 2011
1 answer
127 views
Dear Sirs,
we are using latest version of RadScheduler in our web application and we need to hide some custom attributes which are shown in the appointment's edit form such as the EndDate Date/Time pickers, subject textbox and so on.
In a previous version of tererik's library (maybe 2009) we used something like that on the FormCreated event:
RadDatePicker startDate = (RadDatePicker)e.Container.FindControl("StartDate");
RadDatePicker endDate = (RadDatePicker)e.Container.FindControl("EndDate");
endDate.CssClass = "Hide";
WebControl conEndTime = (WebControl)e.Container.FindControl("EndTime");
conEndTime.CssClass = "Hide";
RadTextBox subjectTextbox = (RadTextBox)e.Container.FindControl("Subject");
subjectTextbox.CssClass = "Hide";
RadTextBox tbxTicketId = (RadTextBox)e.Container.FindControl("AttrTicketId");
tbxTicketId.CssClass = "Hide";
tbxTicketId.LabelCssClass = "Hide";
................

but now it doesn't work anymore, so how can we hide the controls in the appointment form?
Many thanks in advance.
Best Regards.
Peter
Telerik team
 answered on 14 Sep 2011
0 answers
97 views
Hello,

I would like to insert/edit/update rows to the shipped orders grid. How could i make this?
 
Thank you very much.
George
Top achievements
Rank 1
 asked on 14 Sep 2011
1 answer
138 views
Have a strange one.

Using the telerik grid.  When we click on another page number the results refresh correctly.  But when we try to edit a item, the item that opens up is the item on page 1 in the same location.  Also if we click next page it always goes to page 2.
If we disable viewstate for the control it works fine also.  Also another weird thing is when the item opens a 404 file not found response(seen in fiddler) for a png file (called by webresource.axd) but the item opens fine even though its the wrong tiem.  The file is there and can be browsed directly in IIS.

The issue ony occurs on 2 load balanced servers. Testing done has been directly to one server bypassing the load balancer.  It works fine on other Windows 2008 R2 servers so don't think it's a issue with the code.
Is there any IIS configuration or applications that might cause this issue?  Any ideas?

Thanks!!
Radoslav
Telerik team
 answered on 14 Sep 2011
1 answer
76 views
I have a radeditor that is picking up the background image from the page that it's on.  In ie8, I created a stylesheet for the ContentAreaCssFile with the following properties

body {
            margin: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            list-style: none !important;
            background-image: none !important;
            font:normal 13px Courier New !important;
            }

and that corrected the issue, but it doesn't seem to work in ie9.
Rumen
Telerik team
 answered on 14 Sep 2011
0 answers
142 views
Hi,

I am facing an issue with radComboBox with Telerik DLL Version (2011.1.413.35). Whenever I do a async callback to the Page ComboBox is getting disabled and am not able to change anything in Combobox.

Same is hapopening with my older version Telerik (2008.02.0826.35). We added a patch as provided by Telerik in previous thread but after patch adding also same issue is coming.
Patch Code snippet:--

<

 

 

script type="text/javascript">

 

 

 

 

 

//Uncomment this as well if you use RadAjaxPanel/RadAjaxManager to update any RadControl for ASP.NET AJAX.

 

 

 

// Telerik.Web.UI.RadAjaxControl.prototype._onFormSubmitCompleted = function (sender, args) {

// if (sender._xmlHttpRequest != null) {

// if (this._handleAsyncRedirect(sender._xmlHttpRequest)) {

// try {

// sender._aborted = true;

// }

// catch (e) {

// //

// }

// return;

// }

// }

 

 

// if (sender._xmlHttpRequest != null && !sender.get_timedOut()) {

// var scriptBlocks = this.getResponseItems(sender.get_responseData(), "scriptBlock");

// for (var i = 0, length = scriptBlocks.length; i < length; i++) {

// var content = scriptBlocks[i].content;

// if (content.indexOf(Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._uniqueID)) != -1) {

// var linksString = content.substr(content.indexOf("\"links\":") + 10, content.indexOf("]", content.indexOf("\"links\":")) - (content.indexOf("\"links\":") + 10)).replace(/\"/g, '');

// if (linksString != "") {

// this._links = linksString.split(",");

// this.updateHeadLinks();

// }

// }

 

 

// if (content.indexOf(".axd") == -1 && scriptBlocks[i].id == "ScriptPath") {

// Telerik.Web.UI.RadAjaxControl.IncludeClientScript(content);

// }

// }

 

 

// var panels = this.getResponseItems(sender.get_responseData(), "updatePanel");

 

 

// Telerik.Web.UI.RadAjaxControl.panelsToClear = [];

 

 

// for (var i = 0, length = panels.length; i < length; i++) {

// var panel = panels[i];

// if (!$get(panel.id)) {

// var newUpdatePanel = document.createElement("div");

// newUpdatePanel.id = panel.id;

// var element = $get(panel.id.replace("Panel", ""));

 

 

// if (!element)

// continue;

 

 

// var parent = element.parentNode;

// var nextSibling = element.nextSibling || Telerik.Web.UI.RadAjaxControl.GetNodeNextSibling(element);

 

 

// if (element.nodeType === 1) {

// if (element.dispose && typeof (element.dispose) === "function") {

// element.dispose();

// }

// else if (element.control && typeof (element.control.dispose) === "function") {

// element.control.dispose();

// }

// var behaviors = Sys.UI.Behavior.getBehaviors(element);

// for (var j = behaviors.length - 1; j >= 0; j--) {

// behaviors[j].dispose();

// }

// }

 

 

// $telerik.disposeElement(element);

// parent.removeChild(element);

 

 

// Telerik.Web.UI.RadAjaxControl.InsertAtLocation(newUpdatePanel, parent, nextSibling);

// Telerik.Web.UI.RadAjaxControl.panelsToClear[Telerik.Web.UI.RadAjaxControl.panelsToClear.length] = panel;

// }

// }

// }

 

 

// sender.get_webRequest().remove_completed(this._onFormSubmitCompletedHandler);

// };

 

 

$telerik.disposeElement =

 

function (element) {

 

 

 

if (typeof (Sys.WebForms) == "undefined")

 

 

 

return;

 

 

 

 

 

var prm = Sys.WebForms.PageRequestManager.getInstance();

 

 

 

if (prm && prm._destroyTree)

 

prm._destroyTree(element);

 

 

else if (Sys.Application.disposeElement)

 

Sys.Application.disposeElement(element,

 

true);

 

};

 

 

Telerik.Web.UI.RadComboBox.prototype._removeDropDown =

 

function () {

 

 

 

var slide = this.get_dropDownElement().parentNode;

 

slide.parentNode.removeChild(slide);

 

 

 

 

if (this._disposeChildElements)

 

$telerik.disposeElement(slide);

 

 

 

 

if (!$telerik.isSafari)

 

slide.outerHTML =

 

null;

 

 

 

this._dropDownElement = null;

 

};

 

 

</script>

 



We are using RadAjaxPanel to update the Controls.
Please provide any solution to this issue, any help will be highly appreciated.

Thanks Vishal
Vishal
Top achievements
Rank 1
 asked on 14 Sep 2011
3 answers
795 views
Hi,
         I am binding Entity DataSource to RadGrid. Now the problem is when adding a new record, it throws "Specified cast is not available" Exception. it works fine for edit operation. I tried checking for null in getter of the property but the problem remains there. I am not able to figure out the problem.

                        <telerik:RadGrid ID="radProjectGrid" runat="server" AutoGenerateColumns="false" DataSourceID="entProjectDataSource" 
                            AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" 
                            Skin="Default" OnItemCommand="radProjectGrid_ItemCommand"  
                            onitemcreated="radProjectGrid_ItemCreated"
                            <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="False" DataKeyNames="Project_ID" 
                                DataSourceID="entProjectDataSource"
                                <RowIndicatorColumn> 
                                    <HeaderStyle Width="20px" /> 
                                </RowIndicatorColumn> 
                                <ExpandCollapseColumn> 
                                    <HeaderStyle Width="20px" /> 
                                </ExpandCollapseColumn> 
                                <Columns> 
                                    <telerik:GridEditCommandColumn> 
                                    </telerik:GridEditCommandColumn> 
                                    <telerik:GridBoundColumn UniqueName="Project_Title" HeaderText="Project Title" DataField="Project_Title" 
                                        SortExpression="Project_Title"
                                        <HeaderStyle Width="150px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                        <ItemStyle Width="150px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="ProjectLeader_Name" HeaderText="ProjectLeader Name" 
                                        SortExpression="ProjectLeader_Name" UniqueName="ProjectLeader_Name"
                                        <HeaderStyle Width="120px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                        <ItemStyle Width="120px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn UniqueName="Location" HeaderText="Location" DataField="Location" 
                                        SortExpression="Location"
                                        <HeaderStyle Width="80px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                        <ItemStyle Width="80px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn UniqueName="Start_Date" HeaderText="Start Date" DataField="Start_Date" 
                                        DataType="System.DateTime" SortExpression="Start_Date" DataFormatString="{0:MM/dd/yyyy}"
                                        <HeaderStyle Width="80px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                        <ItemStyle Width="80px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn DataField="End_Date" DataType="System.DateTime" HeaderText="End Date" 
                                        SortExpression="End_Date" UniqueName="End_Date" DataFormatString="{0:MM/dd/yyyy}"
                                        <HeaderStyle Width="80px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                        <ItemStyle Width="80px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridCheckBoxColumn DataField="IsVisible" DataType="System.Boolean" HeaderText="ShowOnWebsite" 
                                        SortExpression="IsVisible" UniqueName="IsVisible"
                                        <HeaderStyle Width="60px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                        <ItemStyle Width="50px" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="true" /> 
                                    </telerik:GridCheckBoxColumn> 
                                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="column"
                                    </telerik:GridButtonColumn> 
                                </Columns> 
                                <EditFormSettings EditFormType="Template"
                                    <EditColumn UniqueName="EditCommandColumn1"
                                    </EditColumn> 
                                    <FormTemplate> 
                                        <div style="float: left"
                                            <table> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Project Title: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:TextBox ID="txtProjectTitle" runat="server" Text='<%# Bind("Project_Title") %>'></asp:TextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Location: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:TextBox ID="txtLocation" runat="server" Text='<%# Bind("Location") %>'></asp:TextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Project Leader Name: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:TextBox ID="txtProjectLeader" runat="server" Text='<%# Bind("ProjectLeader_Name") %>'></asp:TextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Start Date: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <telerik:RadDatePicker ID="rdpStartDate" runat="server" AutoPostBack="false" MinDate="01/01/1000" 
                                                            MaxDate="01/01/3000" DbSelectedDate='<%# Bind("Start_Date", "{0:D}") %>' /> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        End Date: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <telerik:RadDatePicker ID="rdpEndDate" runat="server" AutoPostBack="false" MinDate="01/01/1000" 
                                                            MaxDate="01/01/3000" DbSelectedDate='<%# Bind("End_Date","{0:D}") %>' /> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Website: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:TextBox ID="txtWebsite" runat="server"></asp:TextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        ShowOnWebsite 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("IsVisible") %>'/> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        <asp:Button ID="btnUpdate" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' 
                                                            Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' /> 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:Button ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel" 
                                                            Text="Cancel" /> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </div> 
                                        <div style="width: 450px; float: right;"
                                            <table> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Goal: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:TextBox ID="txtGoal" runat="server" Text='<%# Bind("Goal") %>' TextMode="MultiLine"></asp:TextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Objective: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <asp:TextBox ID="txtObjective" runat="server" Text='<%# Bind("Objective") %>' TextMode="MultiLine"></asp:TextBox> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Project Image: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <telerik:RadUpload ID="radUploadProjectImage" runat="server" ControlObjectsVisibility="None" 
                                                            TargetFolder="~/Images"
                                                        </telerik:RadUpload> 
                                                    </td> 
                                                </tr> 
                                                <tr> 
                                                    <td class="tdLeftAdmin"
                                                        Leader Image: 
                                                    </td> 
                                                    <td class="tdRightAdmin"
                                                        <telerik:RadUpload ID="radUploadProjectLeaderImage" runat="server" ControlObjectsVisibility="None" 
                                                            TargetFolder="~/Images"
                                                        </telerik:RadUpload> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </div> 
                                    </FormTemplate> 
                                </EditFormSettings> 
                            </MasterTableView> 
                            <ClientSettings> 
                                <ClientEvents OnRowDblClick="RowDblClick" /> 
                            </ClientSettings> 
                        </telerik:RadGrid> 


Ragards,
Thank  you in advance,
Pavlina
Telerik team
 answered on 14 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?