Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
122 views
What I would like to do is add a Refresh icon next to the Dock/Undock button on a SlidingPane so a user could easily refresh the contents of the pane.  Is there any way to do this?
Svetlina Anati
Telerik team
 answered on 22 Sep 2009
1 answer
110 views

I have to rad combo boxes, RadLaborSchedule (rad1) and RadLaborCatDesc (rad2).  Both these rad combo boxes are declared as EditItems in a radgrid.  How do I populate rad2 with selected value of rad1?

I tried using this code in javascript, which errors out at compile time because RadLaborCatDesc can not be found, being an edit item of a rad grid. 

Thanks.

Suresh

Here is the javascript:

 

 

//global variables for the countries and cities comboboxes

 

 

 

 

 

var LaborCatCombo;

 

 

function pageLoad()

 

{

 

// initialize the global variables

 

 

 

 

 

// in this event all client objects

 

 

 

 

 

// are already created and initialized

 

 

 

 

LaborCatCombo = $find(

"<%= RadComboBoxLaborCatDesc.ClientID %>");

 

}

 

function LoadLaborCategories(combo, eventArqs)

 

{

 

var item = eventArqs.get_item();

 

LaborCatCombo.set_text(

"Loading...");

 

LaborCatCombo.clearSelection();

 

 

// if a labor schedule is selected

 

 

 

 

 

if (item.get_index() > 0)

 

{

 

// this will fire the ItemsRequested event of the

 

 

 

 

 

// countries combobox passing the continentID as a parameter

 

 

 

 

LaborCatCombo.requestItems(item.get_value(),

false);

 

}

 

else

 

 

 

 

{

 

// the -Select a continent- item was chosen

 

 

 

 

LaborCatCombo.set_text(

" ");

 

LaborCatCombo.clearItems();

}

}

And this is the radgrid declaration:

 

 

<telerik:GridTemplateColumn DataField="LaborSchedule" HeaderText="Labor Schedule" UniqueName="LaborSchedule">

 

 

 

 

 

 

<ItemTemplate >

 

 

 

 

 

 

<asp:Label id="LabelLaborSchedule" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "LaborSchedule")%>'

 

 

 

 

 

 

></asp:Label>

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

<ItemStyle Width="500px" />

 

 

 

 

 

 

<EditItemTemplate>

 

 

 

 

 

 

<telerik:RadComboBox DataTextField="LaborSchedule"

 

 

 

 

 

 

DataValueField="LaborSchedule"

 

 

 

 

 

 

AutoPostBack="false"

 

 

 

 

 

 

EnableLoadOnDemand="True"

 

 

ID="RadComboBoxLaborschedule"

 

 

runat="server"

 

 

Height="140px"

 

 

Width="100px"

 

 

 

 

 

 

SelectedValue = '<%#DataBinder.Eval(Container.DataItem, "LaborSchedule")%>'

 

 

 

 

 

 

SelectedText = '<%#DataBinder.Eval(Container.DataItem, "LaborSchedule")%>'

 

 

 

 

 

 

DataSourceId = "ObjectDataSourceGetSchedules"

 

 

 

 

 

 

OnItemsRequested= "RadComboBoxLaborschedule_ItemsRequested"

 

 

 

 

 

 

OnClientSelectedIndexChanging="LoadLaborCategories"

 

 

 

 

 

 

>

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

 

<telerik:GridTemplateColumn DataField="LaborCategoryDesc" HeaderText="LaborCategoryDesc" UniqueName="RadComboBoxLaborCatDesc">

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

<asp:Label id="LabelLaborCategoryDesc" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "LaborCategoryDesc")%>'

 

 

 

 

 

 

></asp:Label>

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

<EditItemTemplate>

 

 

 

 

 

 

<telerik:RadComboBox ID="RadComboBoxLaborCatDesc" runat="server"

 

 

DataTextField="LaborCategoryDesc"

 

 

DataValueField="LaborCategoryCode"

 

 

 

 

 

 

SelectedValue = '<%#DataBinder.Eval(Container.DataItem, "LaborCategoryCode")%>'

 

 

 

 

 

 

SelectedText = '<%#DataBinder.Eval(Container.DataItem, "LaborCategoryDesc")%>'

 

 

 

 

 

 

DataSourceId = "ObjectDataSourceLabelCategory"

 

 

 

 

 

 

