Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
890 views
Hello everyone,

I am new to the Telerik controls so this might seem like a very simple question but I've spent the last couple of hours trying to figure this out with no success.

Basically, I created a Scheduler which I'm populating server side with events retrieved from my database. After implementing the server side event handler for the time slot context menu item clicked, I am trying to retrieve the Start date and End date for a selected time slot server side. The issue is that though client side I manage to select multiple empty time slots, then I use the context menu to add a new event and postback server side and handle the event as per the below. 
Protected Sub radEventSchedule_TimeSlotContextMenuItemClicked(ByVal sender As Object, ByVal e As Telerik.Web.UI.TimeSlotContextMenuItemClickedEventArgs) Handles radEventSchedule.TimeSlotContextMenuItemClicked
        If e.MenuItem.Value = "NewEvent" Then
            Session("EventStartDate") = e.TimeSlot.Start
            Session("EventEndDate") = e.TimeSlot.End
        End If
    End Sub
My issue is that the startdate (e.TimeSlot.Start) and enddate (e.TimeSlot.End) is only being populated with the start time and end time of the timeslot I've right clicked. Therefore if for example I select from 01:00 - 09:00, these properties are only populated with a range of 30 minutes which is exactly the range of each single timeslot.

My intention is to retrieve the start time and end time of all the selected slots rather than the time slot I've right clicked only.

Thank you for your time.

Ludwig
Boyan Dimitrov
Telerik team
 answered on 13 Jun 2013
3 answers
671 views
Hi Telerik,

I have an issue in my RadGrid, I only want GridDateTimeColumn filter data by month and year.
Example: 1/2012 > Filtering all data in 1/2012

Please tell me how to do that
Thanks
Andrey
Telerik team
 answered on 13 Jun 2013
1 answer
89 views
Hallo,

I'm trying to add a requiredfield-validator to my radgrid as described in http://www.telerik.com/help/aspnet-ajax/grid-validation.html .
Somehow the ColumnValidationSettings are not available in my Version. I'm using Telerik.dll's v 2012.3.1016.35. What Version is needed to be able to set this property declaratively?

thanks!
Shinu
Top achievements
Rank 2
 answered on 13 Jun 2013
10 answers
335 views
I have a tabstrip on my page with several tabs and each tab has a usercontrol.
On one of my tabs based on a certain condition, I want to disable the other tabs.

Can you help me achieve this. I am unable to get a reference to the tabstrip from within the user control. I am using the latest build of ASP.NET AJAX controls.

Please help.
Kate
Telerik team
 answered on 13 Jun 2013
1 answer
132 views
Hi,

I have two radgridviews, and one radcombobox for the ajax operations. Flow is that user enters information in grid1, on submitting the data, radcombobox gets populated with the details entered in grid1. On change of this dropdown, grid 2 gets reflected.

My problem is that when i click on Save button, and server side validation fails, user is brought back to the page. at that time i am unable to select item from the radcombobox, it does not open up to show options. Also when i perform any operation on the grids, Ajax loading icon does not appear. Following is the code.

