Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
 Hi,

I am using the below syntax to bind source to radschedule. Day View and Month View are binding correctly, but in Timeline view, the data source is binding to first date in the view.

If you look at attached screen shots, In month View, I've a record on June 25, and when I switch to Timeline View, the same record was set on first date of the view which is June 22 instead of June 25. Any idea, where I am doing wrong here?. 

Any help is much appreciated.
 


<tel:RadScheduler runat="server" ID="rsSchedule" DataKeyField="ID" DataSubjectField="WnameSection"
                DataDescriptionField="WnameSection" DataEndField="EndTime" DataStartField="StartTime" Localization-HeaderMultiDay="Work Week"
                Skin="Office2007" OnNavigationComplete="rsSchedule_NavigationComplete" Height="900px" 
                FirstDayOfWeek="Monday" LastDayOfWeek="Saturday" SelectedView="MonthView" DayStartTime="8:00"
                CustomAttributeNames="ID,FCSID,FCS,LoadNumber,MeetingPlace,MeetingTime,CountyCode,CountyName,DistrictCode,TotalTroutToStock,StartTime,EndTime,StockingDate,stocked, ShortDescription,FullDescription,DeadlineDate,scheduletype,StockingYear,StockingRequestID,ExpenseID,WnameSection,f1"
                DayEndTime="17:00" AllowInsert="false" AllowEdit="false" AllowDelete="false"
                OnAppointmentContextMenuItemClicking="rsSchedule_AppointmentContextMenuItemClicking" ColumnWidth="3px"
                OnClientAppointmentContextMenu="appointmentContextMenu" 
                OnClientAppointmentContextMenuItemClicked="appointmentContextMenuClicked" 
                ontimeslotcreated="rsSchedule_TimeSlotCreated">
                <AdvancedForm Modal="true" EnableTimeZonesEditing="true" />
               
                <MonthView VisibleAppointmentsPerDay="5" AdaptiveRowHeight="false" />
                <DayView ShowHoursColumn="true" UserSelectable="true" EnableExactTimeRendering="true"/>
                <TimelineView UserSelectable="true" GroupingDirection="Horizontal" NumberOfSlots="6"/>               
                <WeekView ShowHoursColumn="true" UserSelectable="false" EnableExactTimeRendering="true" />               
                <AppointmentTemplate>
                    <asp:Panel ID="pnlAppointment" runat="server" Height="100%" Direction="LeftToRight"
                        BackColor='<%# PanelColor(Eval("FCSID")) %>'>
                        <div runat="server" id="att1" visible='<%# Appointment(Eval("scheduletype")) %>'>
                            <b dir="ltr" id="imageChangeType" runat="server">
                             <asp:Label ID="lblStatus" runat="server" BackColor='<%# StatusColor(Eval("stocked")) %>'
                            Height="10px" Width="20px"></asp:Label>
                             </b>
                            <br />
                            <b>
                             <asp:Label ID="Label8" runat="server" Text='<%#  Eval("FCS") %>' Font-Bold="true"></asp:Label>
                            </b>
                             <br />
                            <b style="font-weight: bold">Load #: </b>
                            <asp:Label ID="lblLoad" runat="server" Text='<%# Eval("LoadNumber") %>'></asp:Label>
                            <br />
                            <b style="font-weight: bold">Cnty:</b>
                            <asp:Label ID="lblcounty" runat="server" Text='<%# Eval("CountyCode")  %>'></asp:Label>
                            <br />
                            <b style="font-weight: bold">WCO:</b>
                            <asp:Label ID="lbldistricts" runat="server" Text='<%# Eval("DistrictCode") %>'></asp:Label>
                              <asp:Label ID="Label1" runat="server" Text='<%# String.Format("{0:t}" ,Convert.ToDateTime(Eval("StartTime")))  %>'></asp:Label>                       
                            <br />
                            <b style="font-weight: bold"># Fish:</b>
                            <asp:Label ID="lblTotoalFish" runat="server" Text='<%# String.Format("{0:N0}", Convert.ToInt32(Eval("f1")))%>'></asp:Label>                                                   
                        </div>
                        <div runat="server" id="divDeadlines" visible='<%# Deadline(Eval("scheduletype")) %>'>
                            <b>Deadline</b> <b>
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("ShortDescription") + "-" + "Stocking Year:" + Eval("StockingYear")  %>'></asp:Label>
                            </b>
                            <br />
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("FullDescription") %>'></asp:Label>
                        </div>
                    </asp:Panel>
                </AppointmentTemplate>
                <AppointmentContextMenus>
                    <tel:RadSchedulerContextMenu ID="radschContextMenu" runat="server">
                        <Items>
                            <tel:RadMenuItem Text="e1" />
                            <tel:RadMenuItem Text="Post Stocking" />
                            <tel:RadMenuItem Text="Add Post Stocking" />
                        </Items>
                    </tel:RadSchedulerContextMenu>
                </AppointmentContextMenus>
            </tel:RadScheduler>
