Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
284 views
In the month and timeline views in RadScheduler, is there a way to change the background color of cells/columns for weekends and for other dates that I specify (such as holidays)?

Thanks...

Don
don
Top achievements
Rank 1
 answered on 09 Dec 2009
2 answers
229 views
Im trying to use the comboxbox from this demo (just the first one) whithin a radgrid edit form template like this demo.  This is all wrapped up in an RadAjaxPanel and the grid is set to the following.
<telerik:RadGrid ID="RadGrid1" runat="server"  
            AllowPaging="True" AllowSorting="True" GridLines="None"  
            ShowGroupPanel="True" Width="795px" Style="margin-left:15px;" 
        DataSourceID="XmlDataSource2" AutoGenerateDeleteColumn="True" ShowStatusBar="true" 
            AutoGenerateEditColumn="True" > 
 
                <MasterTableView autogeneratecolumns="False" EditMode="PopUp" CommandItemDisplay="Top"  
                datasourceid="XmlDataSource2"> 
 
                <EditFormSettings EditFormType="Template" InsertCaption="New Journal Entry" PopUpSettings-Modal="true"> 


However, the javascript from the first demo in Default.cs.aspx, specifically the following, throws the following error.  Since the javascript has no clue how to find the id of something that is yet to exist what do you recommend that I do here?  The dropdown code worked just fine until I put it in the editform template.  ;-)
var combo = $find("<%= RadComboBox1.ClientID %>"); 



Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 21: Line 22:             function onCheckBoxClick(chk) {Line 23:                 var combo = $find("<%= RadComboBox1.ClientID %>");
Marc
Top achievements
Rank 1
 answered on 09 Dec 2009
1 answer
120 views
Hello,

having a look on the RadGrid demo 'Clientside Insert/Update/delete' I see that updates or insert are made using a webservice call.
This is nice but I can't use this webservice way, so my question is : I need to insert values clientside just as in this sample, could I get theses values in codebehing after a callback or ajaxrequest to my original page ?


Thank you (again) for help.

CS
Schlurk
Top achievements
Rank 2
 answered on 09 Dec 2009
1 answer
99 views
hi

I have this problem where the code behind was not executed because of the redirection: I want my code behind to be executed before redirection. But it seems that it gets redirected before it can execute the codebehind code. How do i solve this? Thanks

ASPX:
  <script type="text/javascript">
      function close()
      {
          self.close();
      }   
 
        function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
       
        function closeWin()
            {
            var oWnd = GetRadWindow();
            //top.location.href = 'http://localhost/demo/default.aspx';
            oWnd.close();
           
            }
          </script>
    <td align="center">
                    <asp:Button ID="btnDone" runat="server" onclientclick="closeWin()" CssClass="RadMenu_Black"
                        Font-Bold="True" ForeColor="#333333" Text="Done" />

Code Behind:
  Protected Sub btnDone_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDone.Click
        MethodA(session("x"))
       MethodB(Session("x"))
    End Sub
Schlurk
Top achievements
Rank 2
 answered on 09 Dec 2009
1 answer
169 views
I am trying to load a special day from the code behind.  The date does not show on the calendar until after I hover over it with the mouse.

.Net Code:

 

 

  

<telerik:RadCalendar ID="calEvents" runat="server" ondayrender="calEvents_DayRender">  
</telerik:RadCalendar> 

 


C# Code:

protected void Page_Load(object sender, EventArgs e)  
{  
 
}  
protected void calEvents_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)  
{  
    RadCalendarDay day = new RadCalendarDay(calEvents);  
    day.Date = DateTime.Today;   
    day.IsSelected = true;  
    day.ToolTip = "Tool Tip";   
    calEvents.SpecialDays.Add(day);  
} 

 

 

 

 

 

Can anybody tell me what I'm doing wrong?

Thanks!

Matt

 

Schlurk
Top achievements
Rank 2
 answered on 09 Dec 2009
1 answer
192 views
I was following the tutorial at
 
http://www.telerik.com/help/aspnet-ajax/tab_gettingstarted.html 

and the content of the associated RadPageViews (any that are declared as default, or just letting the Telerik code decide) will not display on Page Load; only after selecting another tab will the content of the RadMuliPage page views display.  The result is I have a page loaded with a series of tabs, but no content.  I have to select a different tab than the default before content begins to display.

Is this a known issue?  I tried the search engine, but it's breaking again (known issue).

Using 2009_10_28
IE 7
VISTA Enterprise
.NET 3.5
VS 2008

Cheers!
Mark
Schlurk
Top achievements
Rank 2
 answered on 09 Dec 2009
2 answers
327 views
I have a number of grids that partly share the same structure. For example, many grids have 'Id', 'Description', 'DisplayOrder', 'LastUpdateDate' and 'LastUpdateUserId' columns that are identical. The GridTemplateColumn for these common columns are all set declaratively the same in the different grids.

I would like to know what is the best approach in reusing some code.

For example, I considered creating a web user control for each column, but this did not work (as it seems that the telerik:GridTemplateColumn tag was not recognized in the ascx file and also that the control in the columns section has to be a 'Telerik.Web.UI.GridColumn').

Thanks.
Michel
Top achievements
Rank 1
 answered on 09 Dec 2009
2 answers
139 views
Hi there,

i have some problems and cant find a solution to sort it out.
let me first describe the situation. i have a grid, which contains a detailsview. this detailsview also contains a detailsview. So i have a 3 level hierachy grid. now i wanna do some client events like onrowclick and onrowdblclick.
if u click on a row, these record should be set in edit mode and if i dblclick on a row, the record should expand.
well, expanding in all hierarchy levels is working very well, but the rowclick event make some problems.


the first problem is: if i click on a row, my ie7 shows a warning message like this:

"do you wanna stop this script? a script on this site causes a delay on IE....."
I dont know how the correct translation is because i dont use the IE in english, but u should know what these messages means.

2nd problem is: if i navigate through my grid and expand one row at 1st level, then expand on 2nd level and then edit 3rd level row and then collapse all and i want to edit some more row i got these errormessage:
a runtime error occurs
Error: Object required

3rd problem is: since i integrated these js function my radgrid is working very slow and i dont know why?

This is my Code:

    var isDoubleClick = false;  
    var clickHandler = null;  
    var editedRow = null;  
 
 
    function RowClick(sender, eventArgs) {  
        editedRow = eventArgs.get_itemIndexHierarchical();  
        isDoubleClick = false;  
        if (clickHandler) {  
            window.clearTimeout(clickHandler);  
            clickHandler = null;  
        }  
        clickHandler = window.setTimeout(ActualClick, 200);  
    }  
 
    function RowDblClick(sender, eventArgs) {  
        editedRow = eventArgs.get_itemIndexHierarchical();  
        tableView = eventArgs.get_tableView();  
        isDoubleClick = true;  
        if (clickHandler) {  
            window.clearTimeout(clickHandler);  
            clickHandler = null;  
        }  
        clickHandler = window.setTimeout(ActualClick, 200);  
    }  
 
    function ActualClick() {  
        var tableview;  
        if (isDoubleClick) {  
            var rowIndex = editedRow  
            if (rowIndex.indexOf(':') != -1) {  
                rowIndex = rowIndex.substr(rowIndex.lastIndexOf('_') + 1);  
            }  
            var row = tableView.get_dataItems()[rowIndex];  
            if (tableView.getCellByColumnUniqueName(row, "ExpandColumn")) {  
                if (row.get_expanded() == false) {  
                    row.set_expanded(true);  
                    imageButton = tableView.getCellByColumnUniqueName(row, "ExpandColumn").childNodes[0];  
                    imageButton.className = "rgCollapse";  
                }  
                else {  
                    row.set_expanded(false);  
                    imageButton = tableView.getCellByColumnUniqueName(row, "ExpandColumn").childNodes[0];  
                    imageButton.className = "rgExpand";  
                }  
            }  
 
        }  
        else {  
            //debugger;  
            var x = editedRow;  
            var grid = $find("<%=Orders_RadGrid1.ClientID %>");  
            var name;  
            tableview = $find("<%=Orders_RadGrid1.ClientID %>").get_masterTableView();  
            if (editedRow.indexOf(':') != -1) {  
                var detailstable = grid.get_detailTables();  
                var tmp = editedRow.substring(editedRow.indexOf(':')+1, editedRow.length);  
                if (tmp.indexOf(':') != -1) {  
                    editedRow = editedRow.substr(editedRow.lastIndexOf('_') + 1);  
                    tableview = detailstable[1];  
                    name = detailstable[1].get_name();  
                } else {  
                    editedRow = editedRow.substr(editedRow.lastIndexOf('_') + 1);  
                    tableview = detailstable[0];  
                    name = detailstable[0].get_name();  
                }  
                  
            }  
            tableview.editItem(x);  
        }  
    }  
 

Maybe there is a easier way to get a row in edit mode.

Thanks,
Chris

Tsvetoslav
Telerik team
 answered on 09 Dec 2009
1 answer
93 views
Is there a way to give visual feedback when the datasource is changed(eg. darken the grid for a few millisseconds).
Schlurk
Top achievements
Rank 2
 answered on 09 Dec 2009
0 answers
160 views

I have a page that uses frames because it hosts content from different domains.  In one frame, I have the RadEditor.  If I type in some text and then click in the other frame to do something and then return to the RadEditor frame, it gives the debug message that access is denied.  I do not get this effect in Firefox or Chrome.  It only happens in IE, I'm using version 7.0.5730.13.

My research tells me this is a known issue for quite a while and that the browser is the root cause of this.  Can you confirm this and/or is there a hotfix possibly that addresses this?  If not, do you plan to address this in an upcoming release?  Are there any workaround suggestions?

Aside from that, I was able to make a minor code adjustment in the offending script (RadEditor.js) that seems to have gotten me past the problem.  I don't know yet what side effects if any may stem from this.  Anybody who decides to try this will have to do so at their own risk.

Note that the commented out code is the lines I added.

 

if($telerik.isIE){  
Telerik.Web.UI.Editor.RestorePoint.prototype={update:function(){  
this.HtmlText=this.Document.body.innerHTML;  
//try {  
var _76e=this.Document.selection.createRange();  
//}  
//catch(ex){}  
//try {  
if(_76e.length){  
this.SourceIndex=_76e.item(0).sourceIndex;  
}else{  
this.StartBookmark=_76e.getBookmark();  
}  
//}  
//catch(ex){}  
 
 
Tom
Top achievements
Rank 1
 asked on 09 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?