Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
96 views

in myDbSchedulerProvider (through webservice) > GetAppointments

I can set apt.Start , apt.Description , apt.ID , apt.Subject and those carry forward to the page.

apt.Subject = dr("Title")
apt.Start = DateTime.SpecifyKind(StartTime, DateTimeKind.Utc)
apt.Description = dr("Content")
 
apt.CssClass = "mapping" & dr("Category").replace(";", "")
apt.ForeColor = Drawing.Color.Beige
apt.BackColor = Drawing.Color.Coral
apt.Attributes("class") = "mapping" & dr("Category").replace(";", "")

but if I set any of these values, they do not carry forward.
apt.CssClass , apt.ForeColor , apt.BackColor , apt.Attributes("class")

in the click appointment javascript event I alert these values and they are blank or null
but as I said, if I alert the other ones they give correct values.

function OnClientAppointmentClick(sender, args) {
alert(apt.get_start().format("MM/dd/yyyy HH:mm")) ; //<-- good value
alert(apt.get_description()); //<-- good value
 
alert(apt.get_cssClass()); //<-- blank value
alert(apt.get_backColor()); //<-- null value
 
etc etc
Doug
Top achievements
Rank 1
 asked on 19 May 2017
0 answers
121 views
When i am setting text and saving it, sometimes is losing spacing between words. If i go and set it up correctly and save it just reverts back to the document without spacing. It doesn’t do it for every space just certain sections. I have an image attached. Could you please advice on a fix?
Evgheni
Top achievements
Rank 1
 asked on 19 May 2017
5 answers
106 views
Hello,

We have noticed that in Q3 2010 clicking on a RadToolbarButton image does not navigate to the page specified RadToolbarButton NavigateUrl. Clicking on the text or area around the text works fine. (Clicking on an image was working in Q2 2008)

Here's my code:
<style type="text/css">
     div.RadToolBarDropDown .rtbWrap
     {
         line-height: 52px;
         padding-left: 57px;
     }
        
     div.RadToolBarDropDown .rtbItemHovered,
     div.RadToolBarDropDown .rtbItemFocused, 
     div.RadToolBarDropDown .rtbItemHovered .rtbWrap,
     div.RadToolBarDropDown .rtbItemFocused .rtbWrap
     {
         background-image: none;
         background-color: #8E8E8E;
     }
 </style>
   
 <telerik:RadToolBar ID="radToolBarMenu" runat="server" Orientation="Vertical">
     <Items>
         <telerik:RadToolBarDropDown runat="server" ImageUrl="~/Images/NewReceipt.jpg" 
             Text="Receipt">
             <Buttons>
                 <telerik:RadToolBarButton runat="server" 
                     ImageUrl="~/Images/ReceiptInternal.jpg" NavigateUrl="~/Internal.aspx" 
                     Text="Internal">
                 </telerik:RadToolBarButton>
                 <telerik:RadToolBarButton runat="server" 
                     ImageUrl="~/Images/ReceiptExternal.jpg" NavigateUrl="~/External.aspx" 
                     Text="External">
                 </telerik:RadToolBarButton>
             </Buttons>
         </telerik:RadToolBarDropDown>
     </Items>
 </telerik:RadToolBar>

Is it possible to navigate when clicking on the image?

Thanks,

Matt
Rumen
Telerik team
 answered on 19 May 2017
1 answer
171 views

Hello there,

I have a requirement to validate that an expiration date is later than a hire date. Both dates are populated in a GridBoundColumn in a RadGrid. Bellow is the code for the two columns in my aspx page:

<telerik:GridBoundColumn ColumnEditorID="DateEditor" DataField="Hired" Visible="true" ReadOnly="false" HeaderText="Hired" UniqueName="gcHired" DataType="System.String" FilterControlAltText="Filter gcHired column"></telerik:GridBoundColumn>
                                                <telerik:GridDateTimeColumn ColumnEditorID="DateEditor" MinDate="2017-01-01" MaxDate="2030-12-31" DataFormatString="{0:MM/dd/yyyy}" DataField="Expires" HeaderText="Expires" UniqueName="gcExpires" FilterControlAltText="Filter column column" AllowFiltering="False" AllowSorting="False" DataType="System.DateTime" ReadOnly="false">
                                                    <HeaderStyle Width="100px"></HeaderStyle>
                                                </telerik:GridDateTimeColumn>

 

I am wondering if there is a straight forward way to achieve this. Thanks in advance!

Marin Bratanov
Telerik team
 answered on 19 May 2017
11 answers
1.4K+ views
Hello, I am trying to use clientside events to hide the edit and delete columns as well as the filter row when an export is being performed on the radgrid, then show those items again after the export.  I've managed to hide them before the export and the export looks fine other than a short empty row still being where the filter row was for pdf and word (hideFilterItem does not seem to hide it from export; excel is fine though since I'm using ExcelML).  

