Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
58 views
Hi,

So I am upgrading the UI of an old product that has a combination of Webcontrols and Web.UI controls. I plan to bring the older controls up to date but need to keep support and CSS for the older controls in place. 
The older controls use a combination of skins and lots of bad css. 
I will be using theme builder to create a custom skin and using lightweight rendering and EnableEmbeddedSkins="False" for new controls. 
I have done one control so far and I am getting issues with the embedded skins overwriting my new skin using the WebResources.axd
I know I can use important to override but that's a very bad approach, especially on a large project... Is there a good approach to increase the specificity for the new skin files so all their properties are applied over the existing base properties where applicable.
I was thinking of using an ID to prefix all new skin selectors with and wrapping each updated control  in a div of that id.. not 100% this is a good approach though.
eg..
#newControls .RadGrid_MyMetro{ ... }

and then give updated controls a div wrapped around it with ID="newControls" or something like that.
1. will this work throughout the project
2. Are there better approaches?

Thanks
Magdalena
Telerik team
 answered on 31 Aug 2016
1 answer
307 views

Hello Telerik Team,
 
We have web application built in asp.net 4.5  with Telerik (version 2014.2.724.45) controls. We are facing  performance issue with our application. 

We inspected our page just to check what all size of data does it renders on a browser. 

It renders about 600 KB of data on the page out of which 
 i) About 300kB is JavaScript  
 ii)About 80KB is css 
and rest being the HTML that are rendered and other data that is rendered on the page.

We Bundled all our CSS and JavaScript file on the page. While tracing the content we also came through Scriptresources.axd and WebResources.axd out which WebResources are already minified.

But Script Resources file are not compressed or minified. Total size of this files is about 160KB. We tried different way of compressing or minifying them but so far didn't get any way to do this.

We would like to request you to provide a possible way where we can minify this SecriptResources.axd file.

Thanks,
Riz

Marin Bratanov
Telerik team
 answered on 31 Aug 2016
4 answers
415 views

I am trying to implement the Excel like filtering for the RadGrid. I ran into some problems when the distinct values for each columns is not being populated against each column. When I place a breakpoint at the FilterCheckListItemsRequested event handler I found out that this is never being hit and hence the data might not have been populate. I am attaching the RadGrid code 

<asp:Panel ID="Panel1" runat="server">
            <telerik:radgrid id="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"   allowfilteringbycolumn="True" allowpaging="True"
                enablelinqexpressions="True" allowsorting="True"  headerstyle-horizontalalign="Center" headerstyle-font-bold="true"
                gridlines="Vertical" showgrouppanel="true" pagesize="50" skin="Office2007" showfooter="True"
                virtualitemcount="100000" AutoGenerateColumns="True" FilterType="CheckList" OnFilterCheckListItemsRequested="RadGrid1_FilterCheckListItemsRequested">
        <ClientSettings AllowColumnsReorder="True"  ReorderColumnsOnClient="True" AllowDragToGroup="True"  >
            <Selecting AllowRowSelect="True"  />
           
            <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="500px" EnableVirtualScrollPaging="true" SaveScrollPosition="true" />
        </ClientSettings>
        <MasterTableView  GroupLoadMode="Server"  HeaderStyle-Width="170px"  >
            <PagerStyle Mode="NextPrevNumericAndAdvanced"   />
            <ItemStyle Wrap="True"  />
        </MasterTableView>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:radgrid>
 </asp:Panel>
 
The code for binding the required setting in code behind is below.

Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated
        Dim boundColumn As GridBoundColumn
          boundColumn = CType(e.Column, GridBoundColumn)
                boundColumn.FilterCheckListEnableLoadOnDemand = True
                boundColumn.AutoPostBackOnFilter = True
                boundColumn.CurrentFilterFunction = "StartsWith"
                boundColumn.FilterCheckListEnableLoadOnDemand = True
                boundColumn.FilterControlAltText = "Filter " & boundColumn.UniqueName
                boundColumn.DataFormatString = "{0:c}"
                boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right
        End If
    End Sub
   
