Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
373 views

I would like to know how to have OnBatchEditCellValueChanged even on my batch edit grid to fire on every key press of the edit UI.  Off hand I'm trying to find a way to do it from the MAGIC place holder I have below, in the OnKeyPress event.

 

                        <telerik:GridTemplateColumn HeaderText="Amount" SortExpression="Amount" UniqueName="Amount"
                             HeaderStyle-Width="140px">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblAmount" Text='<%# Eval("Amount", "{0:C}") %>'  
                            </ItemTemplate>
                            <EditItemTemplate>
                                <span style="white-space:nowrap;">
                                    <telerik:RadNumericTextBox Width="100%" runat="server" ID="rntAmount" Type="Currency" MaxLength="13" 
                                        NumberFormat-DecimalDigits="2" MinValue="0" ClientEvents-OnKeyPress="MAGIC" />  
                                    </span>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>

 

So far I have played around with:

function MAGIC(sender, args){

            var manager = rgMyRadGrid.get_batchEditingManager();
            var cell = manager.get_currentlyEditedCell();
            var cellValue = manager.getCellValue(cell);

           manager.endUpdate();  //maybe this will auto fire the event?  Didn't seem too...

           manager.changeCellValue(cell, cellValue); //this could work, but is messy... cellValue is the 'old' value prior to key press and it highlights the text every key press.

}

Vasssek
Top achievements
Rank 1
 answered on 30 Mar 2018
4 answers
372 views
i want to make a tabstrip with very small tabs, which i guess means reducing the padding in the tabstrip common css file , but then that will affect all tabstrips (will it?)

so i guess then i need to rename all the classes in the common tabstrip css file but how do i tell tabstrip to use all my new classes ?


thanks
kevin
vamshi
Top achievements
Rank 1
 answered on 29 Mar 2018
0 answers
99 views

I am looking to customize RadConfirm box, I want to have the buttons say ok cancel or yes no and no close button,

<input id="btnReadOnly" type="button" runat="server" onserverclick="btnReadOnly_Click" class="cursorPointerControl"
onclick="if (!ReadOnlyConfirmation()) return false;"
value="Click to make inspection read only." />

function ReadOnlyConfirmation()
{ return confirm('Are you sure you wish to make this record read-only?'); }

I would like to reuse the confirm box for other pages. I tried using a radwindow with my custom confirm page. However, I couldn't get it to return the value back to the button. Any help would be greatly appreciated.

Donald McLean
Top achievements
Rank 2
 asked on 29 Mar 2018
0 answers
103 views

I have a GridNumericColumn for a year column.  It is showing a comma when I edit inline (see attached picture).  How would I set the year to not show a comma please?

 

Thank you.

J
Top achievements
Rank 1
 asked on 29 Mar 2018
2 answers
133 views

I'm developing a menu using RadMenu and RadSiteMap.  I'm getting the nodes by using SiteMapProviders.  Everything is working, but I have to add a 4th level at certain nodes and this causes the menu to look untidy and the styling changes.

So I was thinking of having the 4th level pop out when you hover over its parent node like a tooltip.  Can you use the Tooltip control with SiteMap?  If yes, how do link to just the 3rd level nodes which has child nodes?  I can't find any examples on the forum or demos.

Fanie
Top achievements
Rank 1
 answered on 29 Mar 2018
6 answers
186 views

I am trying to implement a Filter Template with a Combo Box that uses Images

- there is no explicit DataTextField or DataValueField in the data items

it doesn't work at all!

the markup:

<telerik:GridTemplateColumn UniqueName="Target" DataField="Target" SortExpression="Target" HeaderText="Target" HeaderStyle-Width="40" >
    <FilterTemplate>
        <telerik:RadComboBox ID="rcbTarget" OnPreRender="rcbTarget_PreRender" OnSelectedIndexChanged="rcbTarget_SelectedIndexChanged" AutoPostBack="true" runat="server" />
    </FilterTemplate>
    <ItemTemplate>
        <asp:ImageButton ID="imgTarget" ImageUrl="../Images/tgt_neutral.png"  CommandName="SetTarget" CommandArgument='<%# Eval("Target") %>' Height="36" Width="36" runat="server" />
    </ItemTemplate>
</telerik:GridTemplateColumn>

 

the code behind:

    protected void rcbTarget_PreRender(object sender, EventArgs e)
    {
        RadComboBox rcbTarget;
        rcbTarget = sender as RadComboBox;
        if (ViewState["rcbTarget"] == null) { } else
        {
            rcbTarget.SelectedValue = ViewState["rcbTarget"].ToString();
        }
    }

    protected void rgDraftProspects_ItemCreated(object sender, GridItemEventArgs e)
    {
        GridFilteringItem theFilterItem;
        RadComboBox rcbTarget, rcbPager;

        if (e.Item is GridFilteringItem)
        {
            theFilterItem = e.Item as GridFilteringItem;
            //set dimensions for the filters

            rcbTarget = theFilterItem["Target"].Controls[1] as RadComboBox;
            FillTargetFilter(rcbTarget);
        }

    }

    private void FillTargetFilter(RadComboBox rcbTarget)
    {
        RadComboBoxItem rcbiTarget;

        rcbiTarget = new RadComboBoxItem();
        rcbiTarget.Text = "No Filter";
        rcbiTarget.Value = string.Empty;
        rcbTarget.Items.Add(rcbiTarget);
//      rcbiTarget = new RadComboBoxItem();
//      rcbiTarget.ImageUrl = "../Images/tgt_neutral.png";
//      rcbiTarget.Value = DBNull.Value.ToString();
//      rcbTarget.Items.Add(rcbiTarget);
        rcbiTarget = new RadComboBoxItem();
        rcbiTarget.ImageUrl = "../Images/tgt_yes.png";
        rcbiTarget.Value = "1";
        rcbTarget.Items.Add(rcbiTarget);
        rcbiTarget = new RadComboBoxItem();
        rcbiTarget.ImageUrl = "../Images/tgt_no.png";
        rcbiTarget.Value = "0";
        rcbTarget.Items.Add(rcbiTarget);
    }

    protected void rcbTarget_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        StringBuilder sb;

        ViewState["rcbTarget"] = e.Value;
        sb = new StringBuilder();
        sb.Append("([Target] = '");
        sb.Append(e.Value);
        sb.Append("') ");
        rgDraftProspects.MasterTableView.FilterExpression = sb.ToString(); ;
        rgDraftProspects.MasterTableView.Rebind();
    }

 

