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

Hello,

 I use the following code to hide the resize arrow for the editors:

$telerik.$(".reResizeCell").hide();

This works very well when I want to hide the arrow on all editors on a page.  However, how would I go about hiding them only for certain editors on the screen?

Marin Bratanov
Telerik team
 answered on 23 Oct 2015
1 answer
112 views

I am using the default context menus that show Edit and Delete when you right click on an event. All works fine except when you click Edit or Delete, nothing happens. No postback, nothing. However, if I load the calendar and switch views clicking on either the Day, Week or Month, even if clicking the same view we are currently on, then doing a right click on an event works fine. Thoughts? What am I not setting on page load that gets set when clicking one of the view buttons? 

 

My binding on page load is: 

 

            RadScheduler1.SelectedDate = DateTime.Now;
            RadScheduler1.SelectedView = SchedulerViewType.MonthView;
            RadScheduler1.DataSource = GetCalendarEvents();     // loads ​my list .. List<Telerik.Web.UI.Appointment>

Ivan Danchev
Telerik team
 answered on 22 Oct 2015
2 answers
206 views

I  have a few questions on implementation. I haven't figured out approach yet. Basically, the scenario is that this is on a admin site, and that certain steps would load pending upon the roles the user has.

If I had the steps written explicitly and then have the removed from the server side, the fields in the removed steps would still technically be available on the on finish event, just not editable by the user, ​correct?

If I were to put them in user controls and add them dynamically from the codebehind, then with each one I would have to use a save button and use event bubbling described here: http://www.telerik.com/forums/refresh-wizard-from-usercontrol , correct?

If I had only one step on, it would determine that is the final step and hide the previous button, correct?

Ivan Danchev
Telerik team
 answered on 22 Oct 2015
8 answers
187 views
FYI, when I access a GridTableRow object's ClientID, I get the following exception:

      Unable to cast object of type 'Telerik.Web.UI.GridTableRow' to type 'Telerik.Web.UI.GridItem'.

This happened during a postback after I added the Grouping option to a grid, then dragging a grid column into the grouping area.

I had some code walking through the controls on the page and looking at the ClientID which triggered the exception. I just added code to ignore the exception and kept going, but though you might be interested. I don't need a resolution, assuming it's not already fixed in latest release.

The line that throws the exception looks like this, oCurrent walks through all controls, and currently is a Telerik.Web.UI.GridTableRow:
      string sCurClientID = oCurrent.ClientID;

I'm using telerik release 2014 Q1 on a Win7 VS 2012 developer machine.
Marvin
Top achievements
Rank 1
 answered on 22 Oct 2015
3 answers
261 views

Hi,

With my grid def below, the vertical scroll bars work fine but I never get a horizontal scrollbar. It appears to not adhere to my HeaderStyle-Width and sizes the columns to fit width.

 

<telerik:RadGrid ID="grd1" runat="server"
    OnNeedDataSource="grd1_NeedDataSource"
    OnPreRender="grd1_PreRender"
    OnSelectedIndexChanged="grdx_SelectedIndexChanged"
    AllowPaging="true" PageSize="5" Height="300px" Width="500px"
    AutoGenerateColumns="false">
    <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true"
        Scrolling-AllowScroll="true"
        Scrolling-UseStaticHeaders="true">
        <Selecting AllowRowSelect="true"></Selecting>
    </ClientSettings>
    <MasterTableView DataKeyNames="ID" TableLayout="Fixed">
        <Columns>
            <telerik:GridBoundColumn UniqueName="ID" DataField="ID" Display="false" HeaderStyle-Width="10" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="User" DataField="ChangeUser" HeaderStyle-Width="50" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="AD_Path_Name" DataField="ADName" HeaderStyle-Width="50" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Start" DataField="StartDate" DataType="System.DateTime" HeaderStyle-Width="60" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="End" DataField="EndDate" DataType="System.DateTime" HeaderStyle-Width="60" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Total" DataField="TotalCount" DataType="System.Int32" HeaderStyle-Width="30" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Errors" DataField="ErrorCount" DataType="System.Int32" HeaderStyle-Width="30" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Source" DataField="Source" HeaderStyle-Width="100" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="AD_Path" DataField="ADPath"  HeaderStyle-Width="100"></telerik:GridBoundColumn>
        </Columns
    </MasterTableView>
</telerik:RadGrid>

Pavlina
Telerik team
 answered on 22 Oct 2015
2 answers
319 views

I'm sure there is something obvious that I am missing, but I'm not seeing it. I've built my RadWizard form. When user gets to the "finish" page, and clicks the Finish button, nothing happens. I can't figure out how to fire an onclick for this button.  Below is code that I've stripped down to basic functionality. What am I missing?

 

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="sandbox2.aspx.cs" Inherits="sandbox2" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI"
                    Name="Telerik.Web.UI.Common.Core.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI"
                    Name="Telerik.Web.UI.Common.jQuery.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI"
                    Name="Telerik.Web.UI.Common.jQueryInclude.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadWindowManager ID="windowManager1" runat="server" Style="z-index: 100001">
            </telerik:RadWindowManager>
 
        <telerik:RadWizard ID="RadWizard1" Runat="server" ResolvedRenderMode="Classic">
            <WizardSteps>
                <telerik:RadWizardStep ID="RadWizardStep1" runat="server" StepType="Finish">
                </telerik:RadWizardStep>
            </WizardSteps>
        </telerik:RadWizard>
 
</asp:Content>

 

using System;
using System.Linq;
using Telerik.Web.UI;
using System.Web.UI;
 