Protected Sub RadGrid1_FilterCheckListItemsRequested(sender As Object, e As GridFilterCheckListItemsRequestedEventArgs) Handles RadGrid1.FilterCheckListItemsRequested
        Dim DataField As String = TryCast(e.Column, IGridDataColumn).GetActiveDataField()
        e.ListBox.DataSource = GetDistinctDataTable(DataField)
        e.ListBox.DataKeyField = DataField
        e.ListBox.DataTextField = DataField
        e.ListBox.DataValueField = DataField
        e.ListBox.DataBind()
    End Sub
 
    Private Function GetDistinctDataTable(DataField As String) As Object
        Dim dt As DataTable = DirectCast(Session("DataTable"), DataTable)
        Dim uniqueCols As DataTable = dt.DefaultView.ToTable(True, DataField)
        Return uniqueCols
    End Function

 

Can you help me as to why this event is never fired. I tried both FilterType="CheckList" and FilterType="Combined"

Pavlina
Telerik team
 answered on 30 Aug 2016
1 answer
230 views
I'm building a 'sample' project in asp.net MVC for my clients to show them how to interface with our services, and i'm using kendo core which means no MVC wrappers.  Basically i have the javascript:
function loadAttGrid() {
            var attgeturl = "@Url.Action("_GetAttachmentListJSON", "Attachment", new { area = "MVCPlug", id = ViewContext.RouteData.Values["id"] }, null)";
            var attupdateurl = "@Url.Action("_UpdateAttachment", "Attachment", new { area = "MVCPlug", id = ViewContext.RouteData.Values["id"] }, null)";
            var attdeleteurl = "@Url.Action("_DeleteLogEntry", "Attachment", new { area = "MVCPlug", id = ViewContext.RouteData.Values["id"] }, null)";
            $("#attgrid").kendoGrid({
                dataSource: {
                    transport: {
                        read: {
                            url: attgeturl,
                            type: "GET",
                            dataType:"json"
                        },
                        update: {
                            url: attupdateurl,
                            type: "POST",
                            dataType: "json"
                        },
                        destroy: {
                            url: attdeleteurl,
                            type: "POST",
                            dataType: "json"
                        }
                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    },
                    pageSize: 10,
                    schema: {
                        model: {
                            id: "LogEntryGUID",
                            fields: {
                                LogEntryGUID: { editable: false },
                                FileName: { editable: false },
                                FriendlyUserName: { editable: false },
                                LocationString: { editable: false },
                                EventDescription: { editable: true },
                                FormattedDateCreated: { type: "date", editable: false }
                            }
                        }
                    }
                },
                selectable: false,
                sortable: true,
                filterable: true,
                editable: "inline",
                pageable: {
                    refresh: false,
                    pageSizes: false,
                    buttonCount: 5
                },
                columns: [
                  { field: 'FileName', title: 'File Name' },
                  { field: 'FriendlyUserName', title: 'User' },
                  { field: 'EventDescription', title: 'Description' },
                  { field: 'FormattedDateCreated', title: 'Date Created', format: "{0:G}" },
                  {
                      command: [
                          //define the commands here
                          { name: "edit", text: " " },
                          { name: "destroy", text: " " }
                      ],
                      title: " ", width: "85px"
                  }
                ]
            });
        }
