Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
167 views
Hello, I'm trying to add, dynamically, a radbutton to the GroupFooterItem and this button needs to have some values in the commandname and commandargument. These values are related to the cells from a group in the grid. So far I have been able to add those buttons with the OnPreRender event, but I'm stuck on how to set those values with a specific cell in the group.

I have thought about querying db again and use foreach to assign the appropiate values, but I think this scenario is error prone, so leaving it as a last resource.

any pointers???
Luis
Top achievements
Rank 1
 answered on 16 Apr 2012
5 answers
257 views
I want to display some data from a resource datasource but i get the error:
process is not a valid item of an appointment

here is my definition of radscheduler:

            <telerik:RadScheduler ID="RadScheduler1" runat="server" AllowDelete="True" AllowEdit="False" 
                AllowInsert="True" DataEndField="End" DataKeyField="ID" DataSourceID="dsSchedules" 
                DataStartField="Start" DataSubjectField="Subject" FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday" 
                OverflowBehavior="Expand" SelectedView="WeekView" Culture="Dutch (Netherlands)" 
                DataRecurrenceField="strRecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" 
                MinutesPerRow="15" Skin="Web20" StartInsertingInAdvancedForm="True" EnableCustomAttributeEditing="True" 
                OnAppointmentCreated="RadScheduler1_AppointmentCreated" WeekColumnHeaderDateFormat="dddd, d" 
                WeekHeaderDateFormat="D" WorkDayEndTime="21:00:00"   
                WorkDayStartTime="07:30:00" ondatabound="RadScheduler1_DataBound"   
                CustomAttributeNames="Enabled,Remarks">  
                <ResourceTypes> 
                    <telerik:ResourceType DataSourceID="dsWorkFlows" KeyField="Key"   
                        Name="process" TextField="Value"  ForeignKeyField="workflowTypeID"/>  
                </ResourceTypes> 
                 
                <AppointmentTemplate> 
                    <table style="width: 100%;">  
                        <tr> 
                            <td class="ScheduledTaskHeader" style="width: 16px;">  
                                <img runat="server" id="icon" alt="Icon" src='<%# GetImage(Eval("Start").ToString()) %>' style="float: left;" /> 
                            </td> 
                            <td class="ScheduledTaskHeader">  
                                <%# Eval("Subject") %> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td class="ScheduledTaskBody" style="width: 16px;">  
                                <img alt="Icon" src="./Images/icons/process.png" style="float: left;" /> 
                            </td> 
                            <td class="ScheduledTaskBody">  
                                <%# FormatText(Eval("process.Value").ToString())%> 
                            </td> 
                        </tr> 
                    </table> 
                </AppointmentTemplate> 
            </telerik:RadScheduler> 
The line where the problem is at: <%# FormatText(Eval("process.Value").ToString())%> <-- DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'process'.

and here the code for my datasources:

<asp:ObjectDataSource ID="dsSchedulesNames" runat="server" DeleteMethod="DeleteGroupScheduledTasks" 
    SelectMethod="ScheduleNames" TypeName="Otto.Process.AdminWeb.ScheduleList">  
    <DeleteParameters> 
        <asp:Parameter Name="Name" Type="String" /> 
    </DeleteParameters> 
</asp:ObjectDataSource> 
<asp:ObjectDataSource ID="dsSchedules" runat="server" DeleteMethod="DeleteSingleScheduledTask" 
    InsertMethod="InsertAppointment" SelectMethod="AllData" TypeName="Otto.Process.AdminWeb.ScheduleList" 
    UpdateMethod="UpdateAppointment">  
    <DeleteParameters> 
        <asp:Parameter Name="ID" Type="String" /> 
    </DeleteParameters> 
    <UpdateParameters> 
        <asp:Parameter Name="ID" Type="String" /> 
        <asp:Parameter Name="Subject" Type="String" /> 
        <asp:Parameter Name="Start" Type="DateTime" /> 
        <asp:Parameter Name="End" Type="DateTime" /> 
        <asp:Parameter Name="RecurrenceRule" Type="String" /> 
        <asp:Parameter Name="RecurrenceParentID" Type="Object" /> 
        <asp:Parameter Name="RecurrenceState" Type="Object" /> 
        <asp:Parameter Name="workflowTypeID" Type="Int32" /> 
    </UpdateParameters> 
    <InsertParameters> 
        <asp:Parameter Name="Subject" Type="String" /> 
        <asp:Parameter Name="Start" Type="DateTime" /> 
        <asp:Parameter Name="End" Type="DateTime" /> 
        <asp:Parameter Name="strRecurrenceRule" Type="String" /> 
        <asp:Parameter Name="RecurrenceParentID" Type="Object" /> 
        <asp:Parameter Name="RecurrenceState" Type="Object" /> 
        <asp:Parameter Name="workflowTypeID" Type="Int32" /> 
        <asp:Parameter Name="Enabled" Type="Boolean" /> 
        <asp:Parameter Name="Remarks" Type="String" /> 
    </InsertParameters> 