public partial class sandbox2 : System.Web.UI.Page
{
    protected void RadWizard1_FinishButtonClick(object sender, WizardEventArgs e)
    {
        Response.Write("Clicked"); ;
    }
    
}

Matt
Top achievements
Rank 1
 answered on 22 Oct 2015
4 answers
133 views

Hi

 

My item images don't show in this scenario.

i.e. Images are set within the Grids ItemDataBound event.

I did this because the grid is ajaxified and the RadCodeBlock issue raises it's requirement.

<Telerik:GridTemplateColumn      HeaderText="Image" UniqueName="ViewImage">
     <ItemTemplate>
          <asp:Image ID="PartImage" runat="server" Width="35px" Height="35px" />
     </ItemTemplate>
     <ItemStyle Width ="6%" HorizontalAlign="Center" />
     <HeaderStyle CssClass="GridColHeader" Width="6%" HorizontalAlign="Center" wrap="True"/>
</Telerik:GridTemplateColumn>

 Code:

if (e.Item is GridDataItem)
{

    string Imgurl = Parts.GetMaxImageUrl(dataSourceRow.Image_Id);//Image_Id
GridDataItem item = (GridDataItem)e.Item;
Image img = (Image)item.FindControl("PartImage");
if (Imgurl != "")
{
string appPath = HttpContext.Current.Request.ApplicationPath;
string physicalPath = HttpContext.Current.Request.MapPath(appPath);
string ImageUrl = appPath + "/PartImages/" + Imgurl;
img.ImageUrl = "~/PartImages/" + Imgurl;
}
else
{
img.ImageUrl = "~/Images/placeholder-200.jpg";
}

 

Neal
Top achievements
Rank 1
 answered on 22 Oct 2015
2 answers
107 views

I can't seem to get RadFormDecorator to decorate the checkboxes in RadTreeview. I see there are a bunch of forum threads dating back 7 years ago which seem to deal with some difficulty you had implementing this. I notice that RadTreeview is conspicuously missing from your TelerikControls integration demo at:

 http://demos.telerik.com/aspnet-ajax/formdecorator/examples/formdecoratorandtelerikcontrols/defaultvb.aspx

 

despite the description mentioning RadTreeView. I have a number of questions regarding this issue:

 

1) Can FormDecorator be used with RadTreeview? If so, is this a bug that the checkboxes do not get decorated?

2) If this integratoni si not currently possible, does Telerik have any intention of making it so FormDecorator works with RadTreeview? If so, can I expect this fix in my lifetime (the next 40+ years, hopefully).

 3) If not, it might be helpful if you mention in your Demos that FormDecorator does not work with RadTreeView.

Danail Vasilev
Telerik team
 answered on 22 Oct 2015
10 answers
675 views
Hello,

I've been playing around with the ModelBinding features of ASP.Net Web Forms recently, and found it very nice. With an asp.net GridView, I am able to get my data source by setting a SelectMethod and returning my results. I use an asp.net DropDownList to filter the GridView's records.

With an asp.net GridView and DropDownList, the following occurs:

<asp:DropDownList ID="ddlActive" runat="server" SelectMethod="GetActiveFilters" AutoPostBack="true"
        AppendDataBoundItems="true" DataTextField="Text" DataValueField="Value">
        <asp:ListItem Text="All" Value="" />
    </asp:DropDownList>
 
    <br />
 
    <asp:GridView ID="Accounts" runat="server"
        ItemType="Accounts"
        SelectMethod="GetAccounts"
        AutoGenerateColumns="true">
 
    </asp:GridView>

And In my code behind:

Public Function GetAccounts(maximumRows As Integer?, startRowIndex As Integer?, <System.Runtime.InteropServices.Out()> ByRef totalRowCount As Integer, sortByExpression As String, <System.Web.ModelBinding.Control("ddlActive")> active As Boolean?) As IList(Of Account)
                'Get accounts
            Dim list = DataSources.GetAccounts(active)
 
            totalRowCount = list.Count
 
            Return list
        
    End Function
 
    Public Function GetActiveFilters() As IEnumerable
 
        Dim l = {New With {.Text = "Active", .Value = True},
                 New With {.Text = "Inactive", .Value = False}}
 
        Return l
    End Function

Now everything works fine. The SelectMethod fires only once, and when I select an item from the DropDown, the form posts back and the select method is fired again with the active parameter filled with content from the control "ddlActive".

This is what I expected to happen.

However, when all I do is simply change the asp:GridView to telerik:RadGrid, I get completely different behavior... undesirable behavior.

The SelectMethod is fired twice, and when I select an item from the dropdown, the page posts back, but the select method is not called at all and my grid is not filtered. Am I missing additional configuration that the RadGrid needs?

I am using version 2014.3.1024.45, Visual Studio 2013 Update 4

Any ideas what I might be missing here? Why would the select method fire twice? Thanks.
Konstantin Dikov
Telerik team
 answered on 22 Oct 2015
2 answers
114 views

 
I have a RadDataPager implemented as below.  ​I need the ability to set the z-index on the RadDropDownList as it is rendering behind some of my content, but I can't figure out where to set it.  Changing the style on the RadDataPager doesn't work, and setting it on the .RadDropDownList CSS class also doesn't work.  Any ideas?

<telerik:RadDataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10" Skin="Default">
    <Fields>
        <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
        <telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
        <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
        <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " PageSizes="5,10,20,50" HorizontalPosition="RightFloat" PageSizeControlType="RadDropDownList"></telerik:RadDataPagerPageSizeField>
    </Fields>
</telerik:RadDataPager>

Kostadin
Telerik team
 answered on 22 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?