Telerik Forums
UI for ASP.NET AJAX Forum
28 answers
1.2K+ views
I receive the following error when I use Prometheus 2007 Q3

Microsoft JScript runtime error: Sys.InvalidOperationException: Type Telerik.Web.BoxSide has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.

I have a web page with one grid. after populating the grid, I receive the error above.

I am using Visual 2008 RTM.
Marin Bratanov
Telerik team
 answered on 27 Mar 2017
1 answer
106 views

I'm trying to replicate the functionality in an underlying web application for my add-on page. The underlying application has a splitter whose panes each contain a grid and which performs the following grid actions:

  • Each grid appears to have a GridClientSelectColumn and also has the ability to simply click a row.
  • Only a single row can be selected by clicking the row. This does not actually select the row (the GridClientSelectColumn is not checked).
  • Multiple rows may be selected by clicking the GridClientSelectColumn.
  • On clicking a row in the top grid, the row is highlighted and the related records are shown in the lower grid. The current row (last row clicked NOT selected) also has a small indicator displayed to the left of the GridClientSelectColumn checkbox.
  • Checking the GridClientSelectColumn in the grid header either selects or deselects all rows in the grid.
  • Current row indicator should be retained if the user checks column(s) in the GridClientSelectColumn.

Most of the behaviour is covered by the standard GridClientSelectColumn however I don't want the row to be selected (checked in the GridClientSelectColumn) if the user just clicks the row.

I tried setting <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" /> but this doesn't highlight the row when clicked so probably this highlighting ( and the current row indicator) can be achieved with some CSS in the OnRowClicked event ??

Unfortunately while I am competent with changing existing CSS I'm not so good on writing new so if the solution is CSS then any help or examples would be great.

 

Kyle

Eyup
Telerik team
 answered on 27 Mar 2017
0 answers
76 views

hi. i am using the telerik html editor. would like to know if it is possible for user to create their own div, upload an image and set this image as the background for the div.

for example user created

<div id="myNewDiv>

</div>

user wants to upload an image "divBackground.png" via the editor's image manager or some other way using the editor. then set this divBackground.png as a background image for #myNewDiv. 

if possible i would want to reduce the probability of user having to set the image using CSS as some user might not have knowledge to CSS.

Benjamin
Top achievements
Rank 1
 asked on 27 Mar 2017
2 answers
135 views

Hi,

I try to update to the last version of telerik but I got an issue with a new fonctionnality (ref image) 
How can I disable it, I must be blind. 

Thx.

Bouyez
Top achievements
Rank 1
 answered on 27 Mar 2017
0 answers
137 views

I have a radgrid as below. 

 

 <telerik:RadGrid runat="server" ID="gridEconomist" EnableViewState="true" AllowPaging="true" OnNeedDataSource="gridEconomist_NeedDataSource"
            OnItemCommand="gridEconomist_ItemCommand" OnItemDataBound="gridEconomist_ItemDataBound" AutoGenerateColumns="false" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AutoGenerateEditColumn="false"
            AutoGenerateDeleteColumn="false" >



            <MasterTableView AutoGenerateColumns="false" EnableViewState="true" EditMode="InPlace" DataKeyNames="assignedTo" NoDetailRecordsText="No Vouchers Found"
                CommandItemDisplay="none">


                <Columns>


                    <telerik:GridTemplateColumn UniqueName="VoucherCode" HeaderText="Voucher Code" DataField="VoucherCode">
                        <ItemTemplate>
                            <asp:Label ID="lblCode" runat="server" Enabled="true" Text='<%# Eval( "VoucherCode" )%>'>
                            </asp:Label>
                        </ItemTemplate>

                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="createdDate" HeaderText="Created Date" DataField="createdDate">
                        <ItemTemplate>
                            <asp:Label ID="lblCreatedDate" runat="server" Enabled="false" Text='<%# Eval( "createdDate" )%>'>
                            </asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="assignedTo" HeaderText="Assigned To" DataField="assignedTo">
                        <ItemTemplate>
                            <asp:Label ID="lblAssgTo" runat="server" Text='<%# Eval( "assignedTo" )%>'>
                            </asp:Label>

                            <asp:TextBox ID="txtAssgTo" runat="server" Visible="false" Text='<%# Eval( "assignedTo" )%>'>
                            </asp:TextBox>
                        </ItemTemplate>


                    </telerik:GridTemplateColumn>

                    <telerik:GridTemplateColumn UniqueName="assignedDate" HeaderText="Assigned Date" DataField="assignedDate">
                        <ItemTemplate>
                            <asp:Label ID="lblAssgDate" runat="server" Enabled="false" Text='<%# Eval( "assignedDate" )%>'>
                            </asp:Label>
                        </ItemTemplate>

                    </telerik:GridTemplateColumn>

                    <telerik:GridTemplateColumn UniqueName="organization" HeaderText="Organization" DataField="organization">
                        <ItemTemplate>
                            <asp:Label ID="lblorganization" runat="server" Enabled="false" Text='<%# Eval( "organization" )%>'>
                            </asp:Label>

                            <asp:DropDownList CssClass="fontEIS" Visible="false" ID="ddlorganization" runat="server">
                                <asp:ListItem Value="IMF">IMF</asp:ListItem>
                                <asp:ListItem Value="WB">WB</asp:ListItem>
                                <asp:ListItem Value="IFC">IFC</asp:ListItem>
                            </asp:DropDownList>

                        </ItemTemplate>

                    </telerik:GridTemplateColumn>

                    <telerik:GridTemplateColumn UniqueName="Edit" HeaderText="Edit">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/Images/Edit.jpg" Width="10px" Height="10px" CommandName="Edit" />


                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

                    <telerik:GridTemplateColumn UniqueName="Save" HeaderText="Save">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/Images/Action_Save.png" Width="10px" Height="10px" CommandName="Save" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

                    <telerik:GridTemplateColumn UniqueName="Delete" HeaderText="Delete">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/Images/Action_Delete.png" Width="10px" Height="10px" CommandName="Save" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>



                </Columns>
            </MasterTableView>


        </telerik:RadGrid>

 