</asp:ObjectDataSource> 
<asp:ObjectDataSource ID="dsWorkFlows" runat="server"   
    SelectMethod="WorkFLowList"   
    TypeName="Otto.Process.AdminWeb.WorkFlows">  
</asp:ObjectDataSource> 


Someone got some tips on how to solve this?

Cheers WIm
Brenda Rueb
Top achievements
Rank 1
 answered on 16 Apr 2012
1 answer
229 views
Hi all.

I am binding my RadGrid to an EntityDataSource. When the user clicks a row I want to retrieve the current data item and get the values from it. Could someone point me in the right direction. I am assuming that as the table is data bound, when selecting a row the data can be made available in Javascript? Thus the entity has 5 columns, 2 of these are shown as columns in the grid.

Thanks
P
Richard
Top achievements
Rank 1
 answered on 16 Apr 2012
4 answers
523 views

Hi,

I am trying to get the total count of my RadGrid.

When I use GridResult.MasterTableView.Items.Count I get only the count on the actual page.

I've seen a post that disable the Paging, count the total, reactivate the paging and rebind. http://www.telerik.com/community/forums/aspnet-ajax/grid/total-record-count-after-filter.aspx

Is there any property that could return the total count ?

Thanks to everyone.
Pierre
Top achievements
Rank 1
 answered on 16 Apr 2012
2 answers
145 views
I was wondering if someone could give advice on how to best share development of a 'VB RadControls Web Site'.  That is the option I selected when I selected a new project in VS2010, within the Telerik template group (see attachment).  I want to share development between two people both running VS2010, publishing to the same IIS7 web server.  We have two sites on that server, a test site on port 8001 and a live site will eventually run https on different port.

I tried with a 'VB RadControls Web Application' project and had a good start on the site when I used F5 to run it locally.  Then I was ready to publish to the server and found the only option I had from the Build menu was to create a Web Deploy zip file, but for some reason it always crashes right away at building the file.  Not trying to solve that - tried a little and gave up on that.  Instead I switched to the 'VB RadControls Web Site'.  From this type of project, the Build menu's Publish Web Site allows me to key in the IIS 7 server and port and publishes to it successfully.

But if I, in VS2010, try to open the 'Remote Web Site' instead of the project, it tells me it was precompiled and I shouldn't make changes there.  I was expecting that's how both developers would connect and work on the site.  How can I get the project to the other developer and then keep them in sync as the site is updated?

We use to both only open the 'remote web site' which was the test site, and make changes there, and then do a publish to the live site.  Now it seems like I have do changes in a local project file structure, publish that to the test site, and separately publish to the live site, except I don't see how in that scenario to keep both developers of VS2010 in sync with the test site.

What's the best way to have two developers sharing work on a test site that is published to a live site after test site changes look good?
Terry
Top achievements
Rank 1
 answered on 16 Apr 2012
1 answer
108 views
Hi,
     I want to create menu using Web user control and for that i want to use Rad menu. I want to implement that Usercontrol in my Master page so it could get same look n feel to all pages. So could u please send me any example so that i can understand how to use rad menu in user control.
Peter
Telerik team
 answered on 16 Apr 2012
7 answers
194 views

I know this topic has come up in a variety of ways, but is there a setting, or a hack to set the height of an appointment to "auto" where it will be big enough to display content specified for an appointment.

