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

I am trying to show toolbar dropdown text like:

 

   Dim dropDown As RadToolBarDropDown = New RadToolBarDropDown("PageSize")
            dropDown.Text = GetGlobalResourceObject("Insight", "Per pagina")

This ends up with the following sourcecode:

 

<span class="rtbText rtbHidden">Per pagina</span>

What could be wrong here? Skin = Material 2016.2.607.45

 

Marc

Vessy
Telerik team
 answered on 07 Sep 2016
9 answers
1.4K+ views
How can I programatically set the default pagesize in a grid depending on the number of items in the grid? I want it to be proportionate to the number of total items. Basically limiting the paging to a certain number of pages, rather than the number of items per page. I’ve seen some examples to do this when using the combobox for the PagerStyle, but we’re using the “NextPrevNumericAndAdvanced” and I want it to be the default value. Thanks.
Marin Bratanov
Telerik team
 answered on 07 Sep 2016
1 answer
154 views
We are using Telerik's radgrid for a Kentico site.  We're having a major problem with the user's dashboard.  When a user adds the data grid widget to their dashboard, it posts back and there's the grid. IF they then add a second one, it throws the below error.
If they add a grid, then after it post back, revisits the page, they can add another with no issue.  Same goes for deletions of the widgets, they can delete the first, but if they don't revisit the page so it's not a postback, it throws an error.
The error seems to be occurring in the grid between the Load and Prerender, probably with the PostbackChangeNotification or PostbackEvent.
I can't get the debugger to catch it at all.  There are save and load states in the code, here's the error and some of the code.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.GridTableView.LoadControlState(Object savedState) +121
   System.Web.UI.Control.LoadControlStateInternal(Object savedStateObj) +136
   System.Web.UI.Page.RegisterRequiresControlState(Control control) +12314028
   Telerik.Web.UI.GridTableViewBase.OnInit(EventArgs e) +59
   Telerik.Web.UI.GridTableView.OnInit(EventArgs e) +1564
   System.Web.UI.Control.InitRecursive(Control namingContainer) +185
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +188
   Telerik.Web.UI.RadGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +115
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +94
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +221
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +312
   Telerik.Web.UI.RadGrid.DataBind() +27
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +2700
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +223
   System.Web.UI.Control.LoadRecursive() +70
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3177

Here's the files master control, the control, and some of the headers from the attempted requests: http://www.filedropper.com/showdownload.php/files_7 
Eyup
Telerik team
 answered on 07 Sep 2016
3 answers
254 views

Seems that in code behind the AllowFilteringByColumn property is always set to false at all phases of life cycle prior to the data binding stages. Code example like below for example is always returning me false.:

 

protected void Page_Load(sender se, EventArgs evt) // Master Page event
{
 
var grid = ControlHelper.FindControlByCIDRecursive<RadGrid>(Request["__EVENTTARGET"], ContentPlaceHolder1); // Iterate content page to find all RadGrid
                if (grid != null)
                {
                    bool rebind = false;
                    if(grid.AllowFilteringByColumn)
                    foreach (GridColumn column in grid.MasterTableView.Columns)
                        if (column.CurrentFilterFunction!=GridKnownFunction.NoFilter) {
                        column.CurrentFilterFunction = GridKnownFunction.NoFilter;
                        column.CurrentFilterValue = string.Empty;
                            rebind = true;
                    }
                    if (rebind)
                    {
                        grid.MasterTableView.FilterExpression = string.Empty;
                        grid.MasterTableView.Rebind();
                    }
                }
}

 

Our requirement is to apply a certain DOM class to all grids site-wise. If AllowFilteringByColumn is not propertly populated before databinding is there another way to determine whether filtering is enabled?

Viktor Tachev
Telerik team
 answered on 07 Sep 2016
5 answers
57 views
What is the proper way to set FilterTextBoxLabel from codebehind?

RadFileExplorer1.FilterTextBoxLabel= GetGlobalResourceObject("Insight", "Filter")

Doesn't work in _Load nor in _Init

Marc
Vessy
Telerik team
 answered on 07 Sep 2016
1 answer
86 views

Sirs:

I'm trying to dynamically set the font color in the TileList PeekTemplate. The code that I'm using is below (and it works), but Visual Studio generates 7 warning for the syntax. Is there a better way? I can't seem to access that property in the TileDataBound event.

<telerik:RadTileList runat="server" ID="RadTileList1" TileRows="1" >
    <DataBindings>
        <CommonTileBinding  TileType="RadTextTile" DataNavigateUrlField="NavigateUrl"  />
        <TextTileBinding  DataTextField="Module_Name"    />
        <TilePeekTemplate  >
            <div style="font-size:20px; width:150px;color:<%# DataBinder.Eval(Container.DataItem, "TileColor") %>">
                <div><%# DataBinder.Eval(Container.DataItem, "ModuleID") %></div>
                <div style="font-size:14px"><%# DataBinder.Eval(Container.DataItem, "NumberOfTables") %></div>
 
            </div>
        </TilePeekTemplate>
 
    </DataBindings>