The part I'm having difficulty with is getting them to show up again.  I've tried attaching a few client side events (such as OnTableCreated) to this function, but everything I've tried either causes errors or does nothing:

UnhideGridEditAndDeleteColumnsAndFilterRow = function (sender, eventArgs) {
 
 // I'm using js in a separate file so I can't use radcodeblock to get ClientID
    var gridName = sender.EventTarget.toString();
 
    gridName = gridName.substring(0, gridName.indexOf("$ctl00"));
 
    var masterTableView = $find(gridName).get_masterTableView();
 
    if (masterTableView.getColumnByUniqueName("EditCommandColumn") != null && masterTableView.getColumnByUniqueName("DeleteCommandColumn") != null) {
      masterTableView.showFilterItem();
      masterTableView.showColumn(masterTableView.getColumnByUniqueName("EditCommandColumn").get_element().cellIndex);
      masterTableView.showColumn(masterTableView.getColumnByUniqueName("DeleteCommandColumn").get_element().cellIndex);
    }
 
 
  };


Is there a proper way to do this that I haven't found?
Neha
Top achievements
Rank 1
 answered on 19 May 2017
0 answers
93 views

When i use AlwaysVisible in PagerStyle for a RadGrid i can´t Access controls of the pager in databound.

 

<MastertableView  PagerStyle-AlwaysVisible="true">

protected void grdListing_ItemDataBound( object sender, GridItemEventArgs e )

{

    if (e.Item is GridPagerItem)
            {
                GridPagerItem pager = (GridPagerItem)e.Item;
                Label lblGoToPageLabel = (Label)pager.FindControl("GoToPageLabel");
                lblGoToPageLabel.Text = "mytext";

     }

}

FindControls returns null.

 

if AlwaysVisible is false FindControl returns a value.

How can i Access controls if AlwaysVisible es true?

 

Thanks

Sergio Saiz

 

 

Sergio
Top achievements
Rank 1
 asked on 19 May 2017
2 answers
295 views
Hello support team,

Heading : I am having issue with radeditor HTML formatting

Background : I am using radeditor in my aspx page, My application is reading emails from third party and then after I am displaying those emails body in my page radeditor control. As we are fetching email from third party so we don't have any control over HTML which they are sending.

Issue : Partial HTML is not displaying properly in my radeditor control

I walk through radeditor demo application postedby telerik http://demos.telerik.com/aspnet-ajax/editor/examples/builtinmodules/defaultcs.aspx and I found that it is working smooth in the demo given by you

So I create a demo application to reproduce the issue which I am facing and attached as screenshot in my post (Not able to upload zip folder though). So kindly go through it and let me know if I am missing any property that allow such thing or anything which is restrict my application to do so

P.S : I am using telerik version 2016.2.607.40

Let me know if you need any additional information

Thanks
 - Brijesh
Rumen
Telerik team
 answered on 19 May 2017
1 answer
93 views

hi,

I have a gantt chart, when i perform inline edit through an ajax call for the end date the date gets changed but the scheduler part remains the same. It gets changed only when a refresh of the page is done.

I want the scheduler to get changed when the end date is changed through ajax call without  read event of the data source or a page refresh.

Can i get to know how this requirement can be achieved?

Thanks 

Anagha

Bozhidar
Telerik team
 answered on 19 May 2017
4 answers
156 views

I am using RadGrid's RowDrop feature to allow my users to rearrange rows in the grid.  

In the business logic, I use a table column to store a sort index for each row, and when I get a RowDrop event, I calculate the row's new index based on the target row, update the database and refresh the Datasource.  This works really well for me as long as the row is dropped on or before the last visible row in the grid.

However, my users are confused when they drop a row past the end of the last visible row and the refreshed grid shows that dropped row preceding the last row, rather than it becoming the new last row.

 How can I detect when the row is dropped in the empty space of the grid?

 I found that GridDragDropEventArgs has a member "DropPosition" which appears to be undocumented; in any case, this value (enum Above or Below) does not appear to be consistent with what non-Telerik documentation I've seen, so it's not a reliable way to detect if the user dragged past the last row or not.

 Any other ideas?

 

Steven Bixby
Top achievements
Rank 1
 answered on 18 May 2017
2 answers
135 views