UserControl1.ascx
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7"
    MinDisplayTime="30" />
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgXAxisDetails">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgXAxisDetails" />
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="radCmbXAxisColumn">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radCmbXAxisColumn" />
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<div>
    <table cellspacing="0" cellpadding="2" border="0" width="100%">
        <tr>
            <td colspan="2" style="font-weight: normal">
                <asp:Label ID="lblGenericChart" runat="server" Font-Bold="True" Text="Generic Chart Plot"></asp:Label>
                <asp:Label ID="lblError" runat="server" Text="" ForeColor="red"></asp:Label>
            </td>
        </tr>
    </table>
    <table cellspacing="2" cellpadding="2" border="0" width="100%">
        <tr>
            <td colspan="2">
                <asp:Label ID="lblErrorXAxis" runat="server" Text="" ForeColor="red"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="2">
              
                <telerik:RadGrid ID="rgXAxisDetails" Skin="Windows7" GridLines="Both" runat="server"
                    AutoGenerateColumns="False" SelectedItemStyle-BackColor="blue" OnUpdateCommand="rgXAxisDetails_UpdateCommand"
                    OnItemCommand="rgXAxisDetails_ItemCommand" OnEditCommand="rgXAxisDetails_EditCommand"
                    OnItemDataBound="rgXAxisDetails_ItemDataBound" OnNeedDataSource="rgXAxisDetails_NeedDataSource"
                    OnInsertCommand="rgXAxisDetails_InsertCommand" OnItemCreated="rgXAxisDetails_ItemCreated"
                    OnDeleteCommand="rgXAxisDetails_DeleteCommand" AllowMultiRowEdit="false">
                    <MasterTableView InsertItemDisplay="Bottom" HorizontalAlign="NotSet" EditMode="InPlace"
                        TableLayout="Fixed" CommandItemDisplay="Bottom">
                        <Columns>
                            <telerik:GridTemplateColumn UniqueName="tcColumnName" HeaderText="Column Name">
                                <ItemTemplate>
                                    <asp:Label ID="lblColumnName" runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="radCmbColumnName" runat="server">
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvColName" runat="server" ErrorMessage="*" ControlToValidate="radCmbColumnName"
                                        InitialValue="--Select--" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:CustomValidator ID="cvColumnName" runat="server" ErrorMessage="*Duplicate column"
                                        ControlToValidate="radCmbColumnName" OnServerValidate="cvColumnName_ServerValidate"
                                        Display="Dynamic">
                                    </asp:CustomValidator>
                                    <asp:CustomValidator ID="cvColNameInYaxis" runat="server" ErrorMessage="*Column exists in Yaxis data"
                                        ControlToValidate="radCmbColumnName" OnServerValidate="cvColNameInYaxis_ServerValidate"
                                        Display="Dynamic">
                                    </asp:CustomValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="tcAxis" HeaderText="Axis">
                                <ItemTemplate>
                                    <asp:Label ID="lblAxis" runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="radCmbAxis" runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChangedEventHandler">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="--Select--" Value="--Select--" />
                                            <telerik:RadComboBoxItem Text="Primary Top" Value="Primary Top" />
                                            <telerik:RadComboBoxItem Text="Primary Bottom" Value="Primary Bottom" />
                                            <telerik:RadComboBoxItem Text="Secondary Top" Value="Secondary Top" />
                                            <telerik:RadComboBoxItem Text="Secondary Bottom" Value="Secondary Bottom" />
                                        </Items>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvAxis" runat="server" ErrorMessage="*" ControlToValidate="radCmbAxis"
                                        InitialValue="--Select--"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="tcIsSameAxis" HeaderText="Is Same Axis">
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbIsSameAxisDisplay" runat="server" Enabled="false" />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:CheckBox ID="cbIsSameAxis" runat="server" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn">
                                <ItemStyle CssClass="MyImageButton" Width="3%" />
                                <HeaderStyle Width="3%" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridButtonColumn ConfirmText="Delete this entry?" ConfirmDialogType="RadWindow"
                                ConfirmTitle="Attention" ConfirmDialogHeight="100" ConfirmDialogWidth="250" ButtonType="ImageButton"
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                <ItemStyle CssClass="MyImageButton" Width="3%" />
                                <HeaderStyle Width="3%" />
                            </telerik:GridButtonColumn>
                        </Columns>
                        <CommandItemTemplate>
                            <table class="rgXAxisCommandTable">
                                <tr>
                                    <td align="left">
                                        <asp:Button ID="AddNewRecordButton" CommandName="InitInsert" runat="server" CssClass="rgAdd" />
                                        <asp:LinkButton ID="lnkAddNewRow" runat="server" CommandName="InitInsert" Text="Add new record"></asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <PagerStyle AlwaysVisible="True" />
                        <HeaderStyle Font-Bold="True" BackColor="#BDBDBD" ForeColor="Black" />
                    </MasterTableView>
                    <SelectedItemStyle BackColor="Blue" />
                </telerik:RadGrid>
            </td>
        </tr>
        <tr>
            <%-- <td>
        </td>--%>
            <td colspan="2">
                <telerik:RadComboBox ID="radCmbXAxisColumn" runat="server" OnSelectedIndexChanged="radCmbXAxisColumn_SelectedIndexChanged"
                    AutoPostBack="True">
                </telerik:RadComboBox> 
                <asp:HiddenField ID="hdnXAxisColName" runat="server" />
                <asp:HiddenField ID="hdnIsXAxisInEdit" runat="server" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Label ID="lblErrorYAxis" runat="server" ForeColor="red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <telerik:RadGrid ID="rgYAxisDetails" runat="server" AutoGenerateColumns="False" Skin="Windows7"
                    GridLines="Both" SelectedItemStyle-BackColor="blue" OnItemDataBound="rgYAxisDetails_ItemDataBound"
                    OnNeedDataSource="rgYAxisDetails_NeedDataSource" OnDeleteCommand="rgYAxisDetails_DeleteCommand"
                    OnInsertCommand="rgYAxisDetails_InsertCommand" OnItemCommand="rgYAxisDetails_ItemCommand"
                    OnUpdateCommand="rgYAxisDetails_UpdateCommand" AllowMultiRowEdit="false">
                    <MasterTableView InsertItemDisplay="Bottom" HorizontalAlign="NotSet" EditMode="InPlace"
                        TableLayout="Fixed" CommandItemDisplay="Bottom">
                        <%--            <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>--%>
                        <Columns>
                            <telerik:GridTemplateColumn UniqueName="tcColumnName" HeaderText="Column Name">
                                <ItemTemplate>
                                    <asp:Label ID="lblColumnName" runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="radCmbColumnName" runat="server">
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvYColName" runat="server" ErrorMessage="*" ControlToValidate="radCmbColumnName"
                                        InitialValue="--Select--" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:CustomValidator ID="cvYColumnName" runat="server" ErrorMessage="*Duplicate column"
                                        ControlToValidate="radCmbColumnName" OnServerValidate="cvYColumnName_ServerValidate"
                                        Display="Dynamic">
                                    </asp:CustomValidator>
                                    <asp:CustomValidator ID="cvYColNameInXAxis" runat="server" ErrorMessage="*Column exists in Xaxis data"
                                        ControlToValidate="radCmbColumnName" OnServerValidate="cvYColNameInXAxis_ServerValidate"
                                        Display="Dynamic">
                                    </asp:CustomValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="tcAxis" HeaderText="Axis">
                                <ItemTemplate>
                                    <asp:Label ID="lblAxis" runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="radCmbAxis" runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChangedEventHandler">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="--Select--" Value="--Select--" />
                                            <telerik:RadComboBoxItem Text="Primary Left" Value="Primary Left" />
                                            <telerik:RadComboBoxItem Text="Primary Right" Value="Primary Right" />
                                            <telerik:RadComboBoxItem Text="Secondary Left" Value="Secondary Left" />
                                            <telerik:RadComboBoxItem Text="Secondary Right" Value="Secondary Right" />
                                        </Items>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvYAxis" runat="server" ErrorMessage="*" ControlToValidate="radCmbAxis"
                                        InitialValue="--Select--"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="tcPlottingType" HeaderText="Plotting Type">
                                <ItemTemplate>
                                    <asp:Label ID="lblPlottingType" runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="radCmbPlottingType" runat="server">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="--Select--" Value="--Select--" />
                                            <telerik:RadComboBoxItem Text="Line" Value="Line" />
                                            <telerik:RadComboBoxItem Text="Area" Value="Area" />
                                            <telerik:RadComboBoxItem Text="Marker" Value="Circle" />
                                        </Items>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvYPlottingType" runat="server" ErrorMessage="*"
                                        ControlToValidate="radCmbPlottingType" InitialValue="--Select--"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="tcPlottingColor" HeaderText="Plotting Color">
                                <ItemTemplate>
                                    <asp:Label ID="lblPlottingColor" runat="server"></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="radCmbCPlottingColor" runat="server">
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvYPlottingColor" runat="server" ErrorMessage="*"
                                        ControlToValidate="radCmbCPlottingColor" InitialValue="--Select--"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="tcIsSameAxis" HeaderText="Is Same Axis">
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbIsSameAxisDisplay" runat="server" Enabled="false" />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:CheckBox ID="cbIsSameAxis" runat="server" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn">
                                <ItemStyle CssClass="MyImageButton" Width="3%" />
                                <HeaderStyle Width="3%" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridButtonColumn ConfirmText="Delete this entry?" ConfirmDialogType="RadWindow"
                                ConfirmTitle="Attention" ConfirmDialogHeight="100" ConfirmDialogWidth="250" ButtonType="ImageButton"
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                <ItemStyle CssClass="MyImageButton" Width="3%" />
                                <HeaderStyle Width="3%" />
                            </telerik:GridButtonColumn>
                        </Columns>
                        <CommandItemTemplate>
                            <table class="rgYAxisCommandTable">
                                <tr>
                                    <td align="left">
                                        <asp:Button ID="AddNewRecordButton" CommandName="InitInsert" runat="server" CssClass="rgAdd" />
                                        <asp:LinkButton ID="lnkAddNewRow" runat="server" CommandName="InitInsert" Text="Add new record"></asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <PagerStyle AlwaysVisible="True" />
                        <HeaderStyle Font-Bold="True" BackColor="#BDBDBD" ForeColor="Black" />
                    </MasterTableView>
                    <SelectedItemStyle BackColor="Blue" />
                </telerik:RadGrid></td>
        </tr>
        <tr>
            <td align="center" colspan="2">
                <br />
                <asp:Button ID="btnSave" runat="server" Text="Save"  OnClick="btnSave_Click" />
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
            </td>
        </tr>
    </table>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>
