Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
165 views
Hi,

I've added the following clientcontextmenu to a RadListBox (with checkboxes)
function showCheckListboxContextMenu(sender, eventArgs) {  
    var menu = $find("<%= checkListboxRadMenu.ClientID %>");  
    if (menu != null) {  
        var item = eventArgs.get_item();  
        var listbox = item.get_listbox();  
        document.getElementById("contextMenuCheckListboxID").value = listbox.get_id();  
        menu.show(eventArgs.get_domEvent());  
    }  
} 

On the line "var listbox = item.get_listbox();" i get an error Object doesn't support mproperty or method.
So i replaced the item.get_listbox() with item._parent and then it does work. But i believe it would be better to call the get_listbox() method.

Any ideas about why i get that error? The client-api documentation states that there is such a method and i even see it in the Visual Studio watch window when i debug the code. I'm using Telerik assembly version 2009.2.701.35
Schlurk
Top achievements
Rank 2
 answered on 14 Oct 2009
4 answers
265 views
Hi,

I cannot seem to figure out why carriage returns are not being displayed in the excel documents being produced by using the .ExportToExcel() call.

My .aspx file includes the following:
    <form id="form1" runat="server"> 
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <telerik:RadGrid ID="radGrid" runat="server"></telerik:RadGrid> 
    </form> 

My code behind pulls data from my database and then does the following:
        radGrid.DataSource = ds; 
        radGrid.DataBind(); 
 
        radGrid.ExportSettings.ExportOnlyData = true; 
        radGrid.ExportSettings.IgnorePaging = true; 
        radGrid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML; 
        radGrid.ExportSettings.FileName = "excel_export.xls"; 
        radGrid.MasterTableView.ExportToExcel(); 

When I query the database I loop through the record set to manipulate the data.  For example, I use System.Web.HttpUtility.HtmlDecode("string here") to render html encoding properly and if I add .Replace("\n","[line break here]") I see the bracketed text in the resulting excel document.

But I can't get an actual line break to appear!  I've tried replacing both "\r", "\n", and "\r\n" with Convert.ToChar(10).ToString(), Convert.ToChar(13).ToString(), and Convert.ToChar(10).ToString() + Convert.ToChar(13).ToString() --- nothing works.

If I use .Replace("\n","<br />") and change the export format to Telerik.Web.UI.GridExcelExportFormat.Html I see the line breaks, but new rows are created is Excel - which renders common excel functionality like sorting and filtering useless.

Help!


Chuck Callahan
Top achievements
Rank 1
 answered on 14 Oct 2009
2 answers
177 views
Hi,
         I have a sliding content pane on the right side of the aspx page. Now what is happening is as sliding pane opens it is going partly below the menu making it look ugly. I believe it is a z-index problem but i m not able to resolve it. I want the sliding pane to come on top of the menu . Please could you provide some pointers on this issue.

Thank you,

Regards,
Ajit
ajit
Top achievements
Rank 1
 answered on 14 Oct 2009
8 answers
534 views
Hi

I have looked at several threads on this but have not yet found a solution that works.
I must be missing something.

Using this code behind to set the column width works OK so I was trying to add the
column alignment in the same sub, but the alignment always defaults to left for items and centre for headers.
What am I missing?

 

Protected Sub ButtonGenPdf_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonGenPdf.Click

        RadGridGenerateList.MasterTableView.Font.Name = "Arial"
        RadGridGenerateList.ExportSettings.ExportOnlyData = False
        RadGridGenerateList.ExportSettings.OpenInNewWindow = True
        RadGridGenerateList.ExportSettings.IgnorePaging = True
        RadGridGenerateList.ExportSettings.Pdf.PageHeight = Unit.Parse("210mm")
        RadGridGenerateList.ExportSettings.Pdf.PageWidth = Unit.Parse("296mm")

        RadGridGenerateList.Visible = True
        RadGridGenerateList.Rebind()

        For Each item As GridPagerItem In RadGridGenerateList.MasterTableView.GetItems(GridItemType.Pager)
            item.PagerContentCell.Controls.Clear()
        Next
        DefineColumnWidths()

        RadGridGenerateList.MasterTableView.ExportToPdf()

    End Sub

Protected Sub DefineColumnWidths()  
        For Each col As GridColumn In RadGridGenerateList.MasterTableView.RenderColumns  
            Select Case col.UniqueName  
                Case "Region"  
                    col.HeaderStyle.Width = Unit.Pixel(100)  
                    col.HeaderStyle.HorizontalAlign = HorizontalAlign.Left  
                    Exit Select  
                Case "Name"  
                    col.HeaderStyle.Width = Unit.Pixel(200)  
                    col.HeaderStyle.HorizontalAlign = HorizontalAlign.Left  
                    Exit Select  
 
 etc etc

Thanks a lot for suggestions!

Clive
Clive Hoggar
Top achievements
Rank 1
 answered on 14 Oct 2009