OnItemsRequested= "RadComboBoxLaborCatDesc_ItemsRequested"

 

 

 

 

 

 

AutoPostBack="false"

 

 

 

 

 

 

>

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

Yavor
Telerik team
 answered on 22 Sep 2009
1 answer
109 views
Hello -

I have a tabstrip setup on a page in my system. It was initially setup to show the 4 most popular categories as tabs with a 5th tab to alowing users to click to view more categories. Because we only have 15 categories and most visitors only see 7-9 I thought I would just enable scrolling. However, when I enable scrolling, ALL the tabs disappear. The SAME code without tabs enabled works fine, I just have extra code for the datasource to only grab the top 4 categories and then manually add a fifth row.

Below is the relevant code, please note I am using CSS to define a custom look/feel for the tabs.

Any help would be greatly appreciated, I am spinning my wheels on this.

P.S. - The next, prev arrows show up to the right of the tabs div as I would expect them too. The number of times I can click next seems odd though as it lets me click 21 times, there would be a max of 15 tabs and 6 could fit in the area provided.

Default.aspx (Relevant Portion Only)

 

<div id="tabs">   
    <telerik:RadTabStrip ID="rtsCategoryList" runat="server" skin="" EnableEmbeddedSkins="false" Width="788px" Height="20px"   
        OnTabClick="rtsCategoryList_TabClick" ScrollChildren="true"   
        PerTabScrolling="true" ScrollPosition="0" BackColor="#000000" ScrollButtonsPosition="Right">   
    </telerik:RadTabStrip>   
</div> 

Default.aspx.cs (Relevant Portion Only)

 

            DataTable table = RetrievalProcedures.SpWsGetCategoriesByCityState(_city, _state);  
              
            // Build the tabs.  
            foreach (DataRow row in table.Rows)  
            {  
                RadTab newTab = new RadTab();  
                newTab.Value = row["categoryId"].ToString();  
                newTab.Text = row["categoryName"].ToString();  
                newTab.CssClass = "tab";  
                newTab.HoveredCssClass = "tabHover";  
                newTab.SelectedCssClass = "tabSelected";  
                rtsCategoryList.Tabs.Add(newTab);  
            }  
 
            // Set the first tab as selected.  
            rtsCategoryList.Tabs[0].Selected = true;  
 

 

 

main.css (Relevant Portion Only)

div.divBusinessSearchPanel #tabs 
{  
    width788px;  
    height20px;  
    border0px;  
    margin-bottom0px;  
}  
 
div.divBusinessSearchPanel .tab, div.divBusinessSearchPanel .tabHover, div.divBusinessSearchPanel .tabSelected  
{  
    displayinline-block;  
    width120px;  
    height18px;  
    margin0px 2px 0px 0px;  
    padding2px 0px 0px 0px;  
    font-size12px;  
    font-weightbold;  
    color#ffffff;  
    text-aligncenter;  
}  
 
div.divBusinessSearchPanel .tab  
{  
    background-imageurl(/images/ReusableControls/BusinessSearchPanel/bg-tab.png);   
    color#ffffff;  
}  
 
div.divBusinessSearchPanel .tabHover  
{  
    background-imageurl(/images/ReusableControls/BusinessSearchPanel/bg-tab.png);   
    color#fff000;  
}  
 
div.divBusinessSearchPanel .tabSelected  
{  
    background-imageurl(/images/ReusableControls/BusinessSearchPanel/bg-tab-selected.png);   
    color#f0f0f0;  
}  
 
div.divBusinessSearchPanel .rtsPrevArrow  
{  
    background-color#eeefff;  
}  
 
