Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
124 views

Skin is not applied to RadLabel, when i am using Sass Theme Builder for Bootstrap.

Even if I select all the controls, there is no css file in the downloaded archive that would contain the class name .RadLabel

Rumen
Telerik team
 answered on 16 Dec 2019
3 answers
871 views

In previous versions of Visual Studio and the Telerik extension I was able to create a new ASP.Net WebForms application and use the Telerik menu in VS to convert the project. Now in VS2019, the Telerik extension menu is within the new Extensions menu, but I see no options to convert my project.

Am I missing something?

Yana
Telerik team
 answered on 16 Dec 2019
0 answers
80 views

I am trying to get the datavaluefields from the AutoCompleteBox entries and the values are always empty. The text has the text in them but nothing in the value field.

This is the code to make the autocompletebox:

     <asp:SqlDataSource ID="sdsApplications" runat="server" ConnectionString="<%$ ConnectionStrings:ConfiguratorConnection %>" SelectCommand="SELECT Id, Name FROM tblValues" DataSourceMode="DataReader"></asp:SqlDataSource>
     <div class="form-group row label-floating">
      <asp:Label ID="lblApplications" runat="server" CssClass="control-label" AssociatedControlID="racApplications" style="margin-top:0;z-index:99999;">Applications</asp:Label>
      <telerik:RadAutoCompleteBox RenderMode="Lightweight" ID="racApplications" runat="server" Skin="Bootstrap"
       DataSourceID="sdsApplications" DataTextField="Name" DataValueField="Id" EmptyMessage="Select applications to include"
       AllowCustomEntry="False" MaxResultCount="50" DropDownHeight="900px">
      </telerik:RadAutoCompleteBox>

I have never been able to get the values out of the entries on the server side. Can anyone offer a resolution?

 

Thanks,

David

David
Top achievements
Rank 1
 asked on 15 Dec 2019
5 answers
333 views

 

I have a grid with grouping and scrolling enabled.
On export to pdf the grid is not exported in a new page. instead it loads the data in the grid.
I have the export functionality working as desired on other pages in the app. It gives a prompt to save or open the export. But with the grid I am referring to it does not prompt, just loads the export data into the grid.

I am using the latest Telerik Controls. Pasted below is my grid code:


<telerik:RadGrid ID="RadGridCalendar" runat="server" GridLines="None" AllowPaging="true" PageSize="20"
                            AllowFilteringByColumn="true" Width="980px" ShowHeader="true" OnColumnCreated="RadGridCalendar_ColumnCreated"
                           OnItemCreated="RadGridCalendar_ItemCreated" OnItemDataBound="RadGridCalendar_ItemDataBound"
                           OnPreRender="RadGridCalendar_PreRender" AutoGenerateColumns="False" EnableLinqExpressions="false"
                           ShowGroupPanel="false" OnItemCommand="RadGridCalendar_ItemCommand" AllowSorting="true"
                           AllowCustomPaging="false" OnNeedDataSource="RadGridCalendar_NeedDataSource">
                           <ClientSettings Resizing-AllowColumnResize="true">
                               <ClientEvents OnGridCreated="GridCreated" />
                               <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="450px" />
                           </ClientSettings>
                           <ExportSettings IgnorePaging="false"  OpenInNewWindow="true" ExportOnlyData="false"
                               FileName="CalendarExport">
                               <Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous"
                                   Keywords="None" PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in"
                                   PageWidth="297mm" PageHeight="210mm" PageTopMargin="1in" PageTitle="Calendar"
                                   Subject="Calendar Export" Title="Calendar" />
                           </ExportSettings>
                           <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="true" ClientDataKeyNames="ActivityID"
                               Width="100%" CommandItemDisplay="Top" DataKeyNames="ActivityID">
                               <GroupByExpressions>
                                   <telerik:GridGroupByExpression>
                                       <SelectFields>
                                           <telerik:GridGroupByField FieldName="ToDoType" HeaderText=" " HeaderValueSeparator=""
                                               FormatString="{0}" SortOrder="Ascending"></telerik:GridGroupByField>
                                       </SelectFields>
                                       <GroupByFields>
                                           <telerik:GridGroupByField FieldName="ToDoType"></telerik:GridGroupByField>
                                       </GroupByFields>
                                   </telerik:GridGroupByExpression>
                                   <telerik:GridGroupByExpression>
                                       <SelectFields>
                                           <telerik:GridGroupByField FieldName="ActivityDate"></telerik:GridGroupByField>
                                       </SelectFields>
                                       <GroupByFields>
                                           <telerik:GridGroupByField FieldName="Date" FormatString="{0:d}" SortOrder="Descending">
                                           </telerik:GridGroupByField>
                                           <telerik:GridGroupByField FieldName="ActivityDate" FormatString="{0:D}" SortOrder="None">
                                           </telerik:GridGroupByField>
                                       </GroupByFields>
                                   </telerik:GridGroupByExpression>
                               </GroupByExpressions>
                               <Columns>
                                   <telerik:GridTemplateColumn UniqueName="DateColumn" HeaderText="Date">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="72px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="TimeColumn" HeaderText="Time">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="125px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <%# DataBinder.Eval(Container.DataItem, "StartTime") %>
                                               <asp:Label ID="Label1" runat="server" Visible='<%# !Convert.IsDBNull(Eval("EndTime")) %>'>-</asp:Label>
                                               <%# DataBinder.Eval(Container.DataItem, "EndTime") %>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Subject" HeaderText="Subject">
                                       <ItemStyle BorderStyle="None" HorizontalAlign="Left"></ItemStyle>
                                       <HeaderStyle Width="250px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div style="text-align:left">
                                               <asp:LinkButton ID="LinkButtonActivity" runat="server" ForeColor="#73abc9" Font-Size="9pt"
                                                   CommandName="ShowActivity" Font-Bold="true">
                                               <%# Eval("Subject")%></asp:LinkButton>
                                               <asp:Label ID="LabelSubject" runat="server" CssClass="label" Width="1px" Visible="false"><%# Eval("Subject")%></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Location" HeaderText="Location">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="125px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelLocation" runat="server" Text='<%# Eval("Location")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="DueDate" HeaderText="Due Date"  Visible="false">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelDueDate" runat="server" Text='<%# Eval("DueDate")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Contact" HeaderText="Contact">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="125px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelContact" runat="server" Text='<%# Eval("Contact")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="175px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelDescription" runat="server" Text='<%# Eval("Description")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Status" HeaderText="Status" Visible="false"
                                       DataField="Status" AllowFiltering="true">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelStatus" runat="server" Text='<%# Eval("Status")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Type" HeaderText="Type" Visible="false"
                                       AllowFiltering="true" DataField="Type">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelType" runat="server" Text='<%# Eval("Type")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="SubType" HeaderText="Sub-Type" Visible="false">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelSubType" runat="server" Text='<%# Eval("SubType")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>                                    <telerik:GridTemplateColumn UniqueName="Priority" HeaderText="Priority" Visible="false">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelPriority" runat="server" Text='<%# Eval("Priority")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Company" HeaderText="Company" Visible="false">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelEmployer" runat="server" Text='<%# Eval("Employer")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Phone" HeaderText="Phone" Visible="false">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelPhone" runat="server" Text='<%# Eval("Phone")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                                                      <telerik:GridTemplateColumn UniqueName="TimeSpent" HeaderText="TimeSpent" Visible="false">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelTimeSpent" runat="server" Text='<%# Eval("TimeSpent")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="PercentComplete" HeaderText="% Complete"
                                       Visible="false">
                                       <ItemStyle BorderStyle="None"></ItemStyle>
                                       <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                       <ItemTemplate>
                                           <div>
                                               <asp:Label ID="LabelPercentComplete" runat="server" Text='<%# Eval("PercentComplete")%>'></asp:Label>
                                           </div>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                                                      <telerik:GridBoundColumn DataField="ActivityID" Visible="false" UniqueName="ActivityID">
                                   </telerik:GridBoundColumn>
                                   <telerik:GridDateTimeColumn DataField="Date" AllowFiltering="true" Visible="false"
                                       DataFormatString="{0:MM/dd/yyyy}" UniqueName="Date">
                                   </telerik:GridDateTimeColumn>
                                                                                      </Columns>
                               <HeaderStyle Width="100px" />
                               <CommandItemTemplate>                                
                                   <asp:ImageButton ID="ImageButtonAdd" runat="server" ImageUrl="~/App_Themes/MLightning/Layout/plus-icon.png"
                                       AlternateText="Add" PostBackUrl="~/Calendar/CalendarActivityAddSettings.aspx" /> 
                                   <asp:LinkButton ID="LinkButtonExport" runat="server" CommandName="ExportToPdf" CausesValidation="false">
                                   <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/MLightning/Layout/Reader.gif" />
                                   <span class="printTop" > Export</span>
                                   </asp:LinkButton>  
                               </CommandItemTemplate>
                                 
                               <PagerStyle Position="TopAndBottom" PrevPageText="Prev" NextPageText="Next" Mode="NextPrev" />
                           </MasterTableView>
                       </telerik:RadGrid>

Please let me know what I need to do for the export to open in a new window and give the user a prompt.
Tom
Top achievements
Rank 1
 answered on 13 Dec 2019
5 answers
112 views

Hi,

I ran into this issue/weird behaviour. If I setup my treeview to work with load on demand and I perform a client side action e.g. dropping a node into a container, when the action finishes, the treeview will rerender and all my NavigateUrl properties starting with a "/" will have the server address put before them.

This only happens if I use load on demand... If I build a list of objects and set it as my datasource it works fine.

Is there a way to prevent this from happening?

Peter Milchev
Telerik team
 answered on 13 Dec 2019
0 answers
1.9K+ views