I need to hide the label lblAssgTo and make txtassgto visible in item command. I have the below code in item command.

 

 

  protected void gridEconomist_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            
            if (e != null)

            {
                e.Item.Edit = true;

                GridEditableItem item = e.Item as GridDataItem;

                item.Edit = true;
               
                if (e.CommandName == "Edit")
                {
                   
                    TextBox txtAssgTo = (item.FindControl("txtAssgTo") as TextBox);
                    Label lblAssgTo = (item.FindControl("lblAssgTo") as Label);
                    
                    Label lblorganization = (item.FindControl("lblorganization") as Label);
                    DropDownList ddlorganization = (item.FindControl("ddlorganization") as DropDownList);

               
                    lblAssgTo.Visible = false;

                 
                    txtAssgTo.Visible = true;
                    ddlorganization.Visible = true;
                    lblorg.Visible = false;
                    
                }
                }

}

 

When I debug I can see that the visible property is set to false in lblassg but it is not reflected in the UI. After item command the need data source event is fired. I'm not sure if thatis causing the issue.

Akhila
Top achievements
Rank 1
 asked on 27 Mar 2017
3 answers
1.7K+ views
Hi All,

How to bind a dropdown in radgrid filter template in codebehind page? Please help

Thanks,
Mahesh
Eyup
Telerik team
 answered on 27 Mar 2017
1 answer
1.5K+ views

How can I make rowspan (merge) same named rows for grouped rows? (There are sub total rows)

 

Example : (I want to merge A,B,C values as merged..)

A           B

A           B

A           B

       B - Subtotal

A          C

A          C

A          C

        C - Subtotal

        GRAND TOTAL

Eyup
Telerik team
 answered on 27 Mar 2017
0 answers
412 views

How to Pass the Child window data to Textbox control within RadDock on parent page?

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Parent Page code:

01.<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="radwindow_parent_child_relation_Default" %>
02. 
03.<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
04. 
05.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
07.    <head runat="server">
08.        <title></title>
09.        <%--This script contains the commonly used functions for all dialogs. It is referenced by all dialog pages--%>
10.        <script src="JScript.js" type="text/javascript"></script>
11.    </head>
12.    <body>
13.        <form id="form1" runat="server">
14.            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
15.                <Scripts>
16.                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
17.                    </asp:ScriptReference>
18.                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
19.                    </asp:ScriptReference>
20.                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
21.                    </asp:ScriptReference>
22.                </Scripts>
23.            </telerik:RadScriptManager>
24.            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
25.            </telerik:RadAjaxManager>
26.            This is the main form. It will host all RadWindows. The JavaScript functions that are used are defined in a common
27.            JavaScript file so they can be reused easily. In a real application each page will define what the
28.            useDataFromChild() and generateDataForParent() functions will do, in this example they merely populate textboxes.
29.             
30.             
31.            <br />
32.            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" OnClientClose="returnDataToParentPopup">
33.            </telerik:RadWindowManager>
34.             
35.            <br />
36.            <br />
37.            <script type="text/javascript">
38.                //this is the function that receives the data from the child popup and handles it on the current page
39.                function useDataFromChild(data)
40.                {
41.                    document.getElementById("Textbox1").value = data;
42.                }
43.            </script>
44.            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
45.                <ContentTemplate>
46.                    <telerik:RadDockLayout ID="RadDockLayout1" Runat="server">
47.                        <telerik:RadDockZone ID="RadDockZone1" Runat="server" Height="300px" Width="995px">
48.                            <telerik:RadDock ID="RadDock1" Runat="server" Height="142px" Width="933px">
49.                                <ContentTemplate>
50.                                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" OnClientClick="openChildDialog('first.aspx', 'firstDialog', 'First Dialog'); return false;" Text="open first dialog" />
51.                                    <asp:TextBox ID="Textbox1" runat="server" />
52.                                </ContentTemplate>
53.                            </telerik:RadDock>
54.                        </telerik:RadDockZone>
55.                    </telerik:RadDockLayout>
56.                </ContentTemplate>
57.            </asp:UpdatePanel>
58.        </form>
59.    </body>
60.</html>

 

Child page code :

01.<%@ Page Language="C#" AutoEventWireup="true" CodeFile="first.aspx.cs" Inherits="radwindow_parent_child_relation_first" %>
02. 
03.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
05.    <head runat="server">
06.        <title></title>
07.        <script src="JScript.js" type="text/javascript"></script>
08.    </head>
09.    <body>
10.        <form id="form1" runat="server">
11.            This is the first dialog. It will open the second one and get data from it.
12.            <asp:Button ID="Button1" Text="open second dialog" runat="server" OnClientClick="openChildDialog('second.aspx', 'secondDialog', 'Second Dialog'); return false;" />
13.            <br />
14.            <asp:TextBox ID="Textbox1" runat="server" />
15.            <asp:Button ID="Button2" Text="send data to main form" runat="server" OnClientClick="generateDataForParent(); return false;" />
16. 
17.            <script type="text/javascript">
18.                //this is the function that receives the data from the child popup and handles it on the current page
19.                function useDataFromChild(data) {
20.                    document.getElementById("Textbox1").value = data;
21.                }
22.                 
23.                //each page needs to define such a function
24.                function generateDataForParent() {
25.                    var info = document.getElementById("Textbox1").value;
26.                    sendDataToParent(info);
27.                }
28.            </script>
29.        </form>
30.    </body>
31.</html>
32.    

 

JScript.js code :

01.function returnDataToParentPopup(sender, args) {
02.    //get the data that was passed and return it to the parent reference. Note that you need to know that name of the function that will handle the data there
03.    var info = args.get_argument();
04. 
05.    if (sender.__parentBackReference && sender.__parentBackReference.useDataFromChild)
06.        sender.__parentBackReference.useDataFromChild(info);
07.}
08. 
09.function openChildDialog(url, wndName, title) {
10.    //in case of erroneous arguments, add some error handling and prevention
11.    if (!url)
12.        url = "errorPage.aspx";
13.    if (!wndName)
14.        wndName = "popup_" + Math.random();
15.    var currentWnd = GetRadWindow();
16.    var browserWnd = window;
17.    if (currentWnd)
18.        browserWnd = currentWnd.BrowserWindow;
19.    setTimeout(function () {
20.        var wnd = browserWnd.radopen(url, wndName);
21.        wnd.__parentBackReference = window; //pass the current window object of the page that opens the dialog so it can be used later
22. 
23.        if (title)
24.            wnd.set_title(title); //you can pass more parameters for RadWindow settings, e.g., modality, dimensions, etc.
25.        //you can even add arguments that will pass data from the parent to the child as shown here
27.        //in the On the Dialog Page section that shows how to access custom fields in the RadWindow object and use them.
28.        //of course, you can also use querystrings in the URL.
29.    }, 0);
30.}
31. 
32.function GetRadWindow() {
33.    var oWindow = null;
34.    if (window.radWindow)
35.        oWindow = window.radWindow;
36.    else if (window.frameElement && window.frameElement.radWindow)
37.        oWindow = window.frameElement.radWindow;
38.    return oWindow;
39.}
40. 
41.function sendDataToParent(dataForParent) {
42.    //pass the data object onward
43.    GetRadWindow().close(dataForParent);
44.     
45.}

 

Vmax
Top achievements
Rank 1
 asked on 26 Mar 2017
0 answers
54 views

Hi,

is it possible to show Insert New Record by first load in Grid? The example you can found here. The problem by this example is that The "New Record Form" will opened after I clicked the "Add New Record" Button. What I want is that form by default(first load) open without I have to first click "Add new record" button. Is it possible?

Any answer would be appreciated

 

Regards

 

Widia
Top achievements
Rank 1
 asked on 24 Mar 2017
4 answers
504 views
How can a user be prevented from going to the next step in code behind? I need to verify some information and if the information is invalid prevent the user from going to the next step. The information can only be verified in code behind. I don't see a "e.Cancel" as in the asp.net wizard.What do I do?
Pedro
Top achievements
Rank 1
 answered on 24 Mar 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?