div.divBusinessSearchPanel .rtsNextArrow  
{  
    background-color#000fff;  

Paul
Telerik team
 answered on 22 Sep 2009
3 answers
395 views
I'm using a RadComboBox inside a RadGrid.  It appears I have to use a GridTemplateColumn because I want to use a custom skin for the drop down and I want to have a blank entry as the first item by default.  Is there a way to do that without using a GridTemplateColumn?

Anyhow, now that I'm using the GridTemplateColumn, I'm having a problem getting the in-line editing and inserting to work.  When I try to insert an item I get this error: "DataBinding: 'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'Type'."  Editing an existing record works great.

Here is my code:

<telerik:GridTemplateColumn HeaderText="Type" DataField="Type" > 
                            <ItemTemplate> 
                                <%# Eval("Type.Name") %> 
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="PropertyType" runat="server"  Width="250" Height="150" 
                                        DropDownWidth="300" ShowDropDownOnTextboxClick="true" MarkFirstMatch="true" 
                                        ShowToggleImage="false" AppendDataBoundItems="true"  
                                        DataSourceID="PropertyTypes" DataValueField="Id" DataTextField="Name" 
                                        AllowCustomText="false" SelectedValue='<%# Bind("Type.Id") %>'
                                    <Items> 
                                        <telerik:RadComboBoxItem Text="" /> 
                                    </Items> 
                                </telerik:RadComboBox> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 

Your demo "Combo In Grid" under "Application Scenarios" has this functionality except it only has in-line editing and not inserting or I would follow that.

Thanks,

Chris


Sebastian
Telerik team
 answered on 22 Sep 2009
11 answers
162 views
The documentation for RadInputManager shows validation properties intended to allow validation to occur against a web service or page method.  What I cannot find is any specific information about how the signature of the service/method, nor any examples.

What is needed to do this?
Joel
Sebastian
Telerik team
 answered on 22 Sep 2009
3 answers
139 views

I have a radchart with a default type of spline. The issue is that user can't tell the beginning and end of the line. I have tried all the different end caps but because they are the same color they just are not obvious.

I couldn't figure out how to use the custom endCap or StartCap and I am looking for a solution or alternative such as plotting two points.

Ves
Telerik team
 answered on 22 Sep 2009
2 answers
93 views
I'm doing an RadGrid1_UpdateCommand from an edit form template.  While this event is executing I want to be able to access specific cell text from the row just above the edit form.  How can I do this?  Thanks in advance for any help.
Stephen
Top achievements
Rank 1
 answered on 22 Sep 2009
1 answer
137 views
Hi All,
Sorry for repeating the post here again,but found this forum to be more specific for scheduler.

I'm using a RadEditor inside a AdvanceEditTemplate of RadScheduler. When i update the description inside the RadEditor and click on Save, the AppointmentUpdate events fires but does not fetch the updated data. Can anyone help me in what is missing in the code. Posted the code below for reference. Appreciate any immediate help.Thanks in advance.

Aspx Page:

<telerik:RadScheduler ID="rschEvents" runat="server" Height="100%" Skin="Office2007"
Width="100%" FirstDayOfWeek="Sunday" MonthVisibleAppointmentsPerDay="5" OverflowBehavior="Expand"
RowHeight="25px" SelectedView="MonthView" EnableRecurrenceSupport="False" LastDayOfWeek="Saturday"
OnAppointmentInsert="rschEvents_AppointmentInsert" EnableAdvancedForm="True"
StartInsertingInAdvancedForm="True" CustomAttributeNames="Description" EnableCustomAttributeEditing="False"
OnAppointmentDelete="rschEvents_AppointmentDelete" OnAppointmentUpdate="rschEvents_AppointmentUpdate"
OnAppointmentClick="rschEvents_AppointmentClick" OnAppointmentCommand="rschEvents_AppointmentCommand"
OnAppointmentCreated="rschEvents_AppointmentCreated" OnNavigationCommand="rschEvents_NavigationCommand"
Style="top: 3px; left: 0px">
<MonthView VisibleAppointmentsPerDay="5" ColumnHeaderDateFormat="dddd" HeaderDateFormat="MMMM, yyyy" />
<AdvancedEditTemplate>
<div>
<table align="center" border="0" width="95%" cellpadding="5" cellspacing="0">
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblDescription" runat="server" Text="Description" Font-Bold="true">
</asp:Label>
</td>
</tr>
<tr>
<td>
<telerik:RadEditor EditModes="All" Enabled="true" ID="radEditor" runat="server" Html='<%#Eval("Subject")%>'>
</telerik:RadEditor>
</td>
</tr>
<tr>
<td>
<table width="20%" align="left" cellpadding="1" cellspacing="1">
<tr>
<td width="50%">
<asp:Label ID="lblDate" AssociatedControlID="rdtpFrom" runat="server" Text="From Date"
Font-Bold="true"></asp:Label>
</td>
<td align="left">
<telerik:RadDateTimePicker ID="rdtpFrom" runat="server" DateInput-ReadOnly="true"
SelectedDate='<%# Eval("Start") %>' TimeView-Columns="4">
</telerik:RadDateTimePicker>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="20%" align="left" cellpadding="1" cellspacing="1">
<tr>
<td width="50%">
<asp:Label ID="lblDate1" AssociatedControlID="rdtpTo" runat="server" Text="To Date"
Font-Bold="true"></asp:Label>
</td>
<td align="left">
<telerik:RadDateTimePicker ID="rdtpTo" runat="server" DateInput-ReadOnly="true" SelectedDate='<%# Eval("End") %>'
TimeView-Columns="4">
</telerik:RadDateTimePicker>
</td>
</tr>
</table>
</td>
</tr>

<tr>
<td>
<br />
</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="btnCancel" runat="server" CssClass="button_Default" OnClick="btnCancel_Click">Cancel</asp:LinkButton>&nbsp;&nbsp;&nbsp;<asp:LinkButton
ID="btnSave" runat="server" CssClass="button_Default" CommandName="Update">Save</asp:LinkButton>
</td>
</tr>
</table>
</div>
</AdvancedEditTemplate>
</telerik:RadScheduler>

Aspx.cs page:

protected void rschEvents_AppointmentUpdate(object sender, Telerik.Web.UI.AppointmentUpdateEventArgs e)
{

if (e.Appointment.Subject != String.Empty)
{
CalendarEvent ce = CalendarEvent.FindByEventId(e.Appointment.ID.ToString());
ce.Data.EventSubject = e.ModifiedAppointment.Subject.ToString();
ce.Data.StartDate = e.ModifiedAppointment.Start.ToString();
ce.Data.EndDate = e.ModifiedAppointment.End.ToString();
ce.Data.EventTitle = txtEventTitle.Text.ToString();
ce.Update();
LoadCalendarEvents();
}
else
{
e.Cancel = true;
}



Also added a FormCreated  event and checked...i was not able to get the content nor the date field values. Below code for reference.
Can anyone tell me what is the mistake being done?
 protected void rschEvents_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
    {
        RadScheduler scheduler = (RadScheduler)sender;
        if (e.Container.Mode == SchedulerFormMode.Insert ||
        e.Container.Mode == SchedulerFormMode.AdvancedInsert)
        {
            RadEditor editor = (RadEditor)e.Container.FindControl("radEditorInsert");
            //editor.Content = (RadEditor)e.Container.FindControl("radEditorInsert");
        }
        if (e.Container.Mode == SchedulerFormMode.AdvancedInsert)
        {
            //TextBox subjectBox = (TextBox)e.Container.FindControl("SubjectTextBox");
            //subjectBox.Text = e.Appointment.Subject;
            RadDateTimePicker startInput = (RadDateTimePicker)e.Container.FindControl("rdtpFromInsert");
            
            startInput.SelectedDate = this.rschEvents.DisplayToUtc(e.Appointment.Start);
            RadDateTimePicker endInput = (RadDateTimePicker)e.Container.FindControl("rdtpToInsert");
            
            endInput.SelectedDate = this.rschEvents.DisplayToUtc(e.Appointment.End);
        }
    }

Thanks,
Sri 
Helge
Top achievements
Rank 1
 answered on 22 Sep 2009
1 answer
120 views
Hi,
My users upload images in "~/Images/[UserName]" folder, so John uploads in ~/Images/John folder.
For John, editor is set that ViewPaths and UploadPaths are New String() {"~/Images/John"}.
The problem is the fact that John can navigate to parent folder "~/Images" by just clicking on arrow up in ImageManager and see all other user names there. He will not be able to delete files as DeletePaths=New String() {}, but he will know who other users are, which is privacy issue.
How to overcome this?

Regards,
Alex
Stanimir
Telerik team
 answered on 22 Sep 2009
1 answer
50 views
New solution & feature deployment of the latest version of the Radeditor, following deployment and successful feature activation at the site level, all applicable fields are unusable.

Screen capture:
http://cid-4f65d46e0b4cffc6.skydrive.live.com/self.aspx/.Public/gracenote/RadEditorForMOSS%5E_screencapture.gif 


I represent a comapny that has purchased a supported license.

Please advise at your earliest convenience.
Stanimir
Telerik team
 answered on 22 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?