Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
322 views
I have a quick question, how can I disable the border highlighting of rad grids.  For example I have defined a radgrid in a repeater and when I click on any of the generated tables I see a orange highlight around the edges of the clicked on table.  When I click on the page, in a blank spot the table un-highlights.  This is a feature I can turn off or some weird behavior from my own code?

Thanks,
Eyup
Telerik team
 answered on 11 May 2016
3 answers
139 views

I have a page with a RadEditor on it.  I have a test button that posts causing a model RadWindow to open over the RadEditor. When the page refreshes, the editor gets its text but then disappears when the RadWindow opens over it. The RadEditor text reappears when the RadWindow is closed.

The test window is open from a javascript function that is initiated by code.

Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenTest", "<script type='text/javascript'>Sys.Application.add_load(OpenTestWindow);</script>");

OpenTestWindow is

function OpenTestWindow() {
    Sys.Application.remove_load(OpenTestWindow);

    setTimeout(function () {

        var browserWidth = $telerik.$(window).width();
        var browserHeight = $telerik.$(window).height();

        var oWnd = GetRadWindow();
        console.log("oWnd " + oWnd);
        oWnd.Visible = true;
        oWnd.show();
        oWnd.setSize(Math.ceil(browserWidth * 80 / 100), Math.ceil(browserHeight * 80 / 100));
        oWnd.center();

    }, 300);
}
    function GetRadWindow()
    {
        var manager = $find("<%= RadWindowManagerMessages.ClientID %>");
        return manager.open(null, "TestWindow");
    }

I need to be able to look at the editor contents while the RadWindow is open.

This is a very strange problem

 

Ianko
Telerik team
 answered on 11 May 2016
1 answer
84 views

We were given the below style from a marketing firm who is redesigning our primary website.  It is needed for other area's of the site but it breaks the styling within our RadTreeView.  Without changing the below style how can we get our RadTreeView back to normal?  I have attached what is happening when the style is applied.

.page-content li,
.page-content p,
.page-content ul {
    font-size: 1.1rem
}
 
@media screen and (min-width:40em) {
    .page-content li,
    .page-content p,
    .page-content ul {
        font-size: 1.5rem
    }
}

Magdalena
Telerik team
 answered on 11 May 2016
3 answers
172 views

I have been using two Menu controls with Metro Touch skin applied.

Last year I modified the CSS to remove borders, background and a few other elements, as you can see in the first screen shot (2015)

Sometime this year, in another project with more recent releases, now on the latest Q2, I find that there are vertical lines, as shown in screen shot 2016.

The CSS is identical for both.

All I need is to modify an unknown style that puts the vertical line there, at the right of each of the two menus.

 

 

Magdalena
Telerik team
 answered on 11 May 2016
3 answers
131 views

Hi I need retain the Satete of the panelbar after navigation, but also I need use databind this to SiteMapDataSource

 

This is the code that I use, but not Working, (the idea is expand the parent and set to selected the item node that match with the url (Or cointains this))

what is bad in the code?

<telerik:RadPanelBar RenderMode="Lightweight" OnItemDataBound="RadPanelBar1_ItemDataBound"  
                ID="RadPanelBarMenu" ViewStateMode="Enabled" EnableViewState="true" runat="server"  Width="100%" ExpandMode="SingleExpandedItem"
                DataSourceID="SiteMapDataSource1" DataFieldID="id" DataFieldParentID="ParentId" DataTextField="">
                <DataBindings>
                    <telerik:RadPanelItemBinding  Depth="0" Expanded="true" />
                </DataBindings>
            </telerik:RadPanelBar>

            <asp:SiteMapDataSource runat="server"  ID="SiteMapDataSource1" ShowStartingNode="false"></asp:SiteMapDataSource>

 

In code Behind

 

protected void RadPanelBar1_ItemDataBound(object sender, RadPanelBarEventArgs e)
    {
        System.Web.SiteMapNode row = (System.Web.SiteMapNode)e.Item.DataItem;
     
        string url_menu = row.Url.Replace(".aspx", "").ToLower();


        if (!string.IsNullOrEmpty(row.Url) && Request.Url.AbsoluteUri.ToLower().Contains(url_menu))
        {
            e.Item.Selected = true;

            e.Item.ExpandParentItems();

        }


    }

 

The sitemap

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode title="All">
<siteMapNode title="APP">
<siteMapNode title="Historical" url="~/webpages/HistoricalAppMobileSender.aspx" />
<siteMapNode title="Message" url="~/webpages/AppMobileSender.aspx" />
<siteMapNode title="Agenda" url="~/webpages/Scheduler.aspx" />
</siteMapNode>

</siteMap>

 

 

 

Veselin Tsvetanov
Telerik team
 answered on 11 May 2016
1 answer
184 views

Is it possible to load spreadsheet content from an XLS file stored as a BLOB in Azure Storage?

I've gone through the exercise of embedding an XLS file directly in my ASP.NET application

by using an example found here.

  RadSpreadsheet1.Provider = new SpreadsheetDocumentProvider(Server.MapPath("~/App_Data/semda.xlsx"));

Also note that I have uploaded the XLS file using the CloudUpload control, works great!

Now I need to figure out how to make the data connection.

Bozhidar
Telerik team
 answered on 11 May 2016
7 answers
245 views

Hi 
I am using batch edit grid.

My requirement: I want to restrict the user to create the new row when the number of rows in grid view is more than the quantity (2 records). And also I want user to edit the existing rows.

I am able to restrict the user from adding new rows more than number of records specified( In our case its 2 records).
But the problem is I am not able to edit existing rows. 
Below is the code.

ASPX:

<telerik:RadGrid ID="gvSerialNumberTracking" GridLines="None" runat="server" AllowPaging="false"OnBatchEditCommand="gvSerialNumberTracking_BatchEditCommand" OnItemCommand="gvSerialNumberTracking_ItemCommand" CssClass="gvPLC">
 
<MasterTableView DataKeyNames="SerialNumber_ID,SerialNumber_DJ_ID" TableLayout="Auto" EditMode="Batch" AutoGenerateColumns="false"CommandItemDisplay="Top" ClientDataKeyNames="SerialNumber_ID">
                                                                        <BatchEditingSettingsEditType="Row" />                                                                      
 
<Columns>
<telerik:GridBoundColumn DataField="UnitSN" HeaderText="Unit SN" HeaderStyle-Width="100px" UniqueName="UnitSN"></telerik:GridBoundColumn>
 
                                                                            <telerik:GridBoundColumnDataField="Sub1" HeaderText="Sub1" HeaderStyle-Width="100px" UniqueName="Sub1"></telerik:GridBoundColumn>
 
                                                                            <telerik:GridBoundColumnDataField="Sub2" HeaderText="Sub2" HeaderStyle-Width="100px" UniqueName="Sub2"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowKeyboardNavigation="true">
<ClientEvents  OnRowCreating ="OnRowCreating" />
</ClientSettings>
</telerik:RadGrid>

 

Javascript: 

function OnRowCreating(sender, args)
{
var grid = $find("<%=gvSerialNumberTracking.ClientID %>");
var MasterTable = grid.get_masterTableView();
var Rows = MasterTable.get_dataItems();
var Qty = $("#txtJQuantity").val()
 
// txtJQuantity is the quantity (in our case its 2)
if ((Rows.length) > ($("#txtJQuantity").val()))
{
                                                                     
//alert('Wait! You cannot add more than ' + $("#txtJQuantity").val() + ' items');
                                                                     
//args.set_cancel(true);
 
 
}
}

 

Thanks and Regards,

Sandeep

Eyup
Telerik team
 answered on 11 May 2016
1 answer
126 views

Hello,

I need some help on how to control the next button , I am having an application where I have to host a short video and until that video has finished playing I don't want to enable the next button.

I tried few ways through JS but was not able to achieve it , Please help

binny
Top achievements
Rank 1
 answered on 10 May 2016
1 answer
146 views

Hi,

Im trying to use a RadComboBox with items that are being added via JavaScript. I can get the items to add without any issue. However I've noticed that the autocomplete on the drop down doesnt work. 

Is autocomplete available from items that have been added via client side methods?

Thanks,
Neil

 

Peter Milchev
Telerik team
 answered on 10 May 2016
3 answers
221 views

Hi,

     I am working on kendo grid sample App. Where i am getting list of records from WCF service and trying to bind to Kendo Grid. However while returning from controller ,instead of displaying grid ,i am getting download popup with json file and then program terminates.

Following is my controller:-

      Function Display(<DataSourceRequest> request As DataSourceRequest) As ActionResult
        Dim products As List(Of ServiceReference1.Empolyee) = New List(Of ServiceReference1.Empolyee)
        Dim d As New ServiceReference1.Service1Client()
        products = d.GetData()
        Return Json(products.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)

Vbhtml page:-

@modelType   list(of Display_Data.ServiceReference1.Empolyee)
@imports Kendo.Mvc.UI

<link href="~/Content/kendo/2016.1.412/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo/2016.1.412/kendo.default.min.css" rel="stylesheet" />

<script src="~/Scripts/kendo/2016.1.412/kendo.all.min.js"></script>

   @Code
       Html.Kendo().Grid(Of Display_Data.Empolyee)() _
           .Name("Grid") _
           .Columns(Sub(c)
                            c.Bound(Function(p) p.Name)
                            c.Bound(Function(p) p.Age)
                        
                    End Sub) _
       .Sortable() _
       .Filterable() _
       .Events(Function(e) e.DataBound("onDataBound")) _
     .DataSource(Sub(d)
                         d.Ajax().Read(Function(read) read.Action("Display", "Student")).Model(Sub(m)
                                                                                                       m.Id(Function(i) i.Name)
                                                                                               End Sub)
                        
                 End Sub) _
             .Render()
End Code

Model class: -

Imports System.ComponentModel.DataAnnotations
Public Class Empolyee
    Public Property Name As String
    Public Property Age As String
 
End Class

 

Can anyone please suggest me what am i missing?

Is the vbhtml page correct ?

Will the Datasource will get populated with the  list?

Attached is the snapshot of file which i get as output on returning json.


       

Viktor Tachev
Telerik team
 answered on 10 May 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?