Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
153 views
Good day,

We need help with the following problem:
We have a masterpage with 3 different contentplaceholders. One of these (the 'body' contentplaceholder) loads a simple page, which is basically straight from your radwindowmanager samples from here: http://demos.telerik.com/aspnet-ajax/window/examples/windowmanager/defaultcs.aspx

In this 'body' we have the a button:
 runat="server" OnCommand="openalert_Click"

In the cs

    protected void openalert_Click(Object sender, CommandEventArgs e)
    {
        ViewAlert(rwp, "test", rwp.Page);
    }

where the ViewAlert function is basically this:

public static RadWindowManager ViewAlert(RadWindowManager radWinmanager, String Warning = null, Page pTarget = null) {
  string radstrcommand = "radalert('" + Warning + "', 200, 200, 'Test', null);";
  System.Web.UI.ScriptManager.RegisterStartupScript(pTarget, pTarget.GetType(), "call_radalert", radstrcommand, true);
}

Our problem is that any and all attempts to successfully open a radalert after pressing of the button are met with failure.
Using firebug we know that
radWindow is undefined
and
GetRadWindowManager returns undefined
whenever the page reloads after the RegisterStartupScript

We conclude this to be a timing / load order issue of some sort, related to the load time of the radWindow in respect to the trigger of the RegisterStartupScript, but how are we supposed to solve it?
Is there perhaps a better approach to manage the RegisterStartupScript (we don't use ajax for this particular case since we need a postback)

Thanks in advance
Marin Bratanov
Telerik team
 answered on 09 Apr 2014
8 answers
659 views
Hi ...

Please give me a quick answer, I have an urgent requirement:
Is Radgrid always in ediatble mode?
I am using <telerik:GridEditCommandColumn> a one of my columns, will it make the grid to editable mode?

In which event can I restrict the mode to non-editable?

Please tell me where am I going wrong?

My markup code:


<

 

telerik:RadGrid ID="RadGrid1" runat="server"

 

 

AutoGenerateColumns ="false" OnNeedDataSource ="RadGrid1_NeedDataSource" OnInsertCommand ="RadGrid1_InsertCommand" EnableAJAX="True"

 

 

OnUpdateCommand ="RadGrid1_UpdateCommand" OnDeleteCommand ="RadGrid1_DeleteCommand" OnEditCommand ="RadGrid1_EditCommand" AllowPaging="True" >

 

 

 

<MasterTableView DataKeyNames="id" GridLines="None" Width="100%" EditMode="inplace" CommandItemDisplay ="Top" >

 

 

 

<Columns>

 

 

<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete">

 

 

</telerik:GridButtonColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="ProductID" UniqueName ="MultiColumnCombo" ItemStyle-Width="240px">

 

 

<ItemTemplate>

 

<%

#DataBinder.Eval(Container.DataItem, "prod_id")%>

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

<telerik:RadComboBox runat="server"

 

 

ID="RadComboBox1"

 

 

DataTextField="id"

 

 

DataValueField="id"

 

 

HighlightTemplatedItems="true"

 

 

Height="190px"

 

 

Width="220px"

 

 

DropDownWidth="420px">

 

 

<HeaderTemplate >

 

 

<ul>

 

 

<li class="col1">ID </li>

 

 

<li class="col2">NAME</li>

 

 

<li class="col3">DESCRIPTION</li>

 

 

</ul>

 

 

</HeaderTemplate>

 

 

<ItemTemplate >

 

 

<ul>

 

 

<li class="col1"><%#DataBinder.Eval(Container.DataItem, "id")%></li>

 

 

<li class="col2"><%#DataBinder.Eval(Container.DataItem, "name")%></li>

 

 

<li class="col3"><%#DataBinder.Eval(Container.DataItem, "description")%></li>

 

 

</ul>

 

 

</ItemTemplate>

 

 

</telerik:RadComboBox>

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridBoundColumn FilterControlWidth="50px" DataField="id" HeaderText="ID" SortExpression="id"

 

 

UniqueName="id" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn FilterControlWidth="50px" DataField="line_id" HeaderText="Line ID" SortExpression="line_id"

 

 

UniqueName="line_id" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn FilterControlWidth="50px" DataField="ship_date" HeaderText="SHIP DATE" SortExpression="ship_date"

 

 

UniqueName="ship_date" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn FilterControlWidth="50px" DataField="quantity" HeaderText="Quantity" SortExpression="quantity"

 

 

UniqueName="quantity" >

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridButtonColumn CommandName="MyCommand" ButtonType="ImageButton" UniqueName="ButtonColumn"></telerik:GridButtonColumn>

 

 

<telerik:GridEditCommandColumn UpdateText="Update" UniqueName="EditCommandColumn"

 

 

CancelText="Cancel" EditText="Edit">

 

 

<HeaderStyle Width="85px"></HeaderStyle>

 

 

</telerik:GridEditCommandColumn>

 

 

</Columns>

 

 

 

<ExpandCollapseColumn Visible="False">

 

 

<HeaderStyle Width="19px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<RowIndicatorColumn Visible="False">

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick"

 

 

OnGridCreated="GridCreated" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

help me plz.............

 

Pavlina
Telerik team
 answered on 09 Apr 2014
1 answer
88 views

It seems that the Font Face command does not actually fire, or at least does not insert its span with a font-family style, into the Content area of the RAD Editor until you actually start typing.  Therefore, if you select a font, then immediately use another command, such as Bold, the selected font is "forgotten".  When you  start typing, you will see that a <strong></strong> tag has been inserted, but the "font span" that should have been inserted when you selected a font is missing.

To reproduce the problem:

Select a font
Use any other control, such as Font Size or Bold
Notice the Font You chose has been reset
Begin Typing
Notice you are not typing in the font you selected.
Switch to HTML view, and notice that there is no <span style="font-family"> tag

I have tried injecting that "font span" immediately into the content area during the "OnClientCommandExecuting" event, when the command is "FontName".  Unfortunately, while this does insert the font span, it also puts the cursor AFTER the injected span, so when the user executes another command, such as Bold, the font selection still appears not to be effective.  To remedy THAT problem, I attempted to get a Range object from the current selection, manipulate its start/end, and then select it.  However, I could not make that strategy work reliably.

Help?

 

Ianko
Telerik team
 answered on 09 Apr 2014
3 answers
99 views
Hi,
I have a one RadModel Dialog window.. From that model window how can i open a regular(big) Radwindow?

Problem Is: New Radwindow opens only inside that Model window
Marin Bratanov
Telerik team
 answered on 09 Apr 2014
3 answers
996 views
I am using Telerik controls V2014.1.225.45 and am a newbie.

I am trying to update a TextBox that I have added as "hidden".  I am unsuccessful.  I've looked at most of the forums for help have not found how to correct this problem.

The text in the hidden text box is set to "a".  I am able to retrieve this value.  However, all variations of the set_text or set_value fail to change the value. 

Here is my Javascript code:

        <script type="text/javascript" id="Script1">
            //<![CDATA[

            function RadToolBar1_ButtonClicked(sender, args) {

                alert(args.get_item().get_level());
                if (args.get_item().get_level() == 1) {
                    alert(args.get_item().get_text());
                    var w = $find("<%= RadTextBox1.ClientID %>");
                    var wb = $get("<%= RadTextBox1.ClientID %>").value;
                    var wa = document.getElementById("<%= RadTextBox1.ClientID %>").style;
                    var x = $find("<%= RadPanelBar1.ClientID %>");
                    var x = document.getElementById("<%= RadPanelBar1.ClientID %>");
                    var y = document.getElementById("<%= RadPanelBar1.ClientID %>").style;
                    var y = document.getElementById("<%= RadPanelBar1.ClientID %>").style;
                    y.visibility = "hidden";
                    y.display = "none";
                    wa.display = "none";
                    wb.value = "hidden";
                    wb.set_value = "hidden";
                    w.set_textBoxValue = "hidden";
                    document.getElementById("<%= RadTextBox1.ClientID %>").set_textBoxValue = "hidden";
                    var v = document.getElementById("<%= RadTextBox1.ClientID %>").value;
                    alert(args.get_item().get_text());

            }

Marin Bratanov
Telerik team
 answered on 09 Apr 2014
4 answers
138 views

How these operations are translated in web.config file :

Set HTTP headers

  • Cache-Control: public, max-age=31536000

  • Expires - 1 year from the date of the request, if set dynamically. Far-future date (10 years) if set statically.

  • For all files in the Scripts/ajaxz folder: Content-Encoding: gzip

  • For .css files in the Skins/ajaxz folder: Content-Encoding: gzip

Eirik H
Top achievements
Rank 2
 answered on 09 Apr 2014
6 answers
123 views
Hello,

I have been using Telerik in Visual Studio Enterprise 2010 for over 2 years and just last week, just after the latest Windows patch, the Intellisense broke.  It only recognizes .Net framework objects and tags now.  I have Telerik defined in both Web.Config and the pages themselves but it just won't work.

Please help. 

Thank you.
Misho
Telerik team
 answered on 09 Apr 2014
5 answers
90 views
Hi all

After upgrading to the latest release I get the error "Telerik.Web.UI.RadAjaxLoadingPanel with ID='LoadingPanel1' was unable to find an embedded skin with the name 'Transparent'."

Was this skin eliminated from the release package?  If so, what options do I have since I am depend heavily on this skin all over the system. 

Thanks
Rumen
Telerik team
 answered on 09 Apr 2014
1 answer
109 views
I can see from the many threads suggesting to use PDFForge as a means of exporting the OrgChart to PDF, but is there any plans for incorporating that into a future version?  I ask because our requirements are to generate a PDF file programmatically (in bulk) from the generated org chart.
Peter Filipov
Telerik team
 answered on 09 Apr 2014
3 answers
163 views
Hello,

I am using the "Teleric C# Web Application" template for my project, and I am defining the skin in the web.config.

For 98% of my application, the theme arrangements of the skin are suitable.  I need to display a grid of normalized data of two related entities and the requirement is that the columns that represent the respective entities are different colors.  I need to set these values in two places ... on the web page and in the excel export.  I have some code samples below.

What I need is to be able to find some reference to a skin element (like the row color/alternate row color) and set these properties to the respective html color of that element to avoid the hard-coded values and not disconnect visual elements from the theme.

Thanks.

The grid cell background:

BasicGrid.Columns[0].ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#ffffcc");


The excel table cells were more difficult to get to, but I this works for me:

protected void BasicGrid_ExcelExportCellFormatting(object sender, ExcelExportCellFormattingEventArgs e)
{
    if (e.Cell.UniqueID.Contains("ctl"))
    {
        TableCell cell = e.Cell as TableCell;
        int columnId = -1;
        String uniqueid = e.Cell.UniqueID.Split('$').Last();
        if (Int32.TryParse(uniqueid.Replace("ctl", ""), out columnId))
        {
            if (columnId <= this._midPoint + 1)
            {
                cell.Style["text-align"] = "left";
                cell.Style["background-color"] =  "#ffffcc";
                     //Needs to be the row color of the applied theme
            }
            else
            {
                cell.Style["text-align"] = "right";
                cell.Style["background-color"] = "#ccffcc";
                    //Needs to be the row alternate color of the applied theme
            }
        }
    }
}

Eyup
Telerik team
 answered on 09 Apr 2014
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
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
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?