I've got a combobox that updates a grid, but the grid's NeedDataSource handler isn't invoked when the AJAX request happens.  However, when I click the refresh button on the grid it issues another AJAX request and this one does invoke the NeedDataSource handler.  Can anyone help me understand why this isn't happening in the former case?

 

 

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Groups.aspx.cs" Inherits="BuildDashBoard.Groups" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content>
<asp:Content ID="NavigationMenu" ContentPlaceHolderID="NavigationMenuContent" runat="server"></asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
  <div>
    <telerik:radpanelbar ID="RadPanelBarConfigs" runat="server" Width="100%" AllowCollapseAllItems="True" PersistStateInCookie="True" CssClass="RadPanelBar_site">
      <Items>
        <telerik:RadPanelItem Text="Custom Groups" Expanded="True" Font-Bold="False" Font-Size="Medium" BackColor="#FFFF80" Enabled="true">
          <ContentTemplate>
            <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
              <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadComboBoxCustomGroups2">
                  <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridGroupMembers" LoadingPanelID="RadAjaxLoadingPanel" />
                  </UpdatedControls>
                </telerik:AjaxSetting>
              </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Skin="Default">
            </telerik:RadAjaxLoadingPanel>
            <asp:SqlDataSource ID="SqlDataSourceCustomGroups" runat="server"
                               ConnectionString="<%$ ConnectionStrings:BuildServicesConnectionString %>"
                               SelectCommand="sp_GetAllEditableCustomGroups" SelectCommandType="StoredProcedure"
                               InsertCommand="sp_AddCustomGroup" InsertCommandType="StoredProcedure"
                               UpdateCommand="sp_DeleteCustomGroup" UpdateCommandType="StoredProcedure">
              <InsertParameters>
                <asp:Parameter Name="CustomGroupName" Type="String" />
              </InsertParameters>
              <UpdateParameters>
                <asp:Parameter Name="CustomGroupId" Type="Int32" />
              </UpdateParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSourceCustomGroupBranchesSource" runat="server"
                               ConnectionString="<%$ ConnectionStrings:BuildServicesConnectionString %>"
                               SelectCommand="sp_GetBranchesNotInCustomGroup" SelectCommandType="StoredProcedure">
              <SelectParameters>
                <asp:ControlParameter ControlID="RadComboBoxCustomGroups2" DefaultValue=""
                                      Name="GroupId" PropertyName="SelectedValue" Type="Int32" />
              </SelectParameters>
            </asp:SqlDataSource>
            <asp:Panel ID="CustomizeCustomGroupPanel" runat="server" GroupingText="Group members" Width="635px">
              <div>
                <div class="InlineTable">
                  <telerik:RadComboBox ID="RadComboBoxCustomGroups2" runat="server"
                                       DataSourceID="SqlDataSourceCustomGroups" DataTextField="Group_Name"
                                       DataValueField="Group_Id" CssClass="radcombobox" AutoPostBack="True" />
                </div>
              </div>
              <br />
              <div>
                <div>
                  <telerik:RadGrid ID="RadGridGroupMembers" runat="server" CssClass="RadGrid_site" ClientSettings-Selecting-AllowRowSelect="true"
                                   AutoGenerateColumns="false" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" OnNeedDataSource="RadGridGroupMembers_NeedDataSource"
                                   OnUpdateCommand="RadGridGroupMembers_UpdateCommand" OnInsertCommand="RadGridGroupMembers_InsertCommand">
                    <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="Branch_Id">
                      <Columns>
                        <telerik:GridEditCommandColumn />
                        <telerik:GridBoundColumn DataField="Branch_Id" HeaderText="Branch ID" UniqueName="Branch_Id" ReadOnly="true" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="Branch Name" UniqueName="Branch_Name">
                          <EditItemTemplate>
                            <asp:DropDownList ID="ddl_branch_name" runat="server" DataValueField="Branch_Name" DataSourceId="SqlDataSourceCustomGroupBranchesSource">
                            </asp:DropDownList>
                          </EditItemTemplate>
                          <ItemTemplate>
                            <asp:Literal runat="server" Text='<%# Eval("Branch_Name") %>'>
                            </asp:Literal>
                          </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridDateTimeColumn DataField="Expiration" HeaderText="Expiration" UniqueName="Expiration" ReadOnly="false">
                        </telerik:GridDateTimeColumn>
                      </Columns>
                    </MasterTableView>
                  </telerik:RadGrid>
                </div>
              </div>
            </asp:Panel>
          </ContentTemplate>
        </telerik:RadPanelItem>
      </Items>
    </telerik:radpanelbar>
  </div>
</asp:Content>

 

Craig
Top achievements
Rank 1
 answered on 18 May 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?