Plamen
Telerik team
 answered on 13 Aug 2013
5 answers
166 views
Hi,

Is there any way I can use a template field or something similar so that I can have a custom formatted entry above the group.  I can do this by adding a single entry into the select fields of the group by GroupByExpression object.. and then changing the format string to include a table with the format I need..

The problem with this is that I only have access to one field ({0}) which is the one referenced in the FieldName of the object.. but I need access to other fields returned by the data source.

Any suggestions?

Thanks

Mike
Maria Ilieva
Telerik team
 answered on 13 Aug 2013
1 answer
96 views
Hello everyone and thanks for the responses already (:


My problems are the following:
I have a RadGrid that contains child grid, and is working perfectly, however, at the export to ExcelML I need to add a header, I use for this purpose the ExcelMLExportRowCreated checking only if it is a HeaderRow, however, and since I also have child grids, so there are multiple HeaderRows adding the header multiple times. Is there any way to check if it's masterTable or not?

In addition to this I also have a problem in formatting the child grids to pdf. To apply the style that is currently on the grid used I set  UseItemStyles = true however only works properly in the master. Is there any way to use the style applied in child grids also in the export?

Thank you

Kostadin
Telerik team
 answered on 13 Aug 2013
5 answers
564 views
hi,
i want to add a new row to the grid at the client side using a javascript code and not losing the data i inserted when i postback to the server. here is a code snippet,
ASPX
<dnn:DNNGrid
id="grdDestinations" AutoGenerateColumns="false" CssClass="dnnGrid dnnSecurityRolesGrid" 
Runat="server" AllowPaging="True"  EnableViewState="False" PageSize="10">
<MasterTableView CommandItemDisplay="Top" DataKeyNames="ComRuleItemID">
<CommandItemTemplate>
                        <table><tr><td width="30%">
                                    <asp:HyperLink ID="cmdAddDestination" runat="server" CausesValidation="False" />
                                    when clicking on this hyperlink my custom javascript method AddNewDestination() will be called
</td></tr></table>
</CommandItemTemplate>
                <Columns>
                    <dnn:DnnGridTemplateColumn UniqueName="ComRuleActions"  >
                        <ItemTemplate>
                            <dnn:DnnImageButton runat="server" ID="Delete" CommandName="Delete" IconKey="Delete" />
                            <asp:HiddenField ID="DestinationGroupID" runat="server" />
                        </ItemTemplate>
                    </dnn:DnnGridTemplateColumn>
                    <dnn:DnnGridBoundColumn datafield="DestinationName" headertext="Destination" HeaderStyle-Width="95%"/>
                </Columns>
</MasterTableView>
<PagerStyle Mode="NumericPages" Position="Bottom"></PagerStyle>   
<ClientSettings EnablePostBackOnRowClick="true">
</ClientSettings>           
</dnn:DNNGrid> 
JavaScript
function  AddNewDestination() {
var newDestinationValue = 'This value i will get by my self from somewher';
            var masterTable = $find("<%= grdDestinations.ClientID %>").get_masterTableView();
            masterTable.insertItem(newDestinationValue);
    }
C#
protected void grdDestinations_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "PerformInsert")
            {
                //Do here my server side insertion process in grid
            }
        }
My Problem is:
1) in order to make the event grdDestinations_ItemCommand fired by calling the javascript method masterTable.insertItem(newDestinationValue) i had to set the grdDestinations.MasterTableView.IsItemInserted = true;
and this property when sitting with true, an unwanted insertion form appeared above the grid, so how i can remove this form and keeps the event firing....?
2)how can i get the data i inserted by calling the javascript masterTable.insertItem(newDestinationValue) ,in the server side is the data is passed to the server so i will be able to handle it in server side....???
3)i know that there is something wrong , if iam using the feature in a wrong way feel free to tell the right way even if i have to delete all my work.
4) thank you very much in advance.....:)))



Andrey
Telerik team
 answered on 13 Aug 2013
1 answer
240 views
I have a radlistbox, and I want to let the user select multiple items and right click and then copy, and let the user use that copied item into for example Microsoft Word, Notepad, etc ... How can I accomplish this??
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2013
11 answers
286 views
We have a RadGrid with a lot of columns, when we navigate with the keyboard the cursor disappear and the scrolls not moving.
Is there any way to scrolls follows de selected cell?

Thanks!
Lina
Top achievements
Rank 1
 answered on 13 Aug 2013
4 answers
245 views
My editor has an empty space at the bottom (see attached screenshot).  As far as I can tell, this only appears when autoheight is true.  I have tried clearing out the modules and changing css, all with no luck.  When I look at the editor's source in firefox using firebug I noticed that there is a newline which is causing the bottom space to exist (it is between the Wrapper table and the InsertLink div):

<div id="ctl00_cphMain_fv_reSupervisorNotes" class="RadEditor Default reWrapper" style="height: auto; width: 100%; min-height: 100px; min-width: 856px;">
<div id="ctl00_cphMain_fv_reSupervisorNotes_dialogOpener" style="display:none;">
<div class="reRibbonBarWrapper"></div>
<table id="ctl00_cphMain_fv_reSupervisorNotesWrapper" cellspacing="0" cellpadding="0" style="table-layout:auto;width:100%;height:100px;">

