Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
105 views
Hello

System: ASP.NET AJAX v2012.1.215.40
Visual Studio 2010

We use ShowInsertItem(DefaultValues) to display the <InsertItemTemplate> and give the possibility to insert new data with default values.
After inserted data from the <InsertItemTemplate>, we keep this template open by putting the option RadListViewInsertedEventArgs.KeepInInsertMode of the RadListView ItemInserted event to true.

Everything works fine, except that we want to continue to display the default values in the newly <InsertItemTemplate>,.(after the posback), Currently, the default values are not displayed anymore.

Is there an option to keep these default values in this case?

Best regards,
Alain
Maria Ilieva
Telerik team
 answered on 04 Apr 2012
1 answer
115 views
Hello,
I've created an ASPX page inheriting from Master Page to test a modal tooltip. In the Modality Tooltip demo the browser window is faded out and only the tooltip can be accessed by the user. With my code below however the browser window isn't faded out and the button for example can still be accessed and i get this run time error: "Microsoft JScript runtime error: 'Sys' is undefined"

Do you have any idea about a solution to this ?

Thanks for help!

<%@ Page Title="" Language="C#" MasterPageFile="~/FunctionalityMasterPage.master"
    AutoEventWireup="true" CodeFile="Test_Wait.aspx.cs" Inherits="Test_Wait" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="Server">
    <script type="text/javascript">
        //<![CDATA[
        var toHide = false;
        function OnClientBeforeHide(sender, args) {
            if (!toHide) args.set_cancel(true);
        }
  
        function OnClientBeforeShow(sender, args) {
            sender.set_modal(sender.get_modal());
        }
  
        //Attach to event that will indicate when ajax request is complete
        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest
    (
        function (sender, args) {
            toHide = false;
            if (args.get_postBackElement().id == "Button1") {
                var tooltip = $find("<%=RadToolTip1.ClientID%>");
                tooltip.show();
            }
        }
    );
        function GetActiveToolTip() {
            var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
            return tooltip;
        }
        //Attach to event that will indicate when ajax request is complete
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest
    (
        function (sender, args) {
            var tooltip = GetActiveToolTip();
            if (tooltip != null && tooltip.get_id() == "RadToolTip1") {
                toHide = true;
                tooltip.hide();
            }
        }
    );  
  
    //]]>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="Server">
 <telerik:RadToolTip ID="RadToolTip1" IsClientID="false" runat="server" Modal="true"
        ShowEvent="FromCode" Position="Center" RelativeTo="BrowserWindow" OnClientBeforeShow="OnClientBeforeShow"
        OnClientBeforeHide="OnClientBeforeHide" Width="140px" EnableShadow="true" HideEvent="FromCode">
        <img src='Images/Icons/loading.gif' alt="loading" style="margin-left: 35px;" />
    </telerik:RadToolTip>
    <asp:Panel ID="Panel1" runat="server" BorderColor="White">
        <table>
            <tr>
                <td style="width: 50px;">
                </td>
                <td>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:ImageButton ID="Button1" ImageUrl="Images/Icons/send_sms.png" runat="server"
                                OnClick="Button1_Click" CssClass="button" Style="display: block; float: left;" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td style="width: 50px;">
                </td>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
Marin Bratanov
Telerik team
 answered on 04 Apr 2012
1 answer
250 views
Hello,

I have data which should pass to print pdf. I want to display multiple Rad window but i will pass the values through for loop in another page and open that rad Window in another page.

Could we open the rad window with different  data.

I used the following code:
Session["RTF"] = strPatientSummary;
            if (Session["RTF1"] != "" && intCount==0)
                    {
                        RadWindow2.NavigateUrl = "~/Editor/PrintNote.aspx?Count" + intCount;
                        RadWindow2.Height = 600;
                        RadWindow2.Width = 950;
                        RadWindow2.Top = 40;
                        RadWindow2.Left = 100;
                        RadWindow2.Behavior = WindowBehaviors.Maximize | WindowBehaviors.Minimize | WindowBehaviors.Close | WindowBehaviors.Move | WindowBehaviors.Pin;
                        RadWindow2.Modal = true;
                        RadWindow2.VisibleOnPageLoad = true; // Set this property to True for showing window from code    
                        RadWindow2.VisibleStatusbar = false;
                        RadWindow2.Title = "Print Note";
                      }
                    else if (Session["RTF2"] != "" && intCount == 1)
                    {
                        RadWindow3.NavigateUrl = "~/Editor/PrintNote.aspx";
                        RadWindow3.Height = 600;
                        RadWindow3.Width = 950;
                        RadWindow3.Top = 40;
                        RadWindow3.Left = 100;
                        RadWindow3.Behavior = WindowBehaviors.Maximize | WindowBehaviors.Minimize | WindowBehaviors.Close | WindowBehaviors.Move | WindowBehaviors.Pin;
                        RadWindow3.Modal = true;
                        RadWindow3.VisibleOnPageLoad = true; // Set this property to True for showing window from code    
                        RadWindow3.VisibleStatusbar = false;
                        RadWindow3.Title = "Print Note";
                     }
and so no..

and
<telerik:RadWindowManager ID="RadWindowManager" runat="server" EnableViewState="false">
                                <Windows>
                                       <telerik:RadWindow ID="RadWindow2" OpenerElementID="btnPrintNote_Click" runat="server"
                                        Behaviors="None">
                                    </telerik:RadWindow>
                                    <telerik:RadWindow ID="RadWindow3" OpenerElementID="btnPrintNote_Click" runat="server"
                                        Behaviors="None">
                                    </telerik:RadWindow>
                                                                                                 
                                </Windows>
                            </telerik:RadWindowManager>

but this is limited to the rad window. It will display how many rad window in the RadWindowManager.
Marin Bratanov
Telerik team
 answered on 04 Apr 2012
1 answer
99 views
I'm using the advanced form, and when a user hits the "cancel" button it causes a post back that has some delay to it. 

Is there a way to avoid the delay?  I feel like "canceling" should be almost instantaneous.

Thanks!
Peter
Telerik team
 answered on 04 Apr 2012
2 answers
148 views
Hi,

I have radgrid with detailtable.
I want to exapnd the child item after inserting the parent.
Any one know the idea..?


Regards,
Raja.M
Raja M
Top achievements
Rank 1
 answered on 04 Apr 2012
11 answers
1.4K+ views
I have several RadCombo boxes (latest install of Prometheus) on a screen that I wish to use for editing and adding new orders. I am using LoadOnDemand (via RadComboBox1_ItemsRequested) to populate the combo boxes with data from a SQL server database.  However when editing an existing order how do I display the existing values in the database? The LoadOnDemand doesn't kick off until you actually access the combo box... I have seen several of the online demos that Telerik staff say to reference but none of them work...They say that LoadOnDemand dos not have any notion of binding or selecteditem/selectedvalue. They say instead to use the .Value and .Text property...however there is no such property as .value

To further complicate things several combo boxes are dependent on one another...i.e. select something from one combo box and the items in the second are "filtered"

Any help would be appreciated.
Kanna
Top achievements
Rank 2
 answered on 04 Apr 2012
2 answers
108 views

I'm currently evaluating the TreeView for the following Scenario:

  • data source is a webservice / WCF service
  • 2000+ items
  • service method allows partial loading

So I want to load only the root and the first sublevel of items and then lazy load items as nodes are expanded. My Questions:

  1. Should I build the nodes myself or use the DataSource property?
  2. Where do I find tutorials how to build a custom lazy load?
Plamen
Telerik team
 answered on 04 Apr 2012
4 answers
243 views
I have this code, I get data from DB, and i need to create another column in grid with de sum of column1 and 2.

view Razor:

@model List<Project.Models.VW_VisitasPorNumeroVisitas>
 
@{
    ViewBag.Title = "Index";
}
 
 
 
<h2>Visitas por Numero de Visitas</h2>
 
@(Html.Telerik().Grid(Model)
        .Name("RadGrid1")
        .Sortable()
        .Filterable()
        .Pageable()
        .Footer(true)
        .NoRecordsTemplate("No hay registros")
        .Columns(columns =>
        {
            columns.Bound(o => o.NumVisitas)
                .Title("Numero de Visitas")
                .Aggregate(agg => agg.Sum())
                .FooterTemplate(@<text> Visitas Totales: <span >@item.Sum</span> </text>);
            columns.Bound(o => o.TotalVisitas)
                .Title("Cantidad de Visitas");
                 
            columns.Bound(o => o.NumVisitas)
                .Title("% Visitas");
        })     
)

CS:

public ActionResult Index()
{
    var visitasPorNum = from a in db.VW_VisitasPorNumeroVisitas
                        select a;
 
    return View(visitasPorNum.ToList());
}


Eloy
Top achievements
Rank 1
 answered on 04 Apr 2012
5 answers
201 views
Hi

I have three rad listboxes with drag and drop feature. In each list box have Items with image associated to click event call a pupup window page. I have also added some attributes to each item. Eevrything works fine, only problem i am facing is when i drag and drop any item from one list box to another the dragged item is loosing its attributes and associated click event with it.

I tried comibination of several properties on listboxes control but no luck.

<

 

telerik:RadListBox ID="PageHierarchies" runat="server" Width="200px" Height="200px"

 

 

        TransferToID="ColumnHierarchies" AllowReorder="true" AutoPostBackOnReorder="false"

 

 

        AllowTransfer="true" AutoPostBackOnTransfer="false" EnableDragAndDrop="true"

 

 

        AutoPostBack="false" OnClientDragging="DraggingItem"  OnClientTransferred="ItemTransferrd" AllowAutomaticUpdates="true" EnableViewState="true" PersistClientChanges=true >

 

 

    <ButtonSettings ShowReorder="false" ShowTransfer="false" ShowTransferAll="false" />

 

 

</telerik:RadListBox>

Javascipt code to add attributes (higlighted in italic bold)

 

<

 

script type="text/javascript">

 

 

 

 

 

//<![CDATA[

 

 

 

 

 

 

var columnHirachcy;

 

 

var rowHirachcy;

 

 

var pageHirachcy;

 

 

var dimname;

 

 

var dimID;

 

 

var infosetname;

 

 

var strParms;

 

 

 

function

 

pageLoad(sender)

 

{

 

 

 

var listboxItem;

 

 

var membersCount;

 

 

var items;

 

 

var objJson;

 

 

columnHirachcy = $find(

"<%= ColumnHierarchies.ClientID %>");

 

rowHirachcy = $find(

"<%= RowHierarchies.ClientID %>");

 

pageHirachcy = $find(

"<%= PageHierarchies.ClientID %>");

 

 

objJson=window.top.GetIFrame().document[

'report1_json'];

 

 

//Column Hiraarchy

 

 

 

 

infosetname=objJson[0].name;

 

 

var infosetObj = window.top.getInfoSetByName(infosetname);

 

 

 

for(axisIndex=0;axisIndex<=2;axisIndex++)

 

{

 

switch(axisIndex)

 

{

 

case 0:

 

items=columnHirachcy;

 

break;

 

 

case 1:

 

items=rowHirachcy;

 

break;

 

 

case 2:

 

items=pageHirachcy;

 

break;

 

}

 

var dimCollection = infosetObj['axis' + axisIndex];

 

 

for(i=0;i<dimCollection.length;i++)

 

{

dimID = dimCollection[i].uname;

dimName = dimCollection[i].name;

 

membersCount =window.top.getMembersCount(infosetname,dimName,axisIndex,i);

 

var listboxItem =new Telerik.Web.UI.RadListBoxItem();

 

listboxItem.set_text(dimName +

"[" + membersCount + "]");

 

listboxItem.set_value(dimID);

listboxItem.set_selected(

false);

 

listboxItem.set_imageUrl(

"../Images/Filter.gif");

 

items.trackChanges();

items.get_items().add(listboxItem);

items.getItem(i).get_imageElement().setAttribute(

"alt",dimName);

 

items.getItem(i).get_imageElement().setAttribute(

"infosetName",infosetname);

 

items.getItem(i).get_imageElement().setAttribute(

"dimName",dimName);

 

items.getItem(i).get_imageElement().setAttribute(

"dimID",dimID);

 

items.getItem(i).get_imageElement().setAttribute(

"PivotingMode","Full");

 

items.getItem(i).get_imageElement().setAttribute(

"Hirarchy",listboxItem);

 

 

 

 

 

 

 

 

items.getItem(i).get_imageElement().onclick=

function(){

 

 

window.top.openSelectorForPivoting(

this.getAttribute('infosetName'),this.getAttribute('dimName'),this.getAttribute('dimID'),this.getAttribute('PivotingMode'),this.getAttribute('Hirarchy'));

 

 

};

 

 

 

 

 

items.commitChanges();

}

}

 

 

return false;

 

 

}

Bozhidar
Telerik team
 answered on 04 Apr 2012
1 answer
98 views
Please take a look at pic2.png: When I first place two Radcontrols (a ComboBox and a RadButton) right next to each other, I see a light-blue square on the right, when I click on that square, then the two controls overlap each other (Look at pic1.png).
I recalled that I didn't see it before in any version of Telerik AJAX. Is it a new feature? If yes, how to turn this off? (It's too annoying)

I tried to install Telerik on 3 different PC, same thing happen.

Thanks

Lamk.
Slav
Telerik team
 answered on 04 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?