which works fine when using MVC wrappers, and the 'read' url for the controller looks like 
public ActionResult _GetAttachmentListJSON([DataSourceRequest] DataSourceRequest, Guid id)
        {
            Models.ArrayOfFullLogEntry theAtts = null;
            if (id != Guid.Empty)
            {
                theAtts = GetAttList(id);
            }
            return Json(theAtts.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }
but it does NOT work if i change the controller to not use the wrapper, like:
public ActionResult _GetAttachmentListJSON(Guid id)
        {
            Models.ArrayOfFullLogEntry theAtts = null;
            if (id != Guid.Empty)
            {
                theAtts = GetAttList(id);
            }
            return Json(theAtts, JsonRequestBehavior.AllowGet);
        }
what do i need to change in the javascript to make this wrapper-less controller work?
Mark
Top achievements
Rank 1
 answered on 30 Aug 2016
1 answer
116 views

DropDown loses his position when enlarging the website in a mobile

Se attached image...

It works perfekt in FireFox when i enlarge the website.

Peter Milchev
Telerik team
 answered on 30 Aug 2016
2 answers
115 views
Is it possible, when exporting from the grid control to an Excel file in the XLSX format to specify that it should be printed in landscape?
Robert
Top achievements
Rank 1
 answered on 30 Aug 2016
6 answers
245 views
Hi,
Could anyone advise me please as to how to add addtional comparsion validation to my radgrid below.

I have 2 columns that are required fields: BasketsCaughtTotal and BasketsSampledTotal

I also require that BasketsCaughtTotal must always be equal to or greater than BasketsSampledTotal

<Columns>
                     <telerik:GridBoundColumn DataField="TripCode" FilterControlAltText="Filter TripCode column" HeaderText="Trip Code" SortExpression="TripCode" UniqueName="TripCode" ReadOnly="true"></telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="VesselCode" HeaderText="Vessel" UniqueName="VesselCode" Visible="false" ReadOnly="true"></telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="HaulNumber" HeaderText="Haul" UniqueName="HaulNumber" ReadOnly="true"></telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="RigNumber" HeaderText="Rig"  UniqueName="RigNumber" ReadOnly="true"></telerik:GridBoundColumn>    
                     <telerik:GridBoundColumn DataField="CatchTypeName" HeaderText="Catch Type" UniqueName="CatchTypeName" ReadOnly="true"></telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="CatchTypeCode" HeaderText="Catch Type Code" Visible="false" UniqueName="CatchTypeCode" ReadOnly="true"></telerik:GridBoundColumn>
                     <telerik:GridCalculatedColumn HeaderText="Raising Factor" UniqueName="RaisingFactor" DataType="System.Decimal" DataFormatString="{0:N2}" DataFields="BasketsCaughtTotal, BasketsSampledTotal" Expression="{0}/{1}" />
                     <telerik:GridBoundColumn DataField="BasketsCaughtTotal" HeaderText="Baskets Caught Total" UniqueName="BasketsCaughtTotal" ColumnEditorID="BasketsCaughtTotal" Visible="false" DataType="System.Decimal" DataFormatString="{0:N5}">
                          <ColumnValidationSettings EnableRequiredFieldValidation="True">
                               <RequiredFieldValidator ID="RFTotalBasketsCaught" Font-Bold="True"> Enter baskets caught</RequiredFieldValidator>
                           </ColumnValidationSettings>
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="BasketsSampledTotal" HeaderText="Baskets Sampled Total" UniqueName="BasketsSampledTotal" ColumnEditorID="BasketsSampledTotal" Visible="false" DataType="System.Decimal" DataFormatString="{0:N5}">
                          <ColumnValidationSettings EnableRequiredFieldValidation="True">
                               <RequiredFieldValidator ID="RFTotalBasketsSampled" Font-Bold="True"> Enter baskets sampled</RequiredFieldValidator>
                           </ColumnValidationSettings>
                     </telerik:GridBoundColumn>
                    </Columns>

Thank you, Ida
Eyup
Telerik team
 answered on 30 Aug 2016
8 answers
686 views
Hi,

I'm using Q2 release of RadFileExplorer with Sharepoint provider and it's really REALLY SLOW. It takes about one or two minutes to show approx 50 doc files.

I set the debug parameter to false, but nothing happend. Any ideas how to speed up the loading? Using IE 7 and IE8 browser.

Thank you very much for your answer

BR

Pavel
Vessy
Telerik team
 answered on 30 Aug 2016
2 answers
59 views

I have an odd problem on the zooming on Stock Chart, the X Axis becomes corrupt.

When I zoom it sorts itself out.

If just plot the points with a default Layout it is OK unzoomed.

I am doing this for both types:

var xAxis = chart.PlotArea.XAxis;

xAxis.Step = Convert.ToDecimal(xAxis.Items.Count * 0.10);
xAxis.BaseUnitStep = Convert.ToInt32(xAxis.Step);
xAxis.BaseUnit = DateTimeBaseUnit.Minutes;
xAxis.EnableBaseUnitStepAuto = false;

Please see attached images.

James
Top achievements
Rank 1
 answered on 30 Aug 2016
7 answers
439 views

Hello,

This new FileExplorer control is very, very, very slow to open folders with a lot of files in Internet Explorer 7. Testing with a folder with 1000 jpg files, 4Kb each file, take more than 5 minutes to open in a machine with Dual Xeon processor and SAS 15K speed disk and causes iexplorer process to consume much cpu.

With Firefox works very fast.

Regards,
Newton

Vessy
Telerik team
 answered on 30 Aug 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?