<div id="ctl00_cphMain_fv_reSupervisorNotes_InsertLink" class="reInsertLinkWrapper" style="display: none;">
<table class="reControlsLayout" cellspacing="0" cellpadding="0" border="0">
</div>
<input id="ctl00_cphMain_fv_reSupervisorNotes_ClientState" type="hidden" name="ctl00_cphMain_fv_reSupervisorNotes_ClientState" autocomplete="off">
</div>


Here is my editor declaration:

<telerik:RadEditor
    ID="reSupervisorNotes" runat="server"
    EditModes="Design" ContentAreaMode="Div" NewLineMode="P"
    ToolsFile="~/App_Data/RadEditor/Tools.xml" ToolbarMode="ShowOnFocus"
    AutoResizeHeight="true" Height="100px" Width="100%"
    Content="<%# Bind('SupervisorNotes') %>"
    OnClientLoad="RadEditorOnClientLoad">
    <Languages>
        <telerik:SpellCheckerLanguage Code="en-GB" Title="English UK" />
    </Languages>
</telerik:RadEditor>

And here is my tools file:

<?xml version="1.0" encoding="utf-8" ?>
<root>
    <modules>
        <module name="RadEditorHtmlInspector" enabled="false" visible="false" dockingzone="bottom" />
        <module name="RadEditorNodeInspector" enabled="false" visible="false" dockingzone="bottom" />
        <module name="RadEditorDomInspector" enabled="false" visible="false" dockingzone="bottom" />
        <module name="RadEditorStatistics" enabled="false" visible="false" dockingzone="bottom" />
    </modules>
    <tools>
        <tool name="Bold" shortcut="CTRL+B"/>
        <tool name="Italic" shortcut="CTRL+I"/>
        <tool name="Underline" shortcut="CTRL+U"/>
        <tool separator="true"/>
        <tool name="ForeColor"/>
        <tool name="BackColor"/>
        <tool separator="true"/>
        <tool name="JustifyLeft"/>
        <tool name="JustifyCenter"/>
        <tool name="JustifyRight"/>
        <tool separator="true"/>
        <tool name="Indent"/>
        <tool name="Outdent"/>
        <tool separator="true"/>
        <tool name="InsertOrderedList"/>
        <tool name="InsertUnorderedList"/>
        <tool separator="true"/>
        <tool name="InsertLink" shortcut="CTRL+K"/>
        <tool name="InsertSymbol"/>
    </tools>
    <tools name="DropdownToolbar">
        <tool name="FontName"/>
        <tool name="RealFontSize" text="Size"/>
    </tools>
    <tools enabled="true">
        <tool name="Undo" shortcut="CTRL+Z"/>
        <tool name="Redo" shortcut="CTRL+Y"/>
        <tool separator="true"/>
        <tool name="Cut" shortcut="CTRL+X"/>
        <tool name="Copy" shortcut="CTRL+C"/>
        <tool name="Paste" shortcut="CTRL+V"/>
        <tool separator="true"/>
        <tool name="Print" shortcut="CTRL+P"/>
        <tool name="FindAndReplace" shortcut="CTRL+F"/>
        <tool name="SelectAll" shortcut="CTRL+A"/>
        <tool separator="true"/>
        <tool name="AjaxSpellCheck" shortcut="F7"/>
        <tool name="ToggleScreenMode" shortcut="F11"/>
    </tools>
 
</root>
Ianko
Telerik team
 answered on 13 Aug 2013
1 answer
229 views

Hello,

I want to check Remove of RadAsyncUpload is clicked or not to set textbox(ruFakeInput) width according to that condition.

My script is

$telerik.$(document).ready(function() {
               setTimeout(function() {
                   var btnRemove = document.getElementById("<%= btnRomovePhoto.ClientID %>");
                   if (btnRemove) {
                       $('input.ruFakeInput').css("width", "120px");
 
                   }
                   else {
                       $('input.ruFakeInput').css("width", "191px");
 
                   }                   
 
                  //here i check .ruRemove is clicked or not and set 'ruFakeInput' width
 
               }, 200);
           });

i try this way

$telerik.$("button [name=RowRemove]").click(function() {
 
            alert('click');
 
            });

and

$telerik.$(".RadUpload .ruRemove").click(function() {
 
alert('click');//here set $('input.ruFakeInput').css("width""120px");
 
});


but its not working. Any solution?
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2013
3 answers
125 views
Hi

How can I display an ajax loading icon until the navigateurl is completely loaded in the radwindow?

Thanks
Saravanan
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2013
4 answers
242 views
Hi

How can I add a background icon to certain days of the radcalendar? The database contain few dates and on clicking a button I want to add those days to the radcalendar and assign an image and a custom tooltip.

Please help
Dan
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?