Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
125 views
Good morning, how do I modify the properties of a

<telerik: GridButtonColumn in my code behind?


appears when the grid <telerik: GridButtonColumn will be invisible,
however when I push the button to make visible the iré <telerik: GridButtonColumn ...

how can I perform this process?
Jhon
Top achievements
Rank 1
 answered on 28 Sep 2012
4 answers
188 views
I'm working on a pie chart that is close to working as expected - just not quite.  My problems revolve around the labels - something that a lot of people seem to struggle with.  In my case, it's the connectors.

I have three images attached, showing the same data with a few different settings for the pie:

DefaultPie is basically what i want to see, and i haven't tweaked the rotations or scales very much.  Note how the connectors are overlapping at the top.  Why are some of the labels being placed out of order?  This would be totally fine, provided that the top five items weren't in a bizarre order.

The other two images are the same data with rotations and scales applied to try to improve the display.  To no avail.  In all cases, the connectors end up crossing.  In the best case scenario, i might have one bizarrely placed label, and in the worst case, there might be five or six of them placed willy nilly.

What might i do here to fix this?

Here's the code i'm using for my chart (minus the individual series items, which i'm not making any appearance changes to):
this.Chart.DefaultType = ChartSeriesType.Pie;
this.Chart.IntelligentLabelsEnabled = true;
this.Chart.ChartTitle.Visible = false;
this.Chart.Legend.Visible = false;
this.Chart.PlotArea.Appearance.Dimensions.Margins = new Telerik.Charting.Styles.ChartMargins(0, 0, 0, 0);
 
ChartSeries seriesPrimary = new ChartSeries();
    seriesPrimary.Type = ChartSeriesType.Pie;
    seriesPrimary.Appearance.ShowLabelConnectors = true;
    seriesPrimary.Appearance.LabelAppearance.LabelConnectorStyle.Color = System.Drawing.Color.White;
                 
this.Chart.Series.Add(seriesPrimary);

Petar Kirov
Telerik team
 answered on 28 Sep 2012
1 answer
84 views
Hi,

I am very new to all of this I have seen a few examples of doing this but can't seem to get it to work. I have seen some about using CSS and some of using code. Just wanted to know which is better? I would like to use CSS. So here is what I got I have a RadScheduler with custom resources not sure that is what it is called. I have Therapists, Patients and Status. What I want to do is change the color of the appointment when the status is changed. Can you please provide me with what code I need to implement and maybe a sample of what the CSS should look like. thanks here is my code.
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="STSchedule.aspx.vb" Inherits="ScheduleUser_STSchedule" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <link href="../Styles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    .style3
    {
        width: 165px;
        height: 120px;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <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:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div id="content-container1">
    <div id="content-container2">
            <div id="section-navigation">
                <img alt="h2t" class="style3" src="../Pics/logoh2t.png" />
                <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Transparent"
                    Width="161px" SelectedIndex="2" >
                <Tabs>
                    <telerik:RadTab runat="server" Text="PT"
                        NavigateUrl="~/ScheduleUser/PTSchedule.aspx">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="OT"
                        NavigateUrl="~/ScheduleUser/OTSchedule.aspx">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="ST" Selected="True"
                        NavigateUrl="~/ScheduleUser/STSchedule.aspx">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="MT"
                        NavigateUrl="~/ScheduleUser/MTSchedule.aspx">
                    </telerik:RadTab>
                     <telerik:RadTab runat="server" Text="Patients"
                        NavigateUrl="~/ScheduleUser/Schedule.aspx">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
                <asp:ListBox ID="ListBox1" runat="server" BackColor="#99CCFF"
                    DataSourceID="SqlDataSource6" DataTextField="TherapistName"
                    DataValueField="EmployeeID" Rows="30" Width="161px" AutoPostBack="True"></asp:ListBox>
                <asp:SqlDataSource ID="SqlDataSource6" runat="server"
                    ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT        EmployeeID, TherapistFirstName, TherapistLastName, Occupation, TherapistLastName + ' ' + TherapistFirstName + ' ' + Occupation AS TherapistName
FROM            Therapist
WHERE        (Occupation = N'SLP') OR
                         (Occupation = N'SLPA')
ORDER BY TherapistLastName"></asp:SqlDataSource>
</div>
<div id="content">
     
    <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Vista" DataEndField="EndTime"
        DataKeyField="ApptID" DataSourceID="SqlDataSource1" DataStartField="StartTime"
        DataSubjectField="Subject" DayEndTime="21:00:00"
        DisplayRecurrenceActionDialogOnMove="True" Height="700px"
        SelectedView="WeekView" ShowAllDayRow="False"
        ShowFooter="False" TimeZoneID="US Mountain Standard Time"
        TimeZoneOffset="-07:00:00" WorkDayEndTime="18:00:00"
        DataDescriptionField="Description"
        EnableDescriptionField="True" DataRecurrenceField="Recurrence"
    DataRecurrenceParentKeyField="RecurrencePartentID"
    DataReminderField="Reminder" style="margin-left: 3px"
        HoursPanelTimeFormat="htt" TimeLabelRowSpan="1">
        <ResourceTypes>
            <telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="PatientID"
                KeyField="PatientID" Name="Patient" TextField="PatientName" />
            <telerik:ResourceType DataSourceID="SqlDataSource5" ForeignKeyField="StatusID"
                KeyField="ReasonID" Name="Status" TextField="Appointment" />
            <telerik:ResourceType DataSourceID="SqlDataSource7"
                ForeignKeyField="TherapistID" KeyField="EmployeeID" Name="Theraist"
                TextField="TherapistName" />
        </ResourceTypes>
        <AppointmentTemplate>
        <div class="AppointmentTemplate <%# Eval("Status.Text") %>">
            <h4><%# Eval("Subject") %></h4>
        </div>
        </AppointmentTemplate>
        <Localization HeaderTimeline="All Therapist " HeaderToday="Today" />
        <TimelineView GroupBy="Therapist"
            GroupingDirection="Vertical" />
        <MultiDayView ShowHoursColumn="False" />
        <Reminders Enabled="True" />
    </telerik:RadScheduler>
    </div>
             
             
             
    </div>
    </div>
   
   
    <asp:SqlDataSource ID="SqlDataSource5" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
        SelectCommand="SELECT [Appointment], [ReasonID] FROM [StatusInfo]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:Insurance InfoConnectionString1 %>"
         
        SelectCommand="SELECT ApptID, RecurrencePartentID, PatientID, TherapistID, StatusID, TimeZoneID, StartTime, EndTime, Subject, Description, Reminder, Recurrence, LastModified FROM Schedule WHERE (TherapistID = @TherapistID)"
        DeleteCommand="DELETE FROM [Schedule] WHERE [ApptID] = @ApptID"
        InsertCommand="INSERT INTO [Schedule] ([RecurrencePartentID], [PatientID], [TherapistID], [StatusID], [TimeZoneID], [StartTime], [EndTime], [Subject], [Description], [Reminder], [Recurrence], [LastModified]) VALUES (@RecurrencePartentID, @PatientID, @TherapistID, @StatusID, @TimeZoneID, @StartTime, @EndTime, @Subject, @Description, @Reminder, @Recurrence, @LastModified)"
         
         
     
     
         
        UpdateCommand="UPDATE [Schedule] SET [RecurrencePartentID] = @RecurrencePartentID, [PatientID] = @PatientID, [TherapistID] = @TherapistID, [StatusID] = @StatusID, [TimeZoneID] = @TimeZoneID, [StartTime] = @StartTime, [EndTime] = @EndTime, [Subject] = @Subject, [Description] = @Description, [Reminder] = @Reminder, [Recurrence] = @Recurrence, [LastModified] = @LastModified WHERE [ApptID] = @ApptID">
        <DeleteParameters>
            <asp:Parameter Name="ApptID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="RecurrencePartentID" Type="Int32" />
            <asp:Parameter Name="PatientID" Type="Int32" />
            <asp:Parameter Name="TherapistID" Type="Int32" />
            <asp:Parameter Name="StatusID" Type="Int32" />
            <asp:Parameter Name="TimeZoneID" Type="String" />
            <asp:Parameter Name="StartTime" Type="DateTime" />
            <asp:Parameter Name="EndTime" Type="DateTime" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="Reminder" Type="String" />
            <asp:Parameter Name="Recurrence" Type="String" />
            <asp:Parameter Name="LastModified" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBox1" Name="TherapistID"
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="RecurrencePartentID" Type="Int32" />
            <asp:Parameter Name="PatientID" Type="Int32" />
            <asp:Parameter Name="TherapistID" Type="Int32" />
            <asp:Parameter Name="StatusID" Type="Int32" />
            <asp:Parameter Name="TimeZoneID" Type="String" />
            <asp:Parameter Name="StartTime" Type="DateTime" />
            <asp:Parameter Name="EndTime" Type="DateTime" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="Reminder" Type="String" />
            <asp:Parameter Name="Recurrence" Type="String" />
            <asp:Parameter Name="LastModified" Type="String" />
            <asp:Parameter Name="ApptID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
         
        SelectCommand="SELECT PatientID, PatientFirstName, PatientLastName, PatientDOB, PatientLastName + ' ' + PatientFirstName AS PatientName FROM Patients ORDER BY PatientLastName">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
         
         
        SelectCommand="SELECT EmployeeID, TherapistFirstName, TherapistLastName, Occupation, TherapistLastName + ' ' + TherapistFirstName + ' ' + Occupation AS TherapistName FROM Therapist WHERE (Occupation = N'SLP') OR (Occupation = N'SLPA') ORDER BY TherapistLastName">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource7" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
        SelectCommand="SELECT EmployeeID, TherapistFirstName + ' ' + TherapistLastName AS TherapistName FROM Therapist WHERE (EmployeeID = @EmployeeID)">
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBox1" DefaultValue="32" Name="EmployeeID"
                PropertyName="SelectedValue" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
        SelectCommand="SELECT Appointment FROM StatusInfo WHERE (NOT (Appointment IS NULL))">
    </asp:SqlDataSource>
</asp:Content>
Boyan Dimitrov
Telerik team
 answered on 28 Sep 2012
1 answer
103 views
I am using a custom skin for my controls. In my ComboBox.css I have the following CSS code:
.RadComboBox_Hew .rcbInput,
.RadComboBox_Hew .rcbInputCell
{
    text-transform: uppercase;
    height:auto;
}
 This works fine for a radComboBox that doesn't use a header/item template. The row height matches the font height. When used with a radComboBox with a template, the row height is roughly twice the height of the font. What CSS tag do I need to use to control the row height when using a template?




Nencho
Telerik team
 answered on 28 Sep 2012
1 answer
98 views
Hello,

For some reason, top view bar (Day, week, month as shown in screenshot) is always on top of my AdvancedInsert form.

Main Page

<

 

 

div class="exampleContainer">

 

 

 

<telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="LastName"

 

 

 

DataEndField="ApptEnd" DataKeyField="ScheduleID" DataStartField="ApptDate" DataSubjectField="Subject"

 

 

 

DayEndTime="18:00:00" DayStartTime="08:00:00"

 

 

 

SelectedView="WeekView"

 

 

 

EditFormDateFormat="M/d/yyyy"

 

 

 

EditFormTimeFormat="h:mm tt" AllowDelete="False" AllowEdit="False"

 

 

 

AllowInsert="True" Height="" >

 

 

 

<AdvancedForm Modal="true" Width="600" />

 

 

 

<AdvancedEditTemplate>

 

 

 

<div class="rsAdvancedEdit" style="position: relative; border: 1px solid black; background-color: white;

 

 

 

 

height: auto;">

 

 

 

<asp:Label ID="Label1" runat="server" Text="Edit Template"></asp:Label>

 

Test advanced Edit template

 

 

</div>

 

 

 

 

</AdvancedEditTemplate>

 

 

 

<AdvancedInsertTemplate>

 

 

 

<div class="rsAdvancedInsert" style="position: relative; border: 1px solid black;

 

 

 

 

background-color: white; height: auto;">

 

test advanced insert

 

 

<asp:Button ID="btnInsertAppointment" runat="server" Text="Insert" />

 

 

 

</div>

 

 

 

 

</AdvancedInsertTemplate>

 

 

 

<InlineInsertTemplate>

 

 

 

 

<div class="rsAdvancedEdit rsAdvancedModal" style="position: relative; width:400px;" >

 

 

 

<div class="rsModalBgTopLeft">

 

 

 

</div>

 

 

 

<div class="rsModalBgTopRight">

 

 

 

</div>

 

 

 

<div class="rsModalBgBottomLeft">

 

 

 

</div>

 

 

 

<div class="rsModalBgBottomRight">

 

 

 

</div>

 

 

 

<div class="rsAdvTitle">

 

 

 

<br />

 

New Appointment

 

 

<asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" CommandName="Cancel" CausesValidation="false" />

 

 

 

 

</div>

 

 

 

<div class="rsAdvContentWrapper">

 

 

 

<uc1:AdvancedInsert ID="advInsert" runat="server" />

 

 

 


</
div>

 

 

 

</div>

 

 

 

<asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">

 

 

 

 

</asp:Panel>

 

 

 

 

</InlineInsertTemplate>

 

 

 

<TimeSlotContextMenuSettings EnableDefault="True" />

 

 

 

<AppointmentContextMenuSettings EnableDefault="True" />

 

 

 

<ExportSettings OpenInNewWindow="True">

 

 

 

</ExportSettings>

 

 

 

</telerik:RadScheduler>

AdvancedInsert.ascx

 

 

 

<table width="100%">

 

all other controls.....

 

 

</table> 

 

 

Boyan Dimitrov
Telerik team
 answered on 28 Sep 2012
3 answers
114 views
Hello,

I have some difficulties to localize RadEditor ImageManager dialog. For all the other dialogs there is a key named:
Common_GridPagerText
in RadEditor.Dialogs.resx file, which successfully localize all pagers in dialogs, except Image manager, where pager is not localized. Is there any other key to translate this pager?

Thank you in advance.

Adam
Rumen
Telerik team
 answered on 28 Sep 2012
7 answers
825 views
Hello All,

I have a report which show data hierarchical data with three levels of grid.
I have used the nested view template for this.

Also, i have a selection on the top of the page, which allows the user to select the no of nested grids.
So, i need to hide the expand/collapse column based on the selection made.


Let me know, how should i approach to this.

Thanks,
Avi

Oleg
Top achievements
Rank 1
 answered on 28 Sep 2012
3 answers
217 views

Please help me on this since I am new.  Thanks a lot.

I changed the text box to a dropdown as below:

from

        <telerik:GridBoundColumn DataField="name" DefaultInsertValue=""
            HeaderText="name" SortExpression="name" UniqueName="name">
        </telerik:GridBoundColumn>

to
        <telerik:GridDropDownColumn DatasourceID=sqldatasource2 ListValueField=name ListTextField=name
            EnableEmptyListItem=true EmptyListItemText="choose an option" DataField="name"
            datatype=System.String
            HeaderText="name" SortExpression="name" UniqueName="name">
        </telerik:GridDropDownColumn>

the statement below from insertCommand event handler failed since I don't know how to get the selected value from the dropdown

Dim CompanyName As String = TryCast(newItem("name").Controls(0), TextBox).Text

Please help me.
---------------------------------------------------------------------------------------------------------------------

[VB] InsertCommand event handler

'Get the GridEditableItem of the RadGrid

Dim

newItem

 

As GridEditableItem = TryCast(e.Item, GridEditableItem)

 

'Access the textbox from the edit form template and store the values in string variables.

Dim

 

 

CompanyName As String = TryCast(newItem("CompanyName").Controls(0), TextBox).Text

 

Dim

 

 

Phone As String = TryCast(newItem("Phone").Controls(0), TextBox).Text

 

Try

'Insert Query execution

SqlDataSource1.InsertCommand =

 

"INSERT INTO Shippers (CompanyName, Phone) Values ('" +

 

CompanyName +

 

"','" + Phone + "')"

 

SqlDataSource1.Insert()

Catch

 

 

ex As Exception

 

RadGrid1.Controls.Add(

 

New LiteralControl("Unable to insert Shipper. Reason: " +

 

ex.Message))

e.Canceled =

 

True

 

End Try
--------------------------------------------------------
 

 

 

 

 

Supriya
Top achievements
Rank 1
 answered on 28 Sep 2012
1 answer
50 views
Hello,

does PanelBat support globalization?
By that, I mean Rad Panel Item text.


br,
Jan
Jan
Top achievements
Rank 1
 answered on 28 Sep 2012
1 answer
75 views
Hello all,

How can I use the Radgrid.GetBindingData with a stored procedure? When I replace the 2nd parameter with the name of a stored proc I get compilation errors. Is it possible?

I would greatly appreciate if someone can give me an answer.


GridBindingData data = RadGrid.GetBindingData("xxxxx.WCF.dbPublisherDataContext", "vPublisherQueues", startRowIndex, maximumRows, sortExpression, filterExpression);                        
Tsvetina
Telerik team
 answered on 28 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?