Path traversal in all versions of RadChart for ASP.NET AJAX by Telerik allows a remote attacker to read and delete an image with extension ".BMP",".EXIF",".GIF",".ICON",".JPEG",".PNG",".TIFF", or ".WMF" on the server through a specially crafted request.

Versions prior to Q3 2012 may also be exposed to arbitrary files access within the web application, including the web.config.

To avoid the vulnerability you must remove its HTTP handler from your web.config (its type is Telerik.Web.UI.ChartHttpHandler), e.g.

REMOVE these lines from your web.config file:

<add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />

and

<add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />

Note: this will prevent the RadChart control from working in your app.

RadChart has been discontinued in 2014 in favor of RadHtmlChart. We advise that you migrate to RadHtmlChart:

Telerik would like to thank movrment from Infiniti Team - VinCSS (A member of Vingroup) for helping in making this information public.

External reference: CVE-2019-19790

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 13 Dec 2019
3 answers
5.1K+ views

Hi

Is there a way for the RadNumericTextBox to accept only postive integers?

I.e:

  • No negatives
  • No decimals
  • No group formatting

I don't know if this is the right approach but for the decimal separator I used "&copy;".

The database stores a 10 digit positive integer.


Kind regards

Mark Eaton

Attila Antal
Telerik team
 answered on 13 Dec 2019
1 answer
83 views

 

If you run the Wave accessibility checker against the RadGrid it gets errors because of the buttons that do not contain text.

https://webaim.org/

Any ideas?

 

Thanks,
Brian

Rumen
Telerik team
 answered on 13 Dec 2019
2 answers
448 views

I've got one page with four grids, wrapped in a user control.  The client side filtering has been tough because the javascript methods I had were stepping on each other.  The rest of it works, I just can't get the filter value typed in the textbox when they click on the filter icon.  In the code below I've got the code to target the correct grid, I just need to get the filter value.  tableView.get_filterExpressions(); is coming up dry.

Telerik.Web.UI.dll = 2017.3.913.45

 

<telerik:GridBoundColumn DataField="COMPM_ADDRESS" FilterControlAltText="Filter Name column" AutoPostBackOnFilter="true"
    HeaderText="ADDRESS" SortExpression="COMPM_ADDRESS " UniqueName="COMPM_ADDRESS" AllowFiltering="true">
    <ItemStyle HorizontalAlign="Left" Width="130px" />
    <HeaderStyle HorizontalAlign="Left" Width="130px" />
 
    <FilterTemplate>
        <telerik:RadTextBox ID="txtFilterCompAddress" runat="server" Width="100px" onkeyup="CompAddressOnKeyUp(this, event)"
            Text='<%# Container.OwnerTableView.GetColumn("COMPM_ADDRESS").CurrentFilterValue %>'>
            <ClientEvents OnKeyPress="CompAddressKeyPress" />
        </telerik:RadTextBox>
 
        <asp:ImageButton ImageUrl="/images/filter2.png" runat="server" ID="ImageButton1"
            Value="<%#((GridItem)Container).OwnerTableView.ClientID%>" OnClientClick="ApplyFilterIcon(this); return false;" />
 
        <telerik:RadScriptBlock ID="radScriptAddress" runat="server">
            <script type="text/javascript">
 
                var _columnNameAddress = "COMPM_ADDRESS";
 
                // filter icon clicked
                function ApplyFilterIcon(sender)
                {
                    var masterTableId = $(sender).attr('Value');
                    var tableView = $find(masterTableId);
 
                    debugger;
                    var filters = tableView.get_filterExpressions();  // EMPTY
 
                    var filterValue = "553";  // <<<  I NEED THIS VALUE, WHAT THEY TYPED IN TEXTBOX
                                                     //BELOW WORKS
                    tableView.filter(_columnNameAddress, filterValue, Telerik.Web.UI.GridFilterFunction.Contains, true);
                }
 
                // just checks for an empty filter textbox on backspace and return to clear the filter
                function CompAddressOnKeyUp(sender, evt)
                {
                    onKeyUpFilterGridClear(sender, evt, "<%#((GridItem)Container).OwnerTableView.ClientID%>", _columnNameAddress);
                }
                // on a keypress; check for return to fire the filter
                function CompAddressKeyPress(sender, evt)
                {
                    onKeyPressReturnTrigger(sender, evt, "<%#((GridItem)Container).OwnerTableView.ClientID%>", _columnNameAddress);
                }
            </script>
        </telerik:RadScriptBlock>
 
    </FilterTemplate>
</telerik:GridBoundColumn>
Steven
Top achievements
Rank 1
Iron
 answered on 12 Dec 2019
1 answer
240 views

Dear All,

i have created Telerik Hierarchy Rad Gridview.

>> first level Employee Name

>> second level Employee Role

>> third level Employee Designation

but i am using single table. EmployeeMaster(only one table)

i want out put:

Employee Name
                     (expand) Employee role
                                    (expand) Employee Designation


Attila Antal
Telerik team
 answered on 12 Dec 2019
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?