1 answer
110 views
Hello,
I have a grid with all rows editable when it loads using InPlace edit mode. If I edit a value in a field on one of these rows, then click insert to add a new row to the grid, the values I entered in the row that was already part of the grid are lost.

Is there a way to avoid this?

The edits and the newly added row need to be saved at one time, I cannot do partial saves to my data source.
Thanks
-marcos
Sebastian
Telerik team
 answered on 14 Oct 2009
1 answer
103 views
Hi

Can I use Spell with web controls from other vendors? I try it with a Memo Text from DevExpress and Spell just get the first word from the text.

Regards
Rumen
Telerik team
 answered on 14 Oct 2009
4 answers
129 views
I have a Q2 2009 RadControls for ASP.Net AJAX RadTabStrip on a web page with NO multipage. I use the tabstrip strictly as a navigational tool. Below the tabstrip is a div with some plain old text paragraphs that sits in a contentplaceholder from my masterpage. In IE8 compatibility view, when I hover over one of the tabs on the strip, the div containing the text "collapses" and cuts off the content from the bottom. This doesn't occur in IE8 native mode, Firefox, Chrome, Opera or other modern browsers. Any thoughts? This is driving me mad!
SVA Webmaster
Top achievements
Rank 1
 answered on 14 Oct 2009
1 answer
132 views
I have a page with 2 windowmanagers on it, some controls have their own managers.
This is the manager on the control with the grid.
<telerik:RadWindowManager ID="mgrWindow" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server" > 
    <Windows> 
        <telerik:RadWindow ID="EventDetailsBulkAdd" Behaviors="Close" Width="447" Height="395" Modal="true" NavigateUrl="EventDetailsBulkAdd.aspx" runat="server" OnClientClose="OnWindowClose" /> 
    </Windows> 
</telerik:RadWindowManager> 

I add the confirmtemplate to the window manager on the serverside.
mgrWindow.ConfirmTemplate = new Designer.Web.Controls.ucConfirmEventForm(this.Page); 

In the grid I have a delete button which uses the confirmtemplate.
<telerik:GridButtonColumn HeaderText="Remove" ConfirmText="{FormName}" ConfirmDialogType="RadWindow" ConfirmTitle="Remove" ButtonType="ImageButton" CommandName="Delete" UniqueName="colRemove" ImageUrl="~/Images/icon_delete.gif" > 
                <HeaderStyle HorizontalAlign="Center" Width="60" /> 
                <ItemStyle HorizontalAlign="Center" /> 
            </telerik:GridButtonColumn> 

When I click on the delete button it does not call my confirmtemplate on this control. It calls the other windowmanagers confirmtemplate which is not set and is the first one rendered. I know default RadWindowManager functions call the first RadWindowManager that is rendered on the page. How do I get my delete button to call a specific RadWindowManager?

Georgi Tunev
Telerik team
 answered on 14 Oct 2009
1 answer
97 views

I receive the following error in the CreateSaveStateTrigger  method when adding a RadDock dynamically to a RadDockZone

{"A control with ID '39f41c90af750a469baaf9eacef10f1b6c83__53' could not be found for the trigger in UpdatePanel 'UpdatePanel1'."}


'39f41c90af750a469baaf9eacef10f1b6c83__53'  is the id of the RadDock I am attempting to add.

Here is my code for CreateSaveStateTrigger:

 

private

 

void CreateSaveStateTrigger(RadDock dock)

 

{

 

//Ensure that the RadDock control will initiate postback

 

 

 

 

 

// when its position changes on the client or any of the commands is clicked.

 

 

 

 

 

//Using the trigger we will "ajaxify" that postback.

 

 

 

 

dock.AutoPostBack =

true;

 

dock.CommandsAutoPostBack =

true;

 

 

AsyncPostBackTrigger saveStateTrigger = new AsyncPostBackTrigger();

 

saveStateTrigger.ControlID = dock.ID;

saveStateTrigger.EventName =

"DockPositionChanged";

 

UpdatePanel1.Triggers.Add(saveStateTrigger);

 

saveStateTrigger =

new AsyncPostBackTrigger();

 

saveStateTrigger.ControlID = dock.ID;

saveStateTrigger.EventName =

"Command";

 

UpdatePanel1.Triggers.Add(saveStateTrigger);

}


Any help would be appreciated.

Thanks,

Brian

Jim
Top achievements
Rank 1
 answered on 14 Oct 2009
1 answer
112 views
Hi Telerik Team,

On a project we are working on for some reason we can't get the image manager in a RadEditor to upload images in I.E.

It works fine in Firefox, its accepting uploads and adding them into the file.  In I.E. the upload button is faded out (disabled).

The code that sets up the managers is shown below.

//set up the client folders  
            string[] DocMan = new string[] { "~/ClientResources/" + log.ClientID + "-" + log.Name + "/Docs/" };  
            string[] ImMan = new string[] { "~/ClientResources/" + log.ClientID + "-" + log.Name + "/Images/" };  
            string[] FlashMan = new string[] { "~/ClientResources/" + log.ClientID + "-" + log.Name + "/Flash/" };  
            string[] MediaMan = new string[] { "~/ClientResources/" + log.ClientID + "-" + log.Name + "/Media/" };  
 
 
            //create directorys if they dont exist  
            if (!Directory.Exists(Server.MapPath(DocMan[0])))  
            {  
                Directory.CreateDirectory(Server.MapPath(DocMan[0]));  
            }  
 
            if (!Directory.Exists(Server.MapPath(ImMan[0])))  
            {  
                Directory.CreateDirectory(Server.MapPath(ImMan[0]));  
            }  
 
            if (!Directory.Exists(Server.MapPath(FlashMan[0])))  
            {  
                Directory.CreateDirectory(Server.MapPath(FlashMan[0]));  
            }  
 
            if (!Directory.Exists(Server.MapPath(MediaMan[0])))  
            {  
                Directory.CreateDirectory(Server.MapPath(MediaMan[0]));  
            }  
 
            //set the directorys in the editor  
            RadEditor1.DocumentManager.ViewPaths = DocMan;  
            RadEditor1.FlashManager.ViewPaths = FlashMan;  
            RadEditor1.ImageManager.ViewPaths = ImMan;  
            RadEditor1.MediaManager.ViewPaths = MediaMan;  
            RadEditor1.DocumentManager.UploadPaths = DocMan;  
            RadEditor1.FlashManager.UploadPaths = FlashMan;  
            RadEditor1.ImageManager.UploadPaths = ImMan;  
            RadEditor1.MediaManager.UploadPaths = MediaMan;  
            RadEditor1.DocumentManager.DeletePaths = DocMan;  
            RadEditor1.FlashManager.DeletePaths = FlashMan;  
            RadEditor1.ImageManager.DeletePaths = ImMan;  
            RadEditor1.MediaManager.DeletePaths = MediaMan;  
 
            // endable the image editor  
            RadEditor1.ImageManager.EnableImageEditor = true;  
 
            // Set the max uploads of the managers  
            RadEditor1.ImageManager.MaxUploadFileSize = 4194304;  
            RadEditor1.DocumentManager.MaxUploadFileSize = 4194304;  
            RadEditor1.MediaManager.MaxUploadFileSize = 10485760;  
            RadEditor1.FlashManager.MaxUploadFileSize = 4194304;  
 
            // Set the allowed file types  
            string[] DocPatterns = new string[] {"*.pdf"};  
            string[] ImgPatterns =  new string[] {"*.gif","*.png","*.jpg"};  
            string[] FlashPatterns =  new string[] {"*.swf"};  
            string[] MediaPatterns =  new string[] {"*.avi"};  
 
            RadEditor1.DocumentManager.SearchPatterns = DocPatterns;  
            RadEditor1.ImageManager.SearchPatterns = ImgPatterns;  
            RadEditor1.FlashManager.SearchPatterns = FlashPatterns;  
            RadEditor1.MediaManager.SearchPatterns = MediaPatterns;  
 
            //Load Styles Into Editor  
            RadEditor1.CssFiles.Clear();  
            RadEditor1.CssFiles.Add("~/ClientResources/global.css"); 

                    <telerik:RadEditor ID="RadEditor1" runat="server" Height="500px" Width="750px" Language="en-GB" 
                        ContentFilters="None">  
                        <Content> 
                        </Content> 
                    </telerik:RadEditor> 

We are getting a javascript error of:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; InfoPath.2; Tablet PC 2.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
Timestamp: Fri, 9 Oct 2009 12:55:08 UTC

Message: Object doesn't support this property or method
Line: 43
Char: 1
Code: 0
URI: http://www.imagered.co.uk/iradmin/ScriptResource.axd?d=zVUi-h_5pZ9qabijiqORhifjZOicXN2SuUtcfdQeurd2fgZYD_nF4gzzuWoaEmC7EKgAAkRkokeYMDDs1ryEzfnVb8yFwDt2bdlZ6mfwBgk1&t=ffffffff8baae12e

Message: 'Telerik.Web.UI.FormDecoratorDecoratedControls.Default' is null or not an object
Line: 29
Char: 1
Code: 0
URI: http://www.imagered.co.uk/iradmin/ScriptResource.axd?d=zVUi-h_5pZ9qabijiqORhifjZOicXN2SuUtcfdQeurd2fgZYD_nF4gzzuWoaEmC7EKgAAkRkokeYMDDs1ryEzfnVb8yFwDt2bdlZ6mfwBgk1&t=ffffffff8baae12e

 

We are not getting any errors in Firefox.

any idea why it would be working in Firefox and not I.E?

Rumen
Telerik team
 answered on 14 Oct 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?