Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
424 views
We are programmatically creating the grid in the code base.

We have added a DateTime column in the Grid by the following way

  public GridDateTimeColumn AddGridDateTimeColumn(string columnHeader,string columnDataField,string uniqueName,string formatString,double percentWidth,bool readOnly,bool visible)
        {
            GridDateTimeColumn dateTimeColumn = new GridDateTimeColumn
                                                    {
                                                        HeaderText       = columnHeader,
                                                        DataField        = columnDataField,
                                                        UniqueName       = uniqueName,
                                                        ReadOnly         = readOnly,
                                                        Visible          = visible,
                                                        DataFormatString = formatString,
                                                        PickerType       =  GridDateTimeColumnPickerType.DatePicker,
                                                        DataType         =  typeof(DateTime)
                                                    };
            dateTimeColumn.ItemStyle.Width = Unit.Percentage(percentWidth);
 
            TelerikGrid.MasterTableView.Columns.Add(dateTimeColumn);
            return dateTimeColumn;
        }


When we click on Edit button on the row of the Grid.

I am trying to fetch the GridDateTimeColumnEditor by the following line of code

GridEditableItem editedItem = e.Item as GridEditableItem;
GridEditManager editMan = editedItem.EditManager;

if (!(e.Item is GridEditFormInsertItem))
{
GridDateTimeColumnEditor dateTimeEditor = editMan.GetColumnEditor("StatementEndDateUniqueName"as GridDateTimeColumnEditor;
} The GetColumnEditor method throws error Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Editor cannot be initialized for column: StatementEndDateUniqueName The StatementEndDateUniqueName is valid. I am able to view the data , but while in Edit Mode, I get the error. Can someone help me with this? Thanks, Sunil Dixit
Tsvetina
Telerik team
 answered on 30 Jun 2011
1 answer
68 views
I am using Rad Charts in my ASP.Net pages.

My machine configuration is as folllows

Windows Edition: Windows Server 2008 R2 Enterprise
64-bit OS
It has IIS7 & .Net framework 3.5

My code details are as follows.

I am using Telerik.Web.UI.dll (version: 2009.2.701.35)


Added following in my Web.Config httpHandlers section.
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
            <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2009.2.701.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

Also added ScriptManager tag to the top of our web page.


It worked fine when my website in the Classic ASP.Net application pool.
But gave error when my website is moved to integrated application pool.
redirecting to  /ChartImage.axd?UseSession=true&ChartID=f83b7f0a-99df-4b5b-bda9-cf3bb9613568_chart_ctl00$MainContentPlace$radCharts&imageFormat=Png&random=0.574960174772404


Can you please get back to me why I am getting this error?
What additional configurations I need to do to get the rad charts in my website when it is in inegrated application pool?

FYI: We are using SQL Server sessions. (Session State : SQL Server)

Thanks in advance

Regards
Naga Kiran
Giuseppe
Telerik team
 answered on 30 Jun 2011
5 answers
182 views
Greetings

I would like to Clear my RadTooltipManage similarly to how is Clear on the Tooltipified Radgrid example.

RadToolTipManager1.TargetControls.Clear();

However, I would like to do it on the client -  OnClientHide event. My scenario is having a DetailView on the tooltip, all my fields are bind correctly, however for some reason there is a checkbox that start showing the value of true after i mouse over a record that has a value of true.

When I change the page it stop happening, given that the Radgrid_ItemCommand calls the above RadtooltipManager1.TargetControls.Clear() statement I suppose. however, once i mouse over a record with the checkbox value = true all my record in the page start showing value = true. It is important to point out that this is the only field in the detailview that is doing this.

I think that clearing the control everytime it hides can do the trick, how do i call the above clear statment on the client?

function OnClientHide(sender, eventArgs)
        {
            // RadTooltipManager Clear Statement.
        }


Svetlina Anati
Telerik team
 answered on 30 Jun 2011
3 answers
224 views
Hello Telerik!

Here's a challenge for you! I have implemented a RadEditor coupled with a RadTreeView(within a RadPanelBar) with Drag-and-Drop functionality packaged into a user control(example taken from this site).

When this user control is placed squarely onto an aspx page, it works perfectly fine. My problem is this, I have two instances of this user control within my web project: The one on the page(instance #1; works fine), and there is another instance placed within a custom user control(instance #2; broken); which is a custom-built(legacy) ModalPopup user control using an UpdatePanel. This ModalPopup is then placed within another user control(let's call it KeyView). And KeyView is placed on an aspx page within an UpdatePanel on the page.

I do realize that instance #2 is not ideal or optimal, but I have to figure out a way to make this work in the most time efficient manner possible; the various layers of UpdatePanels have created a multitude of issues with script tags and CSS within markup not being recognized. Most of these issues have been resolved when I migrated all of the script tags/CSS into external files and registered them from the code behind on the page.

The last remaining issue that I am seeing is that when I create a custom ContentFilter for my RadEditor, I am configuring what is seemingly basic functionality for the ContentFilter and it is not being recognized, I am attaching a screenshot of the error, and I will paste my code below:
function OnEditorLoad(editor, args) {
    if (editor) {
        editor.get_filtersManager().add(new myConvertFilter());
        editor.attachEventHandler("onkeydown", reKeyDown);
        editor.attachEventHandler("onkeyup", reKeyDown);
    }
}
 
myConvertFilter = function () {
myConvertFilter.initializeBase(this);
this.set_isDom(false);
this.set_enabled(true);
this.set_name("html filter");}
myConvertFilter.prototype =
{
getHtmlContent : function(content)
{
var IndexValue = document.getElementById('ctl00_ContentPlaceHolder1_akvAssets_ucTextEditor_mpTextEditor_ucta_ddlOutputChannel').selectedIndex;
var SelectedVal = document.getElementById('ctl00_ContentPlaceHolder1_akvAssets_ucTextEditor_mpTextEditor_ucta_ddlOutputChannel').options[IndexValue].value;
var newContent = content;
if (SelectedVal == "1") {
newContent = newContent.replace(/©/g,"\[c\]");
newContent = newContent.replace(/®/g,"\[r\]");
newContent = newContent.replace(/â„¢/g,"\[t\]");
newContent = newContent.replace(/•/g,"\[b\]");
newContent = newContent.replace(/–/g,"\[n\]");
newContent = newContent.replace(/—/g,"\[m\]");
newContent = newContent.replace(/¶/g,"\[ps\]");
newContent = newContent.replace(/§/g,"\[ds\]");
newContent = newContent.replace(/†/g,"\[da\]");
newContent = newContent.replace(/‡/g,"\[dd\]");
newContent = newContent.replace(/<STRONG>/g,"<b>");
newContent = newContent.replace(/<\/STRONG>/g,"<\/b>");
newContent = newContent.replace(/<FONT/g,"<font");
newContent = newContent.replace(/<\/FONT>/g,"<\/font>");
newContent = newContent.replace(/<B>/g,"<b>");
newContent = newContent.replace(/<\/B>/g,"<\/b>");
newContent = newContent.replace(/<strong>/g,"<b>");
newContent = newContent.replace(/<\/strong>/g,"<\/b>");
newContent = newContent.replace(/<U>/g,"<u>");
newContent = newContent.replace(/<\/U>/g,"<\/u>");
newContent = newContent.replace(/<BR>/g,"<br>");
newContent = newContent.replace(/<\/BR>/g,"<\/br>");
newContent = newContent.replace(/<SUP>/g,"<sup>");
newContent = newContent.replace(/<\/SUP>/g,"<\/sup>");
newContent = newContent.replace(/<EM>/g,"<i>");
newContent = newContent.replace(/<\/EM>/g,"<\/i>");
newContent = newContent.replace(/<I>/g,"<i>");
newContent = newContent.replace(/<\/I>/g,"<\/i>");
newContent = newContent.replace(/<P/g,"<p");
newContent = newContent.replace(/<\/P>/g,"<\/p>");
newContent = newContent.replace(/<T/g,"<t");
newContent = newContent.replace(/<\/T>/g,"<\/t>");
newContent = newContent.replace(/align=/g,"alignment=");
} return newContent;},
 
getDesignContent : function(content)
{
var IndexValue = document.getElementById('ctl00_ContentPlaceHolder1_akvAssets_ucTextEditor_mpTextEditor_ucta_ddlOutputChannel').selectedIndex;
var SelectedVal = document.getElementById('ctl00_ContentPlaceHolder1_akvAssets_ucTextEditor_mpTextEditor_ucta_ddlOutputChannel').options[IndexValue].value;
var newContent = content;
if (SelectedVal == "1") {
newContent = newContent.replace(/\[c\]/g,"©");
newContent = newContent.replace(/\[r\]/g,"®");
newContent = newContent.replace(/\[t\]/g,"â„¢");
newContent = newContent.replace(/\[b\]/g,"•");
newContent = newContent.replace(/\[n\]/g,"–");
newContent = newContent.replace(/\[m\]/g,"—");
newContent = newContent.replace(/\[ps\]/g,"¶");
newContent = newContent.replace(/\[ds\]/g,"§");
newContent = newContent.replace(/\[da\]/g,"†");
newContent = newContent.replace(/\[dd\]/g,"‡");
newContent = newContent.replace(/<b>/g,"<STRONG>");
newContent = newContent.replace(/<\/b>/g,"<\/STRONG>");
newContent = newContent.replace(/<font/g,"<FONT");
newContent = newContent.replace(/<\/font>/g,"<\/FONT>");
newContent = newContent.replace(/<b>/g,"<B>");
newContent = newContent.replace(/<\/b>/g,"<\/B>");
newContent = newContent.replace(/<b>/g,"<strong>");
newContent = newContent.replace(/<\/b>/g,"<\/strong>");
newContent = newContent.replace(/<u>/g,"<U>");
newContent = newContent.replace(/<\/u>/g,"<\/U>");
newContent = newContent.replace(/<br>/g,"<BR>");
newContent = newContent.replace(/<\/br>/g,"<\/BR>");
newContent = newContent.replace(/<sup>/g,"<SUP>");
newContent = newContent.replace(/<\/sup>/g,"<\/SUP>");
newContent = newContent.replace(/<i>/g,"<EM>");
newContent = newContent.replace(/<\/i>/g,"<\/EM>");
newContent = newContent.replace(/<i>/g,"<I>");
newContent = newContent.replace(/<\/i>/g,"<\/I>");
newContent = newContent.replace(/<p/g,"<P");
newContent = newContent.replace(/<\/p>/g,"<\/P>");
newContent = newContent.replace(/<t/g,"<T");
newContent = newContent.replace(/<\/t>/g,"<\/T>");
newContent = newContent.replace(/alignment=/g,"align=");
} return newContent; }
 
}
 
myConvertFilter.registerClass('myConvertFilter', Telerik.Web.UI.Editor.Filter);

As you can see from the screenshot, it breaks on: this.set_isDom(false);. If I were to comment out that line, it breaks on any of the following lines:
this.set_isDom(false);
this.set_enabled(true);
this.set_name("html filter");

I am also seeing, and this is notated in the bordered section of the screenshot, that set_isDom, set_enabled, and set_name are not available methods of "this".

Anyway, I hope someone can shed some light on this issue, I welcome any and all suggestions and comments, I do realize that this is not an ideal way to be doing this. I just need some help on how to get this to a working state until I can have enough time to fix this in a proper manner.

Thanks in advance!
Dobromir
Telerik team
 answered on 30 Jun 2011
2 answers
74 views
Hey, oh Telerik Gurus,

Getting ready to purchase a Telerik license - been playing around with the widgets for a while... (really like your guys style by the way!)
Suddenly got a message from IE that it had reached the limit on the number of style sheets (31?)
Incidentally, NO IDEA WHY! But now that it has happened, things are painful!

I've been trying to find a way around this...
I created a custom skin, embedded all of the CSS and images into a DLL, but now having trouble getting the same kind of declarative performance that I would like if I were not going down this path.

For example, how can I just grab an image to put into a url? For example, <asp:Image ImageUrl=?????? /> What can I do?

Also having trouble getting the theme to be automatic across all pages in my website...
(e.g., the "theme" option on the "pages" entry in the web.config can't seem to find the theme in the DLL)

Any examples or suggestions?
Thanks.
Chris
Chris
Top achievements
Rank 1
 answered on 30 Jun 2011
10 answers
212 views
Hi all,

Currently I have in my code-behind some javascript that I would like to move to its own, separate .js file. The problem is that all this javascript is wrapped in a RadCodeBlock and I am not sure what portions of it need that RadCodeBlock.

Is there anything I should be aware of before just cutting all the javascript out of a code block to move it to its own file? Is it possible to move the RadCodeBlock with it, or at least achieve the same functionality of wrapping all the JS in a RadCodeBlock?

Thanks
archimede
Top achievements
Rank 1
 answered on 30 Jun 2011
4 answers
170 views
Hi Friends,

I'm new to Rad Controls, so I'm struggling with one issue..

I have one requirement same as this link contains..

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx

but my problem is I have to remove the headers of each column, in place of that I have to place one Label, checkbox and a Button..

Can any one please help me how to resolve this..

Thanks for help in advance..



Naresh
Top achievements
Rank 1
 answered on 30 Jun 2011
2 answers
120 views
The RadMultiPage height. is ignored by IE9 and FireFox 4.

Below our code:

        <telerik:RadMultiPage ID="rmTabPage" runat="server" CssClass="MultiPage" SelectedIndex="0"  Height="740">
        </telerik:RadMultiPage>

BTW: In Chrome it works fine.

Is this a bug or am i doing something wrong?

Regards,
Dick van Straaten


Dick
Top achievements
Rank 1
 answered on 30 Jun 2011
1 answer
60 views
Hi All,

 I have make a grid with some template column. I am applying aggregate on it. It is successfully applied. But footertext handling is not proper. I want to get text value for footer from resource file. But FooterText can not do. So how we can handle footer text in footer template

<rad:GridTemplateColumn DataField="NoOfYear" UniqueName="NoOfDays"  FooterText="Can not use for multiple langages " Aggregate="Sum" GroupByExpression="NoOfDays Group By NoOfDays">
                    <HeaderTemplate>
                        <asp:Label ID="NoOfDaysHeaderLabel" runat="server" Text="code for getting text From Resouce file"/>
                    </HeaderTemplate>
                    <ItemTemplate>
                     <%#DataBinder.Eval(Container, "DataItem.NUMBER_OF_DAYS")%>                          
                       </ItemTemplate>                


                    <ItemStyle Width="3%" />                   
                </rad:GridTemplateColumn>

I want to handle footertext there      
<FooterTemplate>
                        <asp:Label ID="NoOfDaysFooterLabel" runat="server" Text="code for getting text From Resouce file"/>
                    </FooterTemplate>

Kindly provide solution.
Princy
Top achievements
Rank 2
 answered on 30 Jun 2011
3 answers
72 views
Hi.
I want a TreeView with the same looks as RadPanelBar or a RadPanelBar with the same functionality as TreeView.
I've successfully made a RadPanelBar with load on demand, but i got stuck when i needed to implement ie drag and drop.

If I choose the TreeView, I must be able to change the appearance so that all items are streched with full width of the control. 

Do you have any tips on how to make this happen?

Regards /Richard
Richard
Top achievements
Rank 1
 answered on 30 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?