</div>

Following are the settings for the ajax manager in my usercontrol.ascx.cs
objRadAJAXManager = RadAjaxManager.GetCurrent(Page);
                objRadAJAXManager.ClientEvents.OnRequestStart = "onRequestStart";
  
                //X Axis grid
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgXAxisDetails, rgXAxisDetails, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgXAxisDetails, RadWindowManager1, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgXAxisDetails, lblErrorXAxis);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgXAxisDetails, lblErrorYAxis);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgXAxisDetails, radCmbXAxisColumn);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgXAxisDetails, hdnXAxisColName);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgXAxisDetails, rgYAxisDetails);
  
                //Y axis grid
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgYAxisDetails, rgYAxisDetails, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgYAxisDetails, RadWindowManager1, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgYAxisDetails, lblErrorYAxis);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgYAxisDetails, lblErrorXAxis);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(rgYAxisDetails, rgXAxisDetails);
  
                // X axis column drop down
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(radCmbXAxisColumn, radCmbXAxisColumn, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(radCmbXAxisColumn, RadWindowManager1, RadAjaxLoadingPanel1);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(radCmbXAxisColumn, hdnXAxisColName);
                objRadAJAXManager.AjaxSettings.AddAjaxSetting(radCmbXAxisColumn, rgYAxisDetails);

Thanks in advance

Satbir
Viktor Tachev
Telerik team
 answered on 13 Jun 2013
3 answers
155 views

Hi,

I am not able to trigger the "OnClientNodeDropping"  event when a parent node is dropped onto a child node. This is required in order to execute some custom code for cloning the parent node and adding it as a child. In the attached example, I have had to use a customised picker tool to add the parent node "Everyone" to its child "My Team". This is fine for a example, but not a practical solution.

I have tried using the method described in the below link to get the target node that the parent is dropped onto. However this will not give me the target node attributes only the html element of the node.
http://www.telerik.com/community/forums/aspnet-ajax/treeview/dropping-a-node-on-itself-doesn-t-fire-events.aspx

Am I missing an attribute in the Telerik control ? (I have both EnableDragAndDrop and EnableDragAndDropBetweenNodes set to true), or is there something else I should be doing?

Thanks
Justin

Boyan Dimitrov
Telerik team
 answered on 13 Jun 2013
1 answer
131 views
Recently we have upgraded our Telerik Web dll's i.e. Telerik.Web.Design.dll,Telerik.Web.UI.dll,Telerik.Web.UI.Skins.dll from 2011.3.1115.40 version to newer version 2013.1.410.40. in our development environment it is working fine.
But when these dlls were replaced in QA Environment the css and images were missing for some time and later they got updated automatically and everything was working fine as if there is no issue.

This is a typical scenario because we tried to delete the temporary files, browser cookies and all that can be done but still the issue was existing but later when we checked everything went well. This happened in QA but we don't want this to be repeated in Production Environment for that we need a best posssible solution so that we know what needs to be done beforehand this issue does not repeat.

Awaiting for the quick response on this.

Thanks

O'Man
Top achievements
Rank 1
 answered on 13 Jun 2013
0 answers
49 views
This is a duplicate post of this one. I don't know how it happened...
Please delete.
Mauro
Top achievements
Rank 1
 asked on 13 Jun 2013
3 answers
623 views
I have two grid with same number and type of columns. The number of rows are also same.
Only difference is the content of the grids.
Basically I want to show the difference in two grids for each column.
I want to show first column from both the grids, then second column from both the grids and so on.
How I can achieve this?
Princy
Top achievements
Rank 2
 answered on 13 Jun 2013
3 answers
393 views
Is it possible to export a RadGrid to Excel so that it's page orientation is Landscape and that it's print setting is also Landscape?
Kostadin
Telerik team
 answered on 13 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?