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

I have a RadButton on an ASPX page and I am trying to enable a disabled button in the code behind page.

I have no problem enabling ​on ​the client side (via set_enabled method), is there a magic trick to doing it in C# on the server side?

 

Code is: 

void fileList_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    btnSave.Enabled = true;
}

 

Thank you,

SM

Simon
Top achievements
Rank 1
 answered on 15 Oct 2015
9 answers
255 views
Hi,

The documentation and demos don't seem to show much in the way of client-side functionality is this true or can you supply more information?

Essentially I'm looking for a control that can support a multi-level hierarchy where nodes can be dragged on or off the chart. Therefore lets say you have a list of people down one side and you wish to organise them by dragging and dropping them onto the OrgChart. From the looks of it I can't see any client-side functionality for creating/removing nodes. Do you think the functionality I ask is possible to implement (or extend) with this control?

Thanks,
Shane
Vinh
Top achievements
Rank 1
 answered on 15 Oct 2015
1 answer
44 views

I have created a large form which I wanted to implement Ajax on some parts. I am very new to Ajax and ASP.NET and was wondering how I should go about it.

The questions are mostly "yes" or "no" RadComboBox selections except one with the "other" option. There is one part of the form where if the user selects "yes" then a checkbox will appear. If the user selects "no" then the checkbox will not be visible to them. In another part if the user selects "yes" there is another question that will appear right below, and if they select no then it will stay hidden.In the last part of the form that needs implementation if the user selects "yes" a textbox will appear, if they select "no" a checkbox will appear, and if they select "other" a different textbox will appear.

Viktor Tachev
Telerik team
 answered on 15 Oct 2015
5 answers
197 views
I am trying to use rad menu for the top navigation in sharepoint custom master page. I noticed that it shows the home tab and every thing under that as a dropdown (2nd level) menu. Is there a way to display it from the second level, so that i see the second levels as the top level.
The hierarchy of my site is -
Home
    - Client
    - Admin
    - Research
I want to see the Client, Admin and Research items as the top level navigation.
Here is the code I have
<telerik:RadMenu ID="TopNavigationMenu" runat="server" DataSourceID="topSiteMap" EnableViewState="false" />
<asp:SiteMapDataSource
     ShowStartingNode="False"
     SiteMapProvider="SPNavigationProvider"
     id="topSiteMap"
     runat="server"
       StartingNodeUrl="sid:1002"
       StartFromCurrentNode="true"
       StartingNodeOffset="0"
       />
GACA
Top achievements
Rank 2
 answered on 15 Oct 2015
5 answers
628 views

I am having trouble with the sort function on the RadGrid.  All columns are set to allow sorting, but only some columns work.  When I click on the  header, the grid repaints but nothing changes and the previous selected sort column remains highlighted with the sort icon visible.  It will not change to some of the columns.  In the same code,these columns will not sort:  Modified Date , Client Name and Proposal Type.  The remaining columns sort fine.

 

       <telerik:RadGrid ID="ProposalGrid" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" AllowPaging="True" GroupingEnabled="False" Skin="Metro" OnItemDataBound="ProposalGrid_ItemDataBound"
            OnPreRender="ProposalGrid_PreRender" OnItemEvent="ProposalGrid_ItemEvent" CssClass="defaultText"
            OnDeleteCommand="ProposalGrid_DeleteCommand" OnUpdateCommand="ProposalGrid_UpdateCommand"
            OnPageSizeChanged="ProposalGrid_PageSizeChanged" PageSize="15" OnSortCommand="ProposalGrid_SortCommand"
            GroupPanelPosition="Top" ResolvedRenderMode="Classic" AllowMultiRowEdit="True" AllowMultiRowSelection="True" OnDataBound="ProposalGrid_DataBound" AllowSorting="True">
            <ClientSettings EnableRowHoverStyle="True">
                <Selecting AllowRowSelect="True"></Selecting>
            </ClientSettings>
            <MasterTableView DataSourceID="SqlDataSource1" ClientDataKeyNames="PropDesc" DataKeyNames="PropDesc"
                UseAllDataFields="True" TableLayout="Auto" EditMode="EditForms" NoDetailRecordsText="There are no cases for this workbook."
                NoMasterRecordsText="There are no cases for this workbook.">
                <PagerStyle AlwaysVisible="true" Wrap="False" PageButtonCount="5" ShowPagerText="True" />
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="PropDesc" SortOrder="Ascending" />
                </SortExpressions>
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                   <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridClientSelectColumn FilterControlAltText="Filter column1 column" UniqueName="column1" DataType="System.TimeSpan">
                    </telerik:GridClientSelectColumn>
                    <telerik:GridBoundColumn DataField="PropDesc" FilterControlAltText="Filter PropDesc2 column"
                        HeaderText="Storage Description" SortExpression="PropDesc" UniqueName="PropDescEditorCol"
                        Visible="False" ColumnEditorID="PropDescEditor" HeaderButtonType="None">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" />
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn FilterControlAltText="Filter ModifiedDate column"
                        HeaderText="Modified Date" ReadOnly="True" SortExpression="ModifiedDate" UniqueName="ModifiedDate">
                        <HeaderStyle Font-Bold="True" Wrap="False" />
                        <ItemStyle Wrap="False" HorizontalAlign="Left" />
                    </telerik:GridDateTimeColumn>
                    <telerik:GridTemplateColumn FilterControlAltText="Filter ClientName column"
                        HeaderText="Client Name" ReadOnly="True" SortExpression="ClientName" UniqueName="ClientName">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="100px" Wrap="False" />
                        <ItemStyle HorizontalAlign="Center" Width="100px" Wrap="False" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="PresentedBy" FilterControlAltText="Filter AgentName column" HeaderText="Agent Name" UniqueName="AgentNameCol" ColumnEditorID="AgentName" ReadOnly="True" SortExpression="AgentNameCol" EmptyDataText="">
                        <HeaderStyle Font-Bold="True" Wrap="False" />
                        <ItemStyle HorizontalAlign="Left" Width="150px" Wrap="False" />
                    </telerik:GridBoundColumn>
                    <telerik:GridHyperLinkColumn DataNavigateUrlFields="PropNumber,ClientNumber,ConceptProcNum"
                        DataNavigateUrlFormatString="Prop={0}&amp;ClientID={1}&amp;WP={2}&amp;Type=Edit"
                        DataTextField="PropDesc" FilterControlAltText="Filter column column" HeaderText="Storage Description"
                        UniqueName="PropDesc" SortExpression="PropDesc">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="160px" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" Width="160px" />
                    </telerik:GridHyperLinkColumn>
                    <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="Proposal Type"
                        ReadOnly="True" UniqueName="SalesConcept" SortExpression="SalesConcept">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="100px" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" Width="100px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="PolicyCaseNotation" FilterControlAltText="Filter column column"
                        HeaderText="Policy Notation" ReadOnly="True" SortExpression="PolicyCaseNotation"
                        UniqueName="PolicyCaseNotation" ItemStyle-Wrap="False">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="120px" />
                        <ItemStyle HorizontalAlign="Left" Wrap="False" Width="120px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PolicyInitPremium" DataFormatString="{0:$#,0}"
                        FilterControlAltText="Filter column1 column" HeaderText="Initial Premium" ReadOnly="True"
                        SortExpression="PolicyInitPremium" UniqueName="PolicyInitPremium">
                        <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Wrap="False" Width="80px" />
                        <ItemStyle HorizontalAlign="Right" Wrap="False" Width="80px" />
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings PopUpSettings-Modal="True" FormCaptionStyle-Wrap="False">
                    <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
                        UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                    </EditColumn>
                    <FormCaptionStyle Wrap="False"></FormCaptionStyle>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                    <PopUpSettings Modal="True"></PopUpSettings>
                </EditFormSettings>
            </MasterTableView>
            <HeaderStyle Wrap="False" />
            <PagerStyle AlwaysVisible="True" Mode="NextPrevNumericAndAdvanced" />
            <SelectedItemStyle Font-Bold="True" />
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>

Eyup
Telerik team
 answered on 15 Oct 2015
2 answers
148 views

I am trying to do something similar to the RadToolTip for RadCalendar demo shown here: http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultvb.aspx.  I want to add an export button inside the UserControl for the tooltip, but can't seem to get that event to fire.  My code for the user control is below.  Any ideas?

 

Partial Class CalendarEventDetails
    Inherits System.Web.UI.UserControl
 
    Private dtSelectedDate As DateTime
    Public Property SelectedDate() As DateTime
        Get
            Return dtSelectedDate
        End Get
        Set(ByVal value As DateTime)
            dtSelectedDate = value
        End Set
    End Property
 
    Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
        AddHandler lvEvents.ItemCommand, AddressOf lvEvents_ItemCommand
    End Sub
 
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        odsEvents.SelectParameters("StartDate").DefaultValue = SelectedDate
        odsEvents.SelectParameters("EndDate").DefaultValue = SelectedDate
        lvEvents.DataBind()
    End Sub
 
    Protected Sub lvEvents_ItemCommand(sender As Object, e As ListViewCommandEventArgs)
        If e.CommandName = "Export" Then
            'Do Something
        End If
    End Sub
End Class

 

<%@ Control Language="VB" AutoEventWireup="true" CodeFile="EventDetails.ascx.vb" Inherits="CalendarEventDetails" %>
<asp:ListView runat="server" ID="lvEvents" DataSourceID="odsEvents">
    <LayoutTemplate>
        <div style="max-height: 250px; overflow-y: auto">
            <asp:PlaceHolder runat="server" ID="itemPlaceHolder"></asp:PlaceHolder>
        </div>
    </LayoutTemplate>
    <ItemTemplate>
        <asp:Label runat="server" ID="lblStartDate" Text='<%#Eval("StartDate")%>' Visible="false"></asp:Label>
        <asp:Label runat="server" ID="lblEndDate" Text='<%#Eval("EndDate")%>' Visible="false"></asp:Label>
        <div style="margin-bottom: 5px">
            <b>Category</b><br />
            <%#Eval("Category")%>
        </div>
        <div style="margin-bottom: 5px">
            <b>Title</b><br />
            <asp:Label runat="server" ID="lblTitle" Text='<%#Eval("Title")%>'></asp:Label>
        </div>
        <div style="margin-bottom: 5px">
            <b>Time</b><br />
            <%#Eval("StartDate", "{0:hh:mm tt}")%> to <%#Eval("EndDate", "{0:hh:mm tt}")%>
        </div>
        <div style="margin-bottom: 5px">
            <b>Location</b><br />
            <asp:Label runat="server" ID="lblLocation" Text='<%#Eval("Location")%>'></asp:Label>
        </div>
        <div style="margin-bottom: 5px">
            <b>Description</b><br />
            <asp:Label runat="server" ID="lblDescription" Text='<%#Eval("Description")%>'></asp:Label>
        </div>
        <div>
            <des:LinkButton runat="server" ID="btnExport" Text="Export" CommandName="Export"></des:LinkButton>
        </div>
    </ItemTemplate>
    <ItemSeparatorTemplate>
        <hr />
    </ItemSeparatorTemplate>
</asp:ListView>
<asp:ObjectDataSource ID="odsEvents" runat="server" DataObjectTypeName="CalendarEvent"
    TypeName="CalendarManager" SelectMethod="GetEventList">
    <SelectParameters>
        <asp:Parameter Name="CalendarId" Type="Int32" DefaultValue="101" />
        <asp:Parameter Name="StartDate" Type="DateTime" />
        <asp:Parameter Name="EndDate" Type="DateTime" />
        <asp:Parameter Name="CategoryId" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

Michael
Top achievements
Rank 1
 answered on 15 Oct 2015
1 answer
178 views
I'm using GridNumericColumn inside a batchmode edit grid. How to I set the width of the input field via markup? I tried ItemStyle-Width="100px" but it gets ignored
Pavlina
Telerik team
 answered on 15 Oct 2015
1 answer
160 views

Image Manager can see files, folder, and files in folders. It can also edit any Image and save it successfully. Only problem is uploading. Always get "Access to path is denied" on production server. Local running everything works. Doesn't make sense that I can edit a file that already exists and save it as a new one, but I cannot upload one. Thanks for any help.

 

I have a 2012 server, ApplicationPoolIdentity. Created a folder on the server and created a Virtual Directory to it. Gave Everyone Full permissions until I can get it working then will narrow down. Code to set path is here...

 

string path = "~/emailAssets/" + "test";
                DebugHandler.DebugMessage = "Checking and Creating Directory: " + path;
                try
                {
                    if (!Directory.Exists(Server.MapPath(path)))
                        Directory.CreateDirectory(path);
                }
                catch { throw new Exception("Could not access or create Email Assets directory. Images and Documents will not be available"); }
                string[] paths = new string[] { path };

                // Setup RadEditor
                tbBody.ImageManager.EnableAsyncUpload = true;
                tbBody.ImageManager.ViewPaths = paths;
                tbBody.ImageManager.UploadPaths = paths;
                tbBody.ImageManager.DeletePaths = paths;

Ianko
Telerik team
 answered on 15 Oct 2015
1 answer
72 views

Hi guys,

I am a bit puzzled by this one, I followed the demos and read the help file but cannot get the bars to be stacked. Here is my code:

<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" >
    <PlotArea>
        <Series>
            <telerik:BarSeries GroupName="Project" Stacked="true">
                <Items>
                    <telerik:SeriesItem Name="ORP" YValue="8" />
                    <telerik:SeriesItem Name="Concept" YValue="42" />
                    <telerik:SeriesItem Name="Development" YValue="238" />
                    <telerik:SeriesItem Name="Industrialization" YValue="128" />
                    <telerik:SeriesItem Name="Launch" YValue="87" />
                    <telerik:SeriesItem Name="Post-Launch" YValue="36" />
                    <telerik:SeriesItem Name="Closure" YValue="6" />
                </Items>
            </telerik:BarSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>

Do you have any clue why I cannot stack this serie?

Best Regards,
David

Marin Bratanov
Telerik team
 answered on 15 Oct 2015
3 answers
134 views

Hi Guys,

Please try to perform the following on the RadEditor Demo Page:

1. Empty the editor using the HTML tab.

2. Go to the Design tab and press Enter

Result: two <p> tags appears.

3. Type any line and press Enter.

Result: the word is in a <p> tag, one more <p> tag under the word.

4. Press Enter.

Result: new two <p> tags appears.

Please take a look at this video for better understanding: https://dl.dropboxusercontent.com/u/101184853/Two_p_tags.swf

Please suggest how we can fix this issue.

Ianko
Telerik team
 answered on 15 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?