Eyup
Telerik team
 answered on 28 Mar 2018
0 answers
296 views

     Hello all.

I'm new to Telerik UI for ASP.NET AJAX. 

I have on Master Page. All other pages are nested.

Now if I have on page scroll down - everything goes down. But I want that at least my main menu from Master page stays fixed always on screen.

I tried something like this, but it works not so good, my main panel blinking while scrolling.

Please advise me how I can figure it out. Thanks, I hope that there must be a single property!

Master Page.

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="VulcanDash.Site1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <asp:ContentPlaceHolder ID="head" runat="server">
        </asp:ContentPlaceHolder>
        <link href="CSS/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="CSS/MasterPage.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>
            <div class="container RadMenu_Fixed">
                <telerik:RadMenu ID="RadMenu1" Runat="server" ClickToOpen="True" Skin="Telerik" EnableRoundedCorners="True">
                    <Items>
                        <telerik:RadMenuItem runat="server" Text="Dashboard" NavigateUrl="GeneralForm.aspx" Target="_parent"> 
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="TA" NavigateUrl="TransactionApprovalForm.aspx" Target="_parent"> 
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Login" NavigateUrl="LoginForm.aspx" Target="_parent">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenu>
            </div>
            <div class="container MainContent">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        
                </asp:ContentPlaceHolder>
            </div>
        </form>
    </body>
</html>

 

Master Page.css

 

.RadMenu_Fixed
{
position:fixed !important;
width:100%;
top:0px;
}

* html .RadMenu_Fixed  /*required for IE6*/
{
position:relative !important;
top:expression(eval(document.documentElement.scrollTop? document.documentElement.scrollTop : document.body.scrollTop) + "px");
left:expression(eval(document.documentElement.scrollLeft? document.documentElement.scrollLeft : document.body.scrollLeft ) + "px");
}

.MainContent
{
    margin-top: 15px;
    width:100%;
}

 

 

Vladyslav
Top achievements
Rank 1
 asked on 28 Mar 2018
1 answer
124 views

I've noticed some more unexpected behavior relating to the Telerik Editor's track changes feature. It seems that when a <p> element contains nothing but whitespace (newline, space or tab characters) any time one character is deleted, the entire element is deleted. Another issue relating to this, is that when the line is deleted, if there is another whitespace <p> element above the element, the cursor is placed not on that line, but on whatever line is next without any whitespace. This behavior can be reproduced in the track-changes demo (Found at https://demos.telerik.com/aspnet-ajax/editor/examples/trackchanges/defaultcs.aspx ) ,by following these steps:

1. Create a <p> element containing some text

2. Below this element, create 3 more containing nothing but whitespace

3. On the last line enter a space and then press the backspace key

The cursor will be moved to the <p> element containing text and the entire element will be deleted (not just the space which was entered)

Do you have any suggestions or workarounds for this issue?

 

Kind Regards,

Aidan Harris

Rumen
Telerik team
 answered on 28 Mar 2018
6 answers
1.3K+ views
Hi,

I have a combobox added in a usercontrol. I am loading the user control dynamically in the page. I have registered the event selectedIndexChanged in the user control, but the event is not firing.

Below is the control added in user control. 
<telerik:RadComboBox ID="rcbPlain" runat="server" CausesValidation="false" MaxLength="30" AutoPostBack="true" OnSelectedIndexChanged="rcbPlaint_SelectedIndexChaned">  
                </telerik:RadComboBox> 

I am then loading the usercontrol dynamically in the page in the page_load event.
But the event is not firing.

Thanks in Advance,
Afzal
Alec
Top achievements
Rank 1
 answered on 28 Mar 2018
2 answers
203 views

OK, so this might be a semi-strange one but here goes.  I have an AjaxLoadingPanel wired up to a UpdatePanel and it's working really well.  Inside the UpdatePanel is a RadGrid that is set to Client Load.  It's perfect - almost.

By default, the icon for loading is centered on the radgrid which is set to paging enabled at 100.  That means, the loading icon isn't visible because you would have to scroll down the page to see it.  Since the paging of 50 starts the grid at a size of 50 rows.  Setting the BackgroundPosition to top is handy but doesn't look great.  I know this sounds silly but it's right over the command bar of the RadGrid.  Visually, it just looks "off".

So using this: <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" BackgroundPosition="Top"></telerik:RadAjaxLoadingPanel>

Is there a way, most likely CSS, to set a padding-top so the icon appears maybe 100px padded from the top of the loading window.  Again, I know it sounds silly but I put an image so you had an idea of what I was referring to.

I'll keep hacking around and see if I can find the option in CSS.

Thanks,

Richard

Richard
Top achievements
Rank 1
Veteran
 answered on 28 Mar 2018
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?