Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
139 views
In my aspx page I have a RadPageView which contains RadWindow and the RadGrid is inside the RadWindow. (ie. RadMultiPage -> RadPageView -> RadWindow -> RadGrid).
<telerik:RadWindow EnableShadow="true" ShowContentDuringLoad="false" runat="server"
                                        ReloadOnShow="true" Title="Standard Text: Add Observation." OpenerElementID="lnkObservationsText"
                                        Behaviors="None" VisibleStatusbar="false" EnableViewState="true" ID="rdWndObservationText"
                                        Skin="Web20" Modal="true" Width="600">
                                        <ContentTemplate>
                                            <div class="RadModalMainDiv">
                                                <div>
                                                    <p>
                                                        Help text to go here....</p>
                                                </div>
                                                <div class="divStandardTextButtonList">
                                                    <asp:Button ID="btnObservationsTextSelect" runat="server" Text="Select" CssClass="btnStandardText"
                                                        OnClientClick="return ObservationStandardText_Confirm()" />
                                                    <asp:Button ID="btnObservationsTextCancel" runat="server" Text="Cancel" CssClass="btnStandardText" />
                                                </div>
                                                <asp:Panel ID="pnl1" runat="server">
                                                    <div>
                                                        <telerik:RadGrid ID="radGdObservationsText" runat="server" AllowPaging="True" AllowSorting="True"
                                                            AutoGenerateColumns="False" GridLines="None" PageSize="10" Width="100%">
                                                            <MasterTableView CommandItemDisplay="None" Name="ParentGrid">
                                                                <Columns>
                                                                    <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                                                                    </telerik:GridClientSelectColumn>
                                                                    <telerik:GridBoundColumn DataField="description" HeaderText="Observation Description"
                                                                        Visible="true">
                                                                    </telerik:GridBoundColumn>
                                                                </Columns>
                                                            </MasterTableView>
                                                            <PagerStyle Mode="NextPrevAndNumeric" />
                                                            <ClientSettings>
                                                                <Selecting AllowRowSelect="True" />
                                                                <ClientEvents OnRowSelected="SetObservationStandardText" />
                                                            </ClientSettings>
                                                        </telerik:RadGrid>
                                                    </div>
                                                </asp:Panel>
                                            </div>
                                        </ContentTemplate>
                                    </telerik:RadWindow>

When I try to sort the grid clicking on the header, the page refreshes and the RadWindow disappears. Sorting happens coz when i reopens the RadGrid the rows appea sorted. I need the RadGrid to be sroted and remain in the same state. Thanks for all helps in prior.
Casey
Top achievements
Rank 1
 answered on 27 Feb 2012
6 answers
309 views
Hello

I want to access a control which is in the EditTemplate, when the grid is in edit mode. The control would become visible or not
when user chooses an option from a RadioButtonList(possible when grid in edit mode only), and the only ideea I had was to treat the OnSelectedIndexChanged of the RadioButtonList, and then set the Visible property of some control:
protected void PollDistribPointsTypeOptions_SelectedIndexChanged(object sender, EventArgs e)
    {
        RadioButtonList rbl = sender as RadioButtonList;
        if(rbl.SelectedValue == "0" || rbl.SelectedValue=="2")
            (RadGrid1.EditItems[0] as GridEditableItem)["Poll_DistribPointsType"].Controls[3].Visible = false;
    }

Problem is I only get the controls of the ItemTemplate, not the EditTemplate, where the desired controll exists :(
Is there a workaround for this?

Thx a lot.
Casey
Top achievements
Rank 1
 answered on 27 Feb 2012
4 answers
178 views
hi i update 2 RadGrid and 1 panel while RadTree AjaxRequest
i dun want to show the AjaxLoadingPanel showing on Panel control cs the Panel height is 30px oni
is there away to hide ajaxLoadingPanel for certaincontrol
Maria Ilieva
Telerik team
 answered on 27 Feb 2012
1 answer
179 views
I have a combo box that allows custom text. Is there a way for the combo box to perform a postback each time the text in the combo box is updated, added to or removed from? It seems as though current i have to click away from the combo box or hit enter for a postback to occur.

Also, if the above is possible, is there a way to make it NOT postback if there are items available in the list?

Thank,
Duncan
Dimitar Terziev
Telerik team
 answered on 27 Feb 2012
1 answer
251 views
Hi,

I am tring to create a button outside the RadGrid that will export the grid data.

I am using RadAjaxManagerProxy and added
protected void Page_Load(object sender, EventArgs e)
       {
           RadAjaxManager.GetCurrent(this.Page).ClientEvents.OnRequestStart = "onRequestStart";
           if (!IsPostBack) this.DataBind();
       }
on the client side I've
<telerik:RadButton runat="server" ID="export" OnClientClicked="ExportGrid" />
and the following script code in the head section
<script type="text/javascript">
 
    function ExportGrid(sender, args) {
        var masterTable = $find("<%=RadGrid1.ClientID %>").get_masterTableView();
        masterTable.exportToExcel();
 
    }
    function onRequestStart(sender, args) {
        alert(args.get_eventTarget());
        if (args.get_eventTarget().indexOf("btnExport") >= 0)
            args.set_enableAjax(false);
    }
</script>

The problem is that inlike export from the grid button , this way args.get_eventTarget() is always "ctl00$ContentPlaceHolder1$RadGrid1" and there is no indication if this is export or other action ( I send the insert command using custom button as well)  do  I can't disable the ajax .

Is there a way to overcome this?
Casey
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
104 views
I am having a radtreeview with checkboxes. I have around 5000 nodes. Now the check and uncheck works fine with enter key and mouse click. It also works with spacebar key. But when there is a scrollbar in the treeview the treeview is scrolling down on pressing spacebar key. Is this a default behavior, and any ways we can supress this.
Bozhidar
Telerik team
 answered on 27 Feb 2012
3 answers
146 views
Hello,
I need to show a horizontal stackedbar RadChart for several (say, 2) series, each series has one item and with some  limitations for min and max values. I insert below a page with some simple code and attach 2 images. As you can see if orientation is vertical that all is perfect. But when I change orientation to horizontal one I get some exccessive bar after the last bar. Is it a bug ? How can I fix that? I use Q2 2010 version in this project. May be it is fixed in more latest versions?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Stackbar2.aspx.cs" Inherits="Stackbar2" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadChart ID="RadChart1" runat="server" DefaultType="StackedBar"
            SeriesOrientation="Vertical">
             
            <Series>
                <telerik:ChartSeries Name="Series 1" Type="StackedBar">
                    <Items>
                        <telerik:ChartSeriesItem Name="Item 1" YValue="190">
                        </telerik:ChartSeriesItem>
                    </Items>
                </telerik:ChartSeries>
                <telerik:ChartSeries Name="Series 2" Type="StackedBar">
                    <Items>
                        <telerik:ChartSeriesItem Name="Item 1" YValue="100" >
                        </telerik:ChartSeriesItem>
                    </Items>
                </telerik:ChartSeries>
            </Series>
       
        </telerik:RadChart>
        <br />
         
        <asp:Label ID="lblChartOrientation" runat="server" Text="Series orientation:" />
<asp:RadioButtonList AutoPostBack="true" ID="OrientationList" runat="server" OnSelectedIndexChanged="OrientationList_SelectedIndexChanged">
<asp:ListItem Text="Horizontal" Value="Horizontal" />
<asp:ListItem Text="Vertical" Value="Vertical" Selected="True" />
</asp:RadioButtonList>
    </div>
    </form>
    </body>
    </html>
        
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Charting;
using System.Drawing;
 
public partial class Stackbar2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        Settings();
    }
    private void Settings()
    {
        ChartSeriesCollection coll = RadChart1.Series;
        for (int i = 0; i < coll.Count; i++)
        {
 
        }
 
       double yMin=110;
        double yMax=400;
        double step = 50;
        RadChart1.PlotArea.YAxis.AddRange(yMin, yMax, step);
        RadChart1.PlotArea.YAxis.AutoScale = false;
    }
 
    protected void OrientationList_SelectedIndexChanged(object sender, EventArgs e)
    {
        RadChart1.SeriesOrientation = (ChartSeriesOrientation)Enum.Parse(typeof(ChartSeriesOrientation), OrientationList.SelectedValue);
    }
 
}

Giuseppe
Telerik team
 answered on 27 Feb 2012
1 answer
63 views
Sir;

Can we use telerik ajax control to develop application that runs on mobile browsers.
i had created a sample application in which i use simple asp button and a telerik button. and redirected to another page on both button clicks. Asp button click works on mobile browser button telerik button does not works on mobile browser.

Please clear as soon as possible.

Regards
raman singla
Slav
Telerik team
 answered on 27 Feb 2012
1 answer
106 views
Hello,

We are using the Telerik Rad Controls for ASP.Net suite and have used the RadSpell control in a few places in our application.  We are finding some issues, however, when the dialog displays that it will hide the word which is in error by scrolling beyond the word.  This appears NOT to occur in IE 8 but does occur in Safari, Chrome and Firefox. 

I have attached a screen shot showing the behavior.  In this example the misspelled word "MPN" is being detected as erroneous by RadSpell.  However, the "not in dictionary" dialog is scrolled farther than expected effectively blocking the misspelled word.  The user would have to scroll up to actually see the error. 

This spell checker is attached to a RadEditor which accepts HTML.  When I copy the content of the editor to NotePad and clear the HTML and try to spell check again, the word is highlighted properly.

It looks like RadSpell isn't able to scroll to the proper word depending on the content.  I'm not sure why it tries to scroll down at all becuase in IE it is always scrolled to the top where the misspelled word is.

Please advise.
Rumen
Telerik team
 answered on 27 Feb 2012
2 answers
184 views
I was not able to set the auto height alignment for Custom appointment in the RadScheduler.

In my scenario,

1. I'm Using  Telerik AJAX UI Q2 2011 and Dot.net 4.0 Framework. (i'm not in any position to this configuration)
2. I'm using Custom Appointment Template (Height 90px x Width 130px) and it must show without any freezing/shrink as exact dimension.
3. I want to have Dynamic Cell alignment in scheduler hence i don't want to set the row height and column width in the scheduler control when i bind datasource. B'coz If i set these values RowHeight="90" ColumnWidth="130" all the cells allotted with the same dimension. Here if i have no events on particular hours i don't want to see that cell has more space. please refer screenshot for more information.
4. Here i give you the code i used. Almost we have using this scheduler only to show events/appointments, we don't need to create appointments and any other edit modal functionality (just read only functionality)
<telerik:RadScheduler runat="server" ID="eventCalendar" Skin="Web20" ShowAllDayRow="false" RowHeight="90"
                        ColumnWidth="130" DayView-ShowResourceHeaders="false"
                        AllowDelete="false" AllowInsert="false" AllowEdit="false" AdvancedForm-Modal="false"  
                        AdvancedForm-Enabled="false" AppointmentStyleMode="Auto" DayView-ReadOnly="true"
                        WeekView-ReadOnly="true" MonthView-ReadOnly="true" TimelineView-ReadOnly="true" OnNavigationComplete="SchedulerNavigating"
                        ReadOnly="true" Height="600px" Width="775px" OverflowBehavior="Expand" CustomAttributeNames="DisplayStartTime,EventRecurrenceId, EventColor, DisplayEndTime,
                        StartDate,EndDate,DisplayPermitName,DisplayFacilityVisibility,DisplayDayViewGroupOrder,
                        DisplayClientVisibility,DisplayResourceVisibility,Id, EventColor
                        IsEditableEvent,DisplayCalendarTime,IsHoliday,IsRecurrence,ExpectedAttendance"
                        DataStartField="StartDate" EnableDatePicker="true"
                        EnableEmbeddedSkins="true" DataDescriptionField="EventColor" MonthView-GroupingDirection="Horizontal"
                        DataEndField="EndDate" DataKeyField="Id" DataRecurrenceParentKeyField="EventRecurrenceId"  WeekView-EnableExactTimeRendering="true"
                        DayView-ShowHoursColumn="true" DataRecurrenceField="EventRecurrenceId" FirstDayOfWeek="Sunday"
                        LastDayOfWeek="Saturday" DataSubjectField="DisplayPermitName"
                        WeekView-GroupingDirection="Horizontal" OnAppointmentDataBound="eventCalendar_AppointmentDataBound" >
                        <ExportSettings OpenInNewWindow="true" FileName="SchedulerExport">
                            <Pdf PageTitle="Schedule" Author="Telerik" Creator="Telerik" Title="Schedule" />
                        </ExportSettings>
                        <%--<ResourceTypes>
                            <telerik:ResourceType AllowMultipleValues="true" KeyField="DisplayResourceName" Name="Resource" TextField="DisplayResourceName" ForeignKeyField="DisplayResourceName" />
                        </ResourceTypes>--%>
                        <%--TimelineView-NumberOfSlots="7"--%>
                        <%--daystarttime="08:00:00" dayendtime="23:00:00"  DayStartTime="08:00:00" DayEndTime="18:00:00"--%>
                        <AppointmentTemplate>
                            <asp:Panel ID="appPanel" runat="server" Width="130" Height="130" style="min-heightL: 120px;">
                                <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
                                    <tr>
                                        <td id="divColorChange" runat="server" style="width: 5px; min-width: 5px; max-width: 10px !important;">
                                            <div width="100%">
                                                &nbsp;
                                            </div>
                                        </td>
                                        <td id="divApp" runat="server">
                                            <%--CustomAttributeNames="StartTime,EndTime,SessionDate,DisplayPermitName,StartDate,DisplayClientVisibility,DisplayResourceVisibility,DisplayFacilityVisibility,EndDate,ID,DisplayPermitVisibility,DisplayFacilityName,DisplayResourceName,DisplayClientName,Event_ID,DisplayRoomNumber"--%>
                                            <div class="AlignCenter">
                                                <p style="width: 95%">
                                                    <asp:Image ID="imageRecurrenceIcon" runat="server" Visible='<%# Convert.ToBoolean(Eval("IsRecurrence")) %>' style="float: right;"
                                                        ImageUrl="~/Images/Recurrence_icon.png" />
                                                    <asp:LinkButton runat="server" ID="lblDisplayPermitName" Visible='<%# Convert.ToBoolean(Eval("IsEditableEvent")) %>'
                                                        OnClick="RedirectToEventMaintenance" Style="font-weight: bold; color: Black; word-wrap: break-word; font-size: 10px;"  CommandArgument='<%# Eval("Id") + "~" + Eval("StartDate")%>'>
                                                                    <%# Eval("DisplayPermitName")%>
                                                    </asp:LinkButton>
                                                    <asp:Label ID="labelPermitName" Visible='<%# !Convert.ToBoolean(Eval("IsEditableEvent")) %>'
                                                    Style="font-weight: bold; color: Black; word-wrap: width: 100%; break-word; font-size: 10px;"
                                                    runat="server" Text='<%# Eval("DisplayPermitName")%>' CssClass="FontBold"></asp:Label>
                                                </p>
                                                <p style="width: 95%">
                                                    <asp:Label runat="server" ID="lblStartTime" Style="font-weight: normal; word-wrap: break-word;
                                                    color: Black; font-size: 9px; text-align: left; float: left;">
                                                    <%# Eval("DisplayCalendarTime")%></asp:Label>
                                                </p>
                                                <p style="width: 95%">
                                                    <asp:Label runat="server" ID="lblDisplayClientTypeName" Style="font-weight: normal;
                                                        word-wrap: break-word; color: Black; font-size: 9px; width: 100%; text-align: left;
                                                        float: left;" Visible='<%# Convert.ToBoolean(Eval("DisplayClientVisibility")) %>'>
                                                        <%# Eval("DisplayClientName")%>
                                                    </asp:Label>
                                                </p>
                                                <p style="width: 95%">
                                                    <asp:Label runat="server" ID="lblDisplayFacilityName" Style="font-weight: normal;
                                                    color: Black; font-size: 9px; word-wrap: break-word; width: 100%; float: left;
                                                    float: left; text-align: left; float: left;" Visible='<%# Convert.ToBoolean(Eval("DisplayFacilityVisibility")) %>'>
                                                            <%# Eval("DisplayFacilityname")%>
                                                    </asp:Label>
                                                </p>
                                                <p style="width: 95%">
                                                    <asp:Label runat="server" ID="lblDisplayResourceName" Style="font-weight: normal;
                                                        color: Black; font-size: 9px; word-wrap: break-word; width: 100%; text-align: left;
                                                        float: left;">
                                                        <%# Eval("DisplayResourceName")%>
                                                    </asp:Label>
                                                </p>
                                                <p style="width: 95%">
                                                    <asp:LinkButton ID="linkButtonMore" Visible='<%# !Convert.ToBoolean(Eval("IsHoliday")) %>'
                                                    Style="font-weight: bold; color: Black; font-size: 9px; text-align: left; float: left;" runat="server"
                                                    OnClientClick="javascript:return false;" Text="More"></asp:LinkButton>
                                                </p>
                                                <asp:HiddenField ID="hiddenFieldIsEditable" runat="server" Value='<%# Eval("DisplayIsEditableEvent")%>' />
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </AppointmentTemplate>
                    </telerik:RadScheduler>

5. All i want is in Day View mode, if any hours not utilized for any events, it supposed to not occupy any space, but still i want to show the hours timeline (my client preferred to show working hours even there is no events to show).
6. I was not able to attach my style sheet here, but really i am sure they didn't create any impact on this issue. If still it required let me know i will send in an email.
7. Actually i need a solution as similar to this issue http://www.telerik.com/community/forums/aspnet-ajax/scheduler/timeline-view-vertical-header-does-not-line-up-with-appoints.aspx


Thanks,
Ilayaraja





Plamen
Telerik team
 answered on 27 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?