Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
162 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
187 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
321 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
134 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
88 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
150 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
1 answer
114 views
Hey everyone,
I am currently struggling with getting my grids to resize as a user expands and contracts their browser window. Here's my current situation:
1. For each page I reference a nested master page (each of the 2 master pages has all containers set to 100% for height and width)
2. Some pages only have grids where I set the <MasterTableView> dimensions to 100% instead of the actual RadGrid dimensions.
3. Some pages require RadSplitters with a Tree on the left and Grid on the right.

Summary:
Basically I have figured out how to get the grid to expand in height but the header row grows with the other rows. Ideally I would be able to continue to show grid rows instead of just making the existing ones larger.

Also, my master pages use tables as containers and with my limited CSS experience I was wondering if I shouldn't be and instead use some other method?

I am not sure if this is even worth it at this point. I have not seen one example of a grid doing this outside of a splitterbar. (I found that example)

Any assistance would be greatly appreciated.
J.
Pavlina
Telerik team
 answered on 09 Dec 2009
1 answer
138 views

Hello,
We are implementing some custom filtering on rad grid.
We are doing it in a similar approach to the example provided here:
http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html
As in the example, we are handling the Itemcommand event, and in that apply our own custom filtering behavior.

We are looking for a better technique to extract the current filter value from the column we are working on.
Inside the item command event, we execute the following line in order to extract the filter value from the column:

TextBox filterBox = (e.Item as GridFilteringItem)[filterPair.Second.ToString()].Controls[0] as TextBox;   

isn't there a better way? this is wspecially important when we have different column types with different filtering controls. for example, if I have a radComboBox instead of a textbox..

I saw there is a property called CurrentFilterValue for the column, but it shows the old filter value, and is not relevant in the Itemcommand event.

Any suggestions?

Pavlina
Telerik team
 answered on 09 Dec 2009
2 answers
120 views
We are using the latest Q3 hotfix release but are noticing some strange behaviour when moving columns and then filtering. If we drag a column before another, then enter some criteria in the moved column, the resulting (posted back) page has the criteria in the filter boxes for both columns.

Is anyone else experiencing this or aware of the problem?

Thanks.
Tsvetoslav
Telerik team
 answered on 09 Dec 2009
1 answer
184 views
Hello all ,

 My menu appears some thing odd to the page ..:(  i wish to reduce the height of my menu how can i do that in css ??  please find the attached image , will help u out .

Thanks
Prince
Schlurk
Top achievements
Rank 2
 answered on 09 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?