</telerik:RadTileList>       

 

 

Marin Bratanov
Telerik team
 answered on 07 Sep 2016
1 answer
155 views

Hi,

We are using Telerik Rad Controls in SharePoint Visual Webpart.

Any telerik controls either it could be a radbutton or radtabs . After the First Load of the page, when clicked on button or tab the page will post back and the ajax is not working.

However after the postback, ajax seems to start working. Its consistent across all the control where there is a postback event.

How to solve this issue ? As simple sample to solve this issue in SharePoint 2013 will help.

Please advise

 

Stanimir
Telerik team
 answered on 07 Sep 2016
1 answer
299 views
Hi,

I am trying to implement 3 buttons to filter a templated column in a nested grid.
So i have my buttons. I can find the column. I had the filter. I rebind .. but No filter is apply .
<telerik:GridTableView  runat="server" DataSourceID="LDS" Name="PRD" AutoGenerateColumns="False" DataKeyNames="1,2,3"
    ShowHeader="false" HierarchyDefaultExpanded="true"  CommandItemDisplay="Top" >
    <ParentTableRelation> [...] </ParentTableRelation>
 
    <CommandItemTemplate>
        <telerik:RadButton ID="RadButton1" runat="server" Text="ClearFilter" CommandName="ClearFilter" OnClick="ClearFilter">
        <Icon PrimaryIconCssClass="rbCancel" />
        </telerik:RadButton>
 
        <telerik:RadButton ID="RadButton2" runat="server" Text="++++++++++++++" CommandName="Exp"  OnClick="CustomFilter">
        </telerik:RadButton>
 
        <telerik:RadButton ID="RadButton3" runat="server" Text="---------------" CommandName="No-Exp" OnClick="CustomFilter2">
        </telerik:RadButton>
    </CommandItemTemplate>
 
    <Columns>
        <telerik:GridTemplateColumn DataField="totaldone" HeaderText="totaldone" UniqueName="SuperFilter" >
        [...]
        </telerik:GridTemplateColumn>
    </Columns>

With in my code behind:
protected void CustomFilter(object sender, EventArgs e)
{
    dude(RG_BL.MasterTableView);
}
protected void dude(GridTableView gridTableView)
{
    GridItem[] nestedViewItems = gridTableView.GetItems(GridItemType.NestedView);
    foreach (GridNestedViewItem nestedViewItem in nestedViewItems)
    {// Let's find the grid
        foreach (GridTableView nestedView in nestedViewItem.NestedTableViews)
        {
            this.Label1.Text += nestedView.Name + "(" + nestedView.Items.Count + ")" + " | ";
            if (nestedView.Name == "PRD")
            {// Got the Grid
                nestedView.FilterExpression = string.Empty;
                foreach (GridColumn column in nestedView.Columns)
                {// The Column ?
 
                    if (column is GridTemplateColumn && column.UniqueName == "SuperFilter")
                    {// Here.
                        GridTemplateColumn myColumn = column as GridTemplateColumn;
 
                        myColumn.CurrentFilterFunction = GridKnownFunction.GreaterThan;
                        myColumn.CurrentFilterValue = "0";
                    }
                }
                nestedView.Rebind();
            }
            if (nestedView.HasDetailTables)
            { dude(nestedView); }
        }
    }
}

I must have miss Something, If you have any idea.

Regards,
Pierre
Kostadin
Telerik team
 answered on 07 Sep 2016
7 answers
292 views
I have a RadWindow inside a RadWindowManager (with NavigateUrl) that closes really slow but only in Internet Explorer (including 11). It only occurs when the window is maximized. The problem becomes very noticeable when there are many grid items in the window. Closing takes up to 15-20 seconds. Profiling shows that the offsetWidth function in IE takes a really long time. Chrome and Firefox are instant.

I tried many configuration options and it seems that the only way to solve this issue is by not having the window maximized. Also, if I just delete the window manually, everything works quickly. Setting DestroyOnClose = true does not solve this problem either. What are the extra calculations that are happening on close event? Is there a way to avoid them?
Stamo Gochev
Telerik team
 answered on 07 Sep 2016
3 answers
93 views

I have a GridTemplateColumn with RadEditor, but when i try insert new post or update a post it will not be insert/updated in Internet Explorer 11 version 11.545.

It be insert/updated in IE Edge, Chrome and Firefox, not in IE 11?

Use SqlDataSource......

<telerik:GridTemplateColumn UniqueName="artikel" SortExpression="artikel" HeaderText="Artikel" HeaderStyle-Width="0px">
    <EditItemTemplate>
        <telerik:RadEditor ID="RadEditor1" Skin="Office2010Silver" ToolsFile="Toolbar.xml" Content='<%# Bind("artikel") %>' Width="670px" Height="300px" EnableResize="False" runat="server" />
    </EditItemTemplate>
</telerik:GridTemplateColumn>

Kostadin
Telerik team
 answered on 07 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?