I know there is a RowHeight property that can be adjusted to show this, but that's still somewhat sloppy because there is no way of knowing the "biggest" appointment. When using an appointment template below, appointments with a short subject, will become quite large. And there may be a case where an appointment is created with a title that is longer than what is accounted for using the RowHeight property.

        <AppointmentTemplate> 
                <asp:HyperLink ID="hlSubject" runat="server" /><br /> 
                <div><%#CDate(Eval("Start")).ToShortTimeString()%></div>  
        </AppointmentTemplate> 

The rendering of the control with that template is attached.
Peter
Telerik team
 answered on 16 Apr 2012
3 answers
146 views
Hi,

I am having issues with the radscheduler advanced insert form in my radscheduler. What is happening is whenever I double click an empty timeslot to bring up the insert template, whenever I press the enter key in any of the textboxes of the form, I get a javascript error. It seems like the keypress on enter is causing some sort of event to fire and then I get the unhandled exception.


Here is where I am getting the unhandled exception dynamically created by visual studio
/* START Telerik.Web.UI.Common.jQuery.js */
/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */

g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c

My Radscheduler control:
 <telerik:RadScheduler runat="server" ID="RadScheduler1"
                    AdvancedForm-EnableCustomAttributeEditing="true"
                    CustomAttributeNames="TimeStart, TimeOut"
                    Height="1200px" Width="100%"
                    ShowFooter="False"
                    SelectedDate="2009-02-02" TimeZoneOffset="03:00:00" DayEndTime="20:00:00"                        
                    FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
                    AppointmentStyleMode="Default"
                    OnNavigationComplete="RadScheduler1_NavigationComplete"
                    OnAppointmentCreated="RadScheduler1_AppointmentCreated"
                    OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
                    OnAppointmentDelete="RadScheduler1_AppointmentDelete"
                    OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                    OnAppointmentInsert="RadScheduler1_AppointmentInsert"
                    DataDescriptionField="Description" DataEndField="End" DataKeyField="ID"
                    DataRecurrenceField="RecurrenceRule"
                    DataRecurrenceParentKeyField="RecurrenceParentID" DataReminderField="Reminder"
                    DataSourceID="SqlDataSource" DataStartField="Start"
                    DataSubjectField="Subject" DayStartTime="06:00:00"
                    WorkDayEndTime="19:00:00" WorkDayStartTime="06:00:00"
                    onformcreated="RadScheduler1_FormCreated"
                    onformcreating="RadScheduler1_FormCreating"
                    StartInsertingInAdvancedForm="True" AllowDelete="False"
                    SelectedView="WeekView" WeekView-GroupingDirection="Horizontal"
                    ColumnWidth="200px"
                    ShowAllDayRow="true" MinutesPerRow="30" GroupingDirection="Vertical">
                    <AdvancedForm Modal="true" />
                    <TimelineView UserSelectable="false" />
                    <ResourceTypes>
                        <telerik:ResourceType AllowMultipleValues="false" DataSourceID="SqlDataSource1"
                            ForeignKeyField="UserID" KeyField="UserID" Name="Users" TextField="UserName" />
                                          
                    </ResourceTypes>
                    <ResourceStyles>
                        <%--AppointmentStyleMode must be explicitly set to Default (see above) otherwise setting BackColor/BorderColor
                        will switch the appointments to Simple rendering (no rounded corners and gradients)--%>
                        
                        <telerik:ResourceStyleMapping Type="Users" Text="ebarcza" ApplyCssClass="rsCategoryRed" />
                        <telerik:ResourceStyleMapping Type="Users" Text="Sean.Kelly" ApplyCssClass="rsCategoryPink" />
                        <telerik:ResourceStyleMapping Type="Users" Text="RandyPurser" ApplyCssClass="rsCategoryOrange" />
                        <telerik:ResourceStyleMapping Type="Users" Text="jSturm" ApplyCssClass="rsCategoryYellow" />
                        <telerik:ResourceStyleMapping Type="Users" Text="tMichel" ApplyCssClass="rsCategoryBlue" />
                        <telerik:ResourceStyleMapping Type="Users" Text="jDuff" ApplyCssClass="rsCategoryGreen" />
                        <telerik:ResourceStyleMapping Type="Users" Text="JennSturm" ApplyCssClass="rsCategoryViolet" />
                        <telerik:ResourceStyleMapping Type="Users" Text="Tentative" BackColor="red"  />
                        <telerik:ResourceStyleMapping Type="Calendar" Text="Work" BackColor="#edd5b7" BorderColor="#cdb597" />
                    </ResourceStyles>
                    <Reminders Enabled="True" />
                    <AppointmentTemplate>
                        <div class="rsAptSubject" style="font-size:9px; height:50px;">
                            <%# Eval("Subject") %>
                        </div>
                    </AppointmentTemplate>

                    <TimeSlotContextMenuSettings EnableDefault="true" />
                                <DayView DayStartTime="06:00:00" WorkDayStartTime="06:00:00"
                        DayEndTime="20:00:00" WorkDayEndTime="20:00:00" />
                    <MonthView AdaptiveRowHeight="True" VisibleAppointmentsPerDay="10" />
                    <AppointmentContextMenuSettings EnableDefault="true" />
                  
                </telerik:RadScheduler>

I have been unable to narrow down the cause of this error. Any thoughts??

Thanks,

Brendan
Plamen
Telerik team
 answered on 16 Apr 2012
1 answer
202 views
Hi!

We validate controls on form submit. We are trying to set a tooltip when a required field is missing--it shows up when the user hovers over the control. This works great on an input box but we can't seem to get the date picker to work (see attached.) Below is the relevant code. Any idea how to add a tooltip to the date picker?

Thanks!
<telerik:RadDatePicker ID="radDatePicker" MinDate="1/1/1000" runat="server" Skin="Windows7"
        AutoPostBack="false" EnableViewState="true">
        <Calendar ID="calendarForDatePicker" runat="server" UseRowHeadersAsSelectors="False"
            UseColumnHeadersAsSelectors="False" ViewSelectorText="x" AutoPostBack="false"
            EnableViewState="true">
        </Calendar>
        <DateInput ID="dateInputForDatePicker" runat="server" DisplayDateFormat="M/d/yyyy"
            DateFormat="M/d/yyyy" AutoPostBack="false" CssClass="datePickerBox" EnableViewState="true">
        </DateInput>
        <DatePopupButton ImageUrl="" HoverImageUrl="" EnableViewState="true"></DatePopupButton>
    </telerik:RadDatePicker>
 
 
function isDateInputFieldInError(control, message) {
            var errorState = true;
            var controlRef = $find(control);
            var dateInput = controlRef.get_dateInput();
            if (trimInput(dateInput.get_value()) == "") {
                dateInput._invalid = true;
                addToolTipToControl(document.getElementById(control), message);
                dateInput.get_styles().InvalidStyle[0] += "border: 1px solid #D18185 !important;";
            }
            else {
                dateInput._invalid = false;
                errorState = false;
            }
            dateInput.updateCssClass();
            return errorState;
        }
 
        function isInputFieldInError(control, message) {
            var errorState = true;
            var controlRef = $find(control);
            if (trimInput(controlRef.get_value()) == "") {
                controlRef._invalid = true;
                addToolTipToControl(document.getElementById(control), message);
            }
            else {
                controlRef._invalid = false;
                errorState = false;
            }
            controlRef.updateCssClass();
            return errorState;
        }

Michael O'Flaherty
Top achievements
Rank 2
 answered on 16 Apr 2012
1 answer
125 views
Hi,

We are switching from a Telerik Treeview to a TreeList in our application.

In the treeview, we also did on-demand loading, there we could catch the OnNodeDataBound event, and if we see that there are no child items for that node, we could hide the expand button. So the user would only see the "+" in front of the nodes that actually have children (even though the children are not sent to the client yet).

I attempted to do the same with the TreeList in the "ItemDataBound" event, but then I got the error that I cannot set the value of the item.CanExpand property. The best I could find is the "HideExpandCollapseButtonIfNoChildren" property, but then the user will still see the "+" in front of all items, and have to click it first to find out that there are no child items, which is not very user friendly.

Is this possible with the treelist? If yes, how?

Kind regards,
Kristof
Richard
Top achievements
Rank 1
 answered on 16 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?