Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
250 views

Hi,

Is there a way to generate a chart image from RadHtmlChart for Asp.Net without displaying the chart and without any client code ?

Regards,

Danail Vasilev
Telerik team
 answered on 09 Mar 2016
9 answers
257 views

I have the following settings

 

1. web.config

        <system.web.extensions >
<scripting ><webServices/>

<scriptResourceHandler
       enableCompression="true"
       enableCaching="true" />
</scripting >

</system.web.extensions >

 

2. compilation debug = false in web.config and master page

 

3. <telerik:RadScriptManager ID="ScriptManager" runat="server" ScriptMode="Release" EnableScriptCombine="false" CacheSettings-Enabled="true" /> in master page.

However if i enable cdn, cdn is able to server 304, I assume it is because the files are static in the CDN.


Can Telerik support advise howw to make axd return 304?

 

 

Thanks.

K
Top achievements
Rank 1
 answered on 09 Mar 2016
1 answer
172 views

hi all,

 

my scenario:

i have three listbox, EmployeeName as Parent List Box, ProjectAdmin and ProjectReader as Child List box. i will drag and drop from parent list to its child list box. the drag and drop concept is working fine for me(i doing this in client side using Javascript). while i am inserting the details in database in c#, the Child list box shows empty. i cannot fetch the items in c# server, where the drag and drop done in javascript.

HTML Code

<table class="normal_grid">
                <tr>
                    <th style="width: 17%">
                        <asp:Label ID="lblemployeename" runat="server" Text="Employee Name"></asp:Label>
                    </th>
                    <td class="field" style="width: 17%">
                        <telerik:RadListBox runat="server" ID="rlbemployeename" EnableDragAndDrop="true"
                            Width="150px" Height="150px" OnClientDropped="lbemployeenamedropped">
                        </telerik:RadListBox>
                    </td>
                    <th style="width: 16%">
                        <asp:Label ID="Label1" runat="server" Text="Project Admin"></asp:Label><span class="hlt_txt">*</span>
                    </th>
                    <td class="field" style="width: 17%">
                        <telerik:RadListBox runat="server" ID="rlbadminname" EnableDragAndDrop="true" Width="150px"
                            Height="150px" OnClientDropped="lbadminnamedropped">
                        </telerik:RadListBox>
                    </td>
                    <th style="width: 16%">
                        <asp:Label ID="Label2" runat="server" Text="Project Reader"></asp:Label><span class="hlt_txt">*</span>
                    </th>
                    <td class="field" style="width: 17%">
                        <telerik:RadListBox runat="server" ID="rlbreadername" EnableDragAndDrop="true" Width="150px"
                            Height="150px" OnClientDropped="lbreadernamedropped">
                        </telerik:RadListBox>
                    </td>
                </tr>
            </table>

 

Javascript Code:

function lbemployeenamedropped(sender, args) {
                transferManager.performTransfer(sender, args);
            }
 
            function lbadminnamedropped(sender, args) {
                transferManager.performTransfer(sender, args);
            }
 
            function lbreadernamedropped(sender, args) {
                transferManager.performTransfer(sender, args);
            }
 
            (function ($) {
                transferManager = function () { }
                debugger;
                transferManager.performTransfer = function (sender, args) {
                    var destinationItemIndex = this._getDestinationIndex(args);
                    var destinationListBox = this._getDestinationListBox(args);
 
                    if (destinationListBox == null)
                        return;
 
                    var reorderIndex = args.get_dropPosition() == 0 ?
                destinationItemIndex : destinationItemIndex + 1;
 
                    var items = args.get_sourceItems();
 
                    this._transfer(items, destinationListBox, reorderIndex);
                }
 
                transferManager._transfer = function (items, destination, reorderIndex) {
                    $.each(items, function (index, item) {
                        item.unselect();
                        destination.get_items().insert(reorderIndex, item);
                    });
                }
 
                transferManager._getDestinationIndex = function (args) {
                    var destinationItem = args.get_destinationItem();
                    if (destinationItem)
                        return destinationItem.get_index();
                    return 0;
                }
 
                transferManager._getDestinationListBox = function (args) {
                    var destinationItem = args.get_destinationItem();
                     
                    if (destinationItem) {
                        var id = destinationItem.get_listBox().get_id();
                        return $find(id);
                    }
 
                    var parent = $(args.get_htmlElement()).parent();
                    if (parent.is(".RadListBox")) {
                        var id = parent[0].id;
                        return $find(id);
                    }
                    else if (parent.is(".rlbGroup")) {
                        var id = parent[0].parentNode.id;
                        return $find(id);
                         
                    }
                }
            })($telerik.$);

 

anything wrong in this code.

Tanks in Advance

ASRK.....

 

Raj
Top achievements
Rank 1
 answered on 09 Mar 2016
5 answers
1.6K+ views
Hi,

i got a grid in a radwindow and i want to return the id of the selected row dataitem.
The id is in the MAsterView DataKeyvalue and i also tried to put it in a invisible column with unique name id..
I want to do it client side with java script as i already have used JS by opening the Radwindow.

After i read the references in the online documentary i got following code:

<telerik:RadCodeBlock ID="radCodeBlock" runat="server"
            <script type="text/javascript"
                function GetRadWindow() 
                { 
                   var oWindow = null
                   if (window.radWindow) oWindow = window.radWindow; 
                   else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
                   return oWindow; 
                } 
                 
                function returnToParent() 
                {                   
                    //create the argument that will be returned to the parent page 
                    var oArg = new Object(); 
                                     
                    //get the selected id from RadGrid 
                    var grid = $find("<%=radGrid.ClientID %>"); 
                    var MasterTable = grid.get_masterTableView(); 
 
                    var selectedRows = MasterTable.get_selectedItems(); 
                    for (var i = 0; i < selectedRows.length; i++) 
                    { 
                      alert(i); // got 0 for 1 selectec row 
                      var row = selectedRows[i]; 
                      var cell = MasterTable.getCellByColumnUniqueName(row, "id"
                    } 
                     
                    var id = cell.innerHtml(); 
                     
                    //var id = $find("<%=radGrid.ClientID %>").get_masterTableView().get_selectedItems()[0].getDataKeyValue("id"); 
                                                               
                    //get a reference to the current RadWindow 
                    var oWnd = GetRadWindow(); 
                     
                    //Close the RadWindow and send the argument to the parent page 
                    if(id) 
                    { 
                        //oWnd.close(oArg); 
                        alert("docid = " + id); 
                    } 
                    else 
                    { 
                        alert("Please select a document."); 
                    } 
                } 
            </script> 
        </telerik:RadCodeBlock> 

With this i get an page error that "null is Null, or not an object". Its also not working with sell.innerHtml  without ().
i also used this inline outcommented way/line, but then i come to the false alert.

Here the grid:

<telerik:RadGrid ID="radGrid" runat="server" 
                                            AllowPaging="True"  
                                            PageSize="20" 
                                            AutoGenerateColumns="False" 
                                            GridLines="Both" 
                                            AllowMultiRowSelection = "false" 
                                            ClientSettings-Selecting-AllowRowSelect = "true" 
                                            OnNeedDataSource="Radgrid_NeedDatasource"
                             
                            <MasterTableView DataKeyNames="id" 
                                        CommandItemDisplay="Top"
                                         
                                <CommandItemTemplate> 
                                    <div style="padding: 5px 5px;"
                                        <img onclick="returnToParent()" style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Default/Images/file_icon.gif"/> 
                                        <asp:Label ID="lblChooseDocument" runat="server" Text="choosedocument" OnLoad="OnLabelLoad"></asp:Label> 
                                    </div> 
                                </CommandItemTemplate> 
                                                                                     
                                <Columns> 
                                 
                                    <telerik:GridBoundColumn DataField="id" Visible="false"></telerik:GridBoundColumn> 
                                        <telerik:GridTemplateColumn> 
                                            <ItemTemplate> 
                                                <asp:Image runat="server" ID="imgNew" 
                                                    OnLoad="OnImageLoad" /> 
                                                <asp:TextBox ID="txbCreatedDate" runat="server" 
                                                    Visible ="false" 
                                                    Text='<%# DataBinder.Eval(Container.DataItem,"created_date").ToString() %>' /> 
                                            </ItemTemplate> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridHyperLinkColumn DataTextField="Metainformation.name" HeaderText="Profile" DataTextFormatString="{0}"></telerik:GridHyperLinkColumn> 
                                        <telerik:GridBoundColumn DataField="Category.name" HeaderText="Kategorie"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="User.lastname" HeaderText="Ersteller"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="created_date" HeaderText="Erstellungsdatum"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="User1.lastname" HeaderText="letzter Bearbeiter"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="checkout_date" DataType="System.DateTime" HeaderText="in Verwendung seit"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Folder.name" HeaderText="Ordner"></telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="id" UniqueName="id" Visible="false"></telerik:GridBoundColumn> 
                                         
                                    </Columns> 
                                       
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </RowIndicatorColumn> 
 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </ExpandCollapseColumn> 
                                </MasterTableView>           
                        </telerik:RadGrid> 


The radwindow works fine and the grid has mutli select disabled and row select allowed

Any ideas why im not able to retrieve the id of the selected row?

cheers mario
Jack
Top achievements
Rank 1
 answered on 09 Mar 2016
3 answers
144 views

Hello All,

I am trying to give titles to Telerik Tile list --> Tilegroup using the sample code provided on this page  

http://demos.telerik.com/aspnet-ajax/tilelist/examples/data-binding/server-side-binding/declarative-data-source/defaultcs.aspx.

But when I run the code I get the following error: 

Type 'Telerik.Web.UI.TileGroup' does not have a public property named 'Title'.

here is my code:

  <telerik:RadTileList RenderMode="Lightweight" runat="server" DataSourceID="SqlDataSource1" ID="RadTileList1" AppendDataBoundItems="True"
            TileRows="4" OnTileDataBound="RadTileList1_OnTileDataBound" OnTileCreated="RadTileList1_OnTileCreated">
            <DataBindings>
                <CommonTileBinding TileType="RadImageAndTextTile" Shape="Square" DataGroupNameField="Division" />
                <ImageAndTextTileBinding DataTextField="Employee" DataImageUrlField="BLOB" />
                <TilePeekTemplate>
                    <div class="peekTemplateClass">
                        <strong>Location</strong>
                        <%#DataBinder.Eval(Container.DataItem, "Location")%>
                        <br />
                        <strong>Division</strong>
                        <%#DataBinder.Eval(Container.DataItem, "Division")%>
                        <br />
                        <strong>Email</strong>
                        <%#DataBinder.Eval(Container.DataItem, "EmailID")%>
                        <br />
                        <strong>Name</strong>
                        <%#DataBinder.Eval(Container.DataItem, "Employee")%>
                    </div>
                </TilePeekTemplate>
            </DataBindings>
            <Groups>
                <telerik:TileGroup Name="Health Services" Title=""> ---> I m getting error here while trying to add title as per the telerik demo.
                </telerik:TileGroup>
                <telerik:TileGroup Name="Home Health">
                </telerik:TileGroup>
                <telerik:TileGroup Name="Hospice">
                </telerik:TileGroup>
                <telerik:TileGroup Name="DME">
                </telerik:TileGroup>
            </Groups>
        </telerik:RadTileList>

 

Can any one please suggest me why this is happening? 

Dipali
Top achievements
Rank 1
 answered on 09 Mar 2016
4 answers
126 views

Hello,

Could you please check the following behavior and suggest how to fix it?

Scenario:

  1. Add Japanese IME to have a possibility to enter EM (full-width) space;
  2. Open the design tab, start a new line from EM space, add a few symbols;
  3. Switch to the HTML tab.

Expected behavior:

EM space is converted to &emsp;

Actual behavior:

EM space is removed

Please take a look at the reproducing scenario on the demo page: http://screencast.com/t/o8JwCGrj

vkucherov
Top achievements
Rank 1
 answered on 08 Mar 2016
2 answers
91 views

Hello,

I am currently using version 2016.1.225.35 and I'm having issues with the server side AcceptTrackChanges() method. When the method is used it seems that formatting changes that have been made to the content (i.e., Bold) are not accepted. Other changes, like insert and delete, are accepted. I believe this use to work properly in the 2015 version. If we enable the command using the editor toolbar button (<telerik:EditorTool Name="AcceptAllTrackChanges" />), all changes are accepted (including the formatting changes).

To reproduce this problem, include the editor in the page markup. Also, add a Button with the associated OnClick event. Within the code behind OnClick event, utilize the AcceptTrackChanges method to accept changes. Example is shown:

 

protected void ButtonAcceptChanges_Click(object sender, EventArgs e)
{
    RadEditorDesc.AcceptTrackChanges();               
}

 

Make changes within the editor content. Include formatting changes (i.e., bold) and then click on the Accept Changes button. You should notice that all changes are accepted other than formatting type changes.

 

Any help in resolving this issue would be appreciated.

Thank-you.

 

 

 

 

tlp
Top achievements
Rank 1
 answered on 08 Mar 2016
3 answers
157 views

Hi Friends,
I have a requiremt to populate two Treeviews , such that the second Treeview is populated based on clicking on the first . Am using XMLDatasource to populate both . For the first time, the second Treeview is perfectly loaded, but after that it is still showing the same data ,i.e; not refreshing .
How can i make the treeview to get the changes reflected correctly .

Thanks in advance

Regards

Sree

Happy
Top achievements
Rank 1
 answered on 08 Mar 2016
1 answer
93 views

I noticed that on one of the asp.net webform demos you had a option to tick and show the apointments of users in one schedulre kinda like outlook shared claenders however i dont see  any documenation on how to repoduce this at all?.

 

Regards

David

Ivan Danchev
Telerik team
 answered on 08 Mar 2016
2 answers
118 views
Hi,

At our company we created and maintain a large ASP.NET application which makes extensive use of the Telerik Rad controls. We use version 2013.3.1015.40.

Currently we run into an issue with the RadEditor. It occurs in Internet Explorer 11 which is mainly used by one of our customers. If a line starts or ends with zeros (0) and the user presses enter, then those zeros are trimmed. It is very easy to reproduce in an empty web application project.

Steps to reproduce:
 Step 1: Type first line starting with a zero or/and ending with a zero.
 Step 2: Press ENTER to move to the second line
 Step 3: See the zeros disappear in the first line.

We also tried it with the latest version of the Rad controls and there the problem does not occur.

We are aware that we are using an older version, but for our product it suits fine. We are afraid that replacing the Rad controls with the latest version will introduce new bugs or styling issues in our product. It would require a huge amount of QA work and probably a lot of rework.

Can you please help us out? It seems like such a minor issue in the JavaScript code. Maybe you can provide us with a work around or a hotfix. We would greatly appreciate that.

Thanks,
Ronald
Ronald
Top achievements
Rank 1
 answered on 08 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?