Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
344 views
Is there Rad control like RadHtmlPlaceHolder, to display html content for web application?
I want to display external html files on my content page.
Princy
Top achievements
Rank 2
 answered on 19 Aug 2013
1 answer
83 views
hello, 

i want to set default size in Dropdownlist Size using tool file:

iam using this code:
<script type='text/javascript'>
        function OnClientLoad(editor, args) {
           
            var fontFamily = editor.getToolByName("FontName");
            var fontSize = editor.getToolByName("FontSize");
            var timeout = (document.all) ? timeout = 0 : timeout = 1000;
            setTimeout(function () {
                fontFamily._element.getElementsByTagName("span")[0].innerHTML = "Arial"; 
                fontSize._element.getElementsByTagName("span")[0].innerHTML = "2";
            }, timeout);
        }</script>

i can set default size (1.jpg File Attach), but when i write some word in Editor, the Size is changed to "Size" and RealFontSize is Changed (2.jpg File Attach).

Please Help me to resolve  Set Default Size ( not real font size) and do not change.

this is content of toolfile.xml:

<root>
<tools name="MainToolbar" dockable="true" enabled="true">
<tool name="AjaxSpellCheck" />
<tool name="FindAndReplace" />
<tool separator="true"/>
<tool name="Undo" />
<tool name="Redo" />
<tool separator="true"/>
<tool name="Cut" />
<tool name="Copy" />
<tool name="Paste" shortcut="CTRL+!"/>
</tools>

<tools name="Formatting" enabled="true" dockable="true">
<tool name="Bold" />
<tool name="Italic" />
<tool name="Underline" />
<tool separator="true"/>
<tool name="ForeColor" />
<tool name="BackColor"/>
<tool separator="true"/>
<tool name="FontName"/>
<tool name="FontSize"/>
<tool name="RealFontSize"/>   
</tools>

</root>
.



thanks So much!!


Shinu
Top achievements
Rank 2
 answered on 19 Aug 2013
1 answer
200 views
I have a grid where I hide rows on the client side based on a combobox selection.  Something like this:

var grid = $find('<%=MyGrid.ClientID %>');
var masterTableView = grid.get_masterTableView();
 
// iterate through the rows and then use the
masterTableView.showItem();
//and
masterTableView.hideItem()
//methods

When I do a biff export, all the data is exported, regardless of the visibility I just set on the rows client-side.

My goal is to keep the same rows hidden for the export.

My idea was to use the grid's BiffExporting event to manipulate the ExportInfrastructure.Table object, and hide the same rows.  Is this possible?  Or am I going about this the wrong way?  I'm not even sure the visibility of the rows is available to me server side since I set them on the client side...
Princy
Top achievements
Rank 2
 answered on 19 Aug 2013
6 answers
179 views
Hi All,

I am attempting to ajaxify specific controls dynamically. I have a repeater and i want to ajaxify image buttons inside the repeater.

On ItemCreated for the repeater i am:

protected void RptCategories_ItemCreated(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                ImageButton imgbtn = (ImageButton)e.Item.FindControl("iBtnRemoveCategory");
                this.RadAjaxManager1.AjaxSettings.AddAjaxSetting(imgbtn, RptCategories, RadAjaxLoadingPanel1);
            }
        }

The line where i am adding the AjaxSetting i am getting the error: ArgumentNullException was unhandled by user code, value cannot be null, Parameter Page.

It seems the RadAjaxManager doesn't know where it is.. this is a form page with a masterpage.. no usercontrols..Please help. THanks.

James
Top achievements
Rank 1
 answered on 19 Aug 2013
4 answers
140 views
I have problems using the RadAjaxManager in a CMS called "Umbraco".

when I want to add ajaxsetting in umbraco page dynamically, I got some error .
 
[ArgumentNullException: Value cannot be null. Parameter name: page] Telerik.Web.UI.RadAjaxManager.GetCurrent(Page page) +170 Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel) +294 

here is my simple code

public partial class ProductListSetting :   UmbracoEnsuredPage
    {
    protected void Page_Load(object sender, EventArgs e)
        {
             
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(save, rgProductList,null);
        }
}


Thanks.


James
Top achievements
Rank 1
 answered on 19 Aug 2013
4 answers
248 views
Hi,

I have an asp repeater and i wanted to ajaxify the linkbutton on itemcreated but i am getting an error message. Can you please let me know what I am doing wrong?

Error: Value cannot be null, Parameter Page
at Telerik.Web.UI.RadAjaxManager.GetCurrent(Page page)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel, UpdatePanelRenderMode renderMode, Unit updatePanelHeight)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel, UpdatePanelRenderMode renderMode)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel)
at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl)
at com.celero.los_2.WebApp.Controls.Popups.CollateralAssetListControl.rptAssetList_ItemCreated(Object sender, RepeaterItemEventArgs e)
at System.Web.UI.WebControls.Repeater.OnItemCreated(RepeaterItemEventArgs e)
at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)
at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.Repeater.DataBind()
at com.celero.los_2.WebApp.Controls.Popups.CollateralAssetListControl.BindAssetGrid()
at com.celero.los_2.WebApp.Controls.Popups.CollateralAssetListControl.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at com.celero.los_2.WebApp.PresentationLogic.UserControlBase.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at com.celero.los_2.WebApp.Framework.ModalPopup.ModalPopupControl.LoadContentControl()
at com.celero.los_2.WebApp.Framework.ModalPopup.ModalPopupControl.OpenPopup()
at com.celero.los_2.WebApp.Pages.Collateral.btnAddCollateralAsset_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Below is the HTML mark up
<asp:Repeater ID="rptAssetList" runat="server" EnableViewState="false" OnItemCommand="rptAssetList_ItemCommand" OnItemCreated="rptAssetList_ItemCreated">
    <ItemTemplate>
        <tr class="GridRow">
            <td>
                <asp:LinkButton ID="btnSelectAsset" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_TYPE")%>'
                    CommandName="Select" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_ID")%>'>
                </asp:LinkButton>
            </td>
            <td>
                <div>
                    <%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
                </div>
            </td>
            <td>
                <div style="text-align: right;">
                    <%# DataBinder.Eval(Container.DataItem, "BALANCE", "{0:c}")%>
                </div>
            </td>
        </tr>
    </ItemTemplate>
    <AlternatingItemTemplate>
        <tr class="GridAlternRow">
            <td>
                <asp:LinkButton ID="btnSelectAsset" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_TYPE")%>'
                    CommandName="Select" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ASSLIB_ID")%>'>
                </asp:LinkButton>
            </td>
            <td>
                <div>
                    <%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
                </div>
            </td>
            <td>
                <div style="text-align: right;">
                    <%# DataBinder.Eval(Container.DataItem, "BALANCE", "{0:c}")%>
                </div>
            </td>
        </tr>
    </AlternatingItemTemplate>
</asp:Repeater>

The code Behind. I'm bascially adding an ajax setting on the btnSelectAsset on 4 asp Panel below.
And the Error is "Value cannot be null"
protected void rptAssetList_ItemCreated(object sender, RepeaterItemEventArgs e)
{
 
    if (e.Item.ItemType == ListItemType.AlternatingItem ||
                                e.Item.ItemType == ListItemType.Item)
    {
        LinkButton btnSelectAsset = (LinkButton)e.Item.FindControl("btnSelectAsset");
        if (btnSelectAsset != null)
        {
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlShortTerm);
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlPropertyFields);
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlPpsa);
            RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(btnSelectAsset, pnlVehicle);
        }
    }
}
James
Top achievements
Rank 1
 answered on 19 Aug 2013
2 answers
113 views
Hi,

I am creating telerik rad grid dynamically based on the columns present in the database.  Problem is, I need to attach an updatepanel.

The aspx page has the following code

 

<form id="aspnetForm" method="post" runat="server" style="overflow: hidden">

 

 

 

 

<asp:ScriptManager id="MainScriptManager" EnablePartialRendering="true" runat="server"></asp:ScriptManager>

 

 

 

 

<telerik:RadAjaxManager ID="TelerikAjaxManager" runat="server" EnableAJAX="true">

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="TelerikAjaxLoadingPanel" runat="server" Height="75px" Width="75px" Transparency="50">

 

 

 

 

<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />

 

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 


In the code behind I am creating the grid by the following code.  Now I need to
specify the updatepanel for the grid (please see the red line below).  If ....

GridControlTelerik

Grid = UICommon.CreateMainetGridTelerik(this, SInfo.Name, RecordId, CanUpdate && !isReadOnly, controlStyles);

 

 

 

 

TelerikAjaxManager.AjaxSettings.AddAjaxSetting(Grid, Grid, TelerikAjaxLoadingPanel);

 

 

 

 

if (mainetGrid == null) break;

.......

I do this I get the following error:

 

Exception information:
Exception type: Telerik.Web.UI.
Exception message: Value cannot be null.
Parameter name: page

Thread information:
   at Telerik.Web.UI.RadAjaxManager.GetCurrent(Page page)
   at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl, RadAjaxLoadingPanel loadingPanel)
   at Main_Edit.ArrangeFieldsForEdit(ArrayList screenInfoList, ArrayList FRequiredList) in D:\...\Main_Edit.aspx.cs:line 10185
   at Main_Edit.InitLegacyControls(ArrayList screenInfoList) in D:\...\Main_Edit.aspx.cs:line 3631
   at Main_Edit.SetupControls() in D:\...\Main_Edit.aspx.cs:line 3256
   at Main_Edit.Page_Init(Object sender, EventArgs e) in D:\...\Main_Edit.aspx.cs:line 808
   at System.Web.UI.Control.OnInit(EventArgs e)
   at System.Web.UI.Page.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint).

Can you please help me to fix this error. 

Regards,
Senthil

 

 

James
Top achievements
Rank 1
 answered on 19 Aug 2013
1 answer
81 views
Hi there,
       I want to remove the cell tooltip from the RadDatePicker. How can I have it done?? Would appreciate if someone could come up with a code snippet that helps..

thanks in advance
Savyo
Shinu
Top achievements
Rank 2
 answered on 19 Aug 2013
7 answers
791 views
I've got a general ViewState question. Here's how I'm using Telerik and Ajax in my Web App.

1. Using an .aspx page as the shell that loads a web user control (.ascx) that acts as sort of a master page to additional (.ascx) pages based on what the user selects. So Master.ascx has a tree control and this tree envokes different .ascx pages to load on the right side of the page based on what users select.

2. I've got a class that is keeping a session variable to remember data based on user clicks

So, all is well until I open a second window and cut and paste the same exact URL into it. 
I'm not forced to login it just opens just like the original window.

Here's where it gets hairy. If I start to click in Window 2, I am able to load all of the secondary .ascx pages as I go without any issues. Now if I go back to Window 1 I get all sorts of errors referring to ViewState not being able to load.....

This error seems very generic and I'm unable to get to the bottom of it. Any ideas where I should start looking?

Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
http://localhost/PDMPlanroom/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2
Line 15
Andrey
Telerik team
 answered on 19 Aug 2013
1 answer
80 views
Hi,

We have a requirement to spellcheck on form submission. Since the form is quite big, we had to use RadTabStrip to show the form in the multi tabs using RadMultiPage. I got the solution from here that triggers the spellcheck on form submission. However, this does not work if the RadEditor is in an inactive tab. Is there a way to achieve the spellcheck on hidden RadEditor on submission?

Thank you,

James
Ianko
Telerik team
 answered on 19 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?