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

We submit a form with a textbox that contains text which is used to search our database for data to put in a RadTreeView control.
The text string retrieved from the database for a node sometimes contains "<B>" for bolding.
When the user then submits another search, the node with the "<B>" is submitted to the server where the standard MS XSS prevention code kicks in and flags the "<B>" as a potential XSS attack. We get a yellow-screen of annoyance. I don't have the time to implement full XSS prevention, so to avoid the yellow-screen exception, I would like to simply prevent the browser from submitting the RadTreeView control when a user submits a search. Is this possible?

Veselin Tsvetanov
Telerik team
 answered on 09 May 2016
8 answers
697 views
Hi,
Hi,
We have implemented template columns in the telerik grid
We are tryig to use export to excel functionallity, which works great, except that it doesn't export data in the template columns. The columns are in the Excel, but they are all empty.

ASPX Code As folows:

<

telerik:GridHyperLinkColumn UniqueName="IH_LOG_NUMBER" DataTextField="IH_LOG_NUMBER"

 

 

HeaderText="<%$ Resources:Multilingual, IHLogNumber %>">

 

 

</telerik:GridHyperLinkColumn>

 

 

<telerik:GridBoundColumn Visible="false" UniqueName="IH_LOG_Exp" DataField="IH_LOG_NUMBER"

 

 

HeaderText="<%$ Resources:Multilingual, IHLogNumber %>">

 

 

</telerik:GridBoundColumn>

 


 

 

 

<telerik:GridTemplateColumn AllowFiltering="False" UniqueName="Comments" HeaderText="<%$ Resources:Multilingual, Comments %>" >

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:DropDownList ID="ddlComments" CssClass="DDDW" AppendDataBoundItems="true" runat="server"

 

 

 

 

 

SelectedValue='<%# Bind("COMMENT_ID") %>' DataSourceID="SqlDataSource1" DataTextField="COMMENT_NAME"

 

 

 

 

 

DataValueField="COMMENT_ID" Style="width: 100px;">

 

 

 

 

 

<asp:ListItem Value="0" Text="Please Select" Selected="True"></asp:ListItem>

 

 

 

 

 

</asp:DropDownList>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

<HeaderStyle Width="100px" />

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="<%$ Resources:Multilingual, ApprovedInvalidateDate %>" AllowFiltering="False"

 

 

UniqueName="SAMPLE_VALIDATED_DATE">

 

 

<ItemTemplate>

 

 

<telerik:RadDatePicker ID="rdpSampleDate" DbSelectedDate='<%# Bind("SAMPLE_VALIDATED_DATE", "{0:d}") %>'

 

 

runat="server" >

 

 

 

</telerik:RadDatePicker>

 

 

</ItemTemplate>

 

 

<HeaderStyle Width="130px" />

 

 

<ItemStyle Wrap="True" />

 

 

</telerik:GridTemplateColumn>

 

Below are the lines of code that export to Excel:

private

void ConfigureExport()

 

{

rGrdSampleList.MasterTableView.GetColumn(

"ClientSelectColumn").Visible = false;

 

rGrdSampleList.MasterTableView.GetColumn(

"EQUIPMENT_ID").Visible = false;

 

rGrdSampleList.MasterTableView.GetColumn(

"IH_LOG_NUMBER").Visible = false;

 

rGrdSampleList.MasterTableView.GetColumn(

"IH_LOG_Exp").Visible = true;

 

rGrdSampleList.MasterTableView.Columns.FindByUniqueName("Comments").Visible = true; rGrdSampleList.MasterTableView.Columns.FindByUniqueName(

"SAMPLE_VALIDATED_DATE").Visible = true;

 

rGrdSampleList.ExportSettings.ExportOnlyData =

true;

 

rGrdSampleList.ExportSettings.OpenInNewWindow =

true;

 

 

//rGrdSampleList.ExportSettings.IgnorePaging = true;

 

}

 

protected void RadMenu1_ItemClick1(object sender, RadMenuEventArgs e)

 

{

 

try

 

{

ConfigureExport();

 

if (e.Item.Text == Resources.Multilingual.Word)

 

{

 

//MsgBox"1")

 

rGrdSampleList.MasterTableView.ExportToWord();

}

 

else if (e.Item.Text == Resources.Multilingual.Excel)

 

{

 

//MsgBox"2")

 

rGrdSampleList.MasterTableView.ExportToExcel();

}

 

else if (e.Item.Text == Resources.Multilingual.Pdf)

 

{

rGrdSampleList.MasterTableView.ExportToPdf();

}

}

 

catch (Exception exe)

 

{

exe.ToString();

}

}

Is this by design or are there workarounds?
I'm Waiting for reply as soon as possible

Thanks.


Kostadin
Telerik team
 answered on 09 May 2016
2 answers
119 views

Hi guys,

I have a scheduler defined like this:

<telerik:RadScheduler ID="RadScheduler1" runat="server"
            Skin="Windows7"
            AllowDelete="False"
            AllowInsert="False"
            AllowEdit="False"
            SelectedView="MonthView"
            Culture="en-GB"
            LastDayOfWeek="Friday"
            FirstDayOfWeek="Monday"
            ShowFooter="False"
            ShowAllDayRow="false"
                     
            EnableRecurrenceSupport="False"
            AdvancedForm-Enabled="False"
            OverflowBehavior="Expand"
            RowHeight="35px">
 
            <DayView UserSelectable="true" />
 
            <WeekView UserSelectable="true" ShowAllDayInsertArea="False" ShowInsertArea="False" >
            </WeekView>
 
            <MonthView UserSelectable="true" MinimumRowHeight="3" />
 
            <MultiDayView UserSelectable="false" />
            <TimelineView UserSelectable="false" />
            <YearView UserSelectable="false" />
                     
        </telerik:RadScheduler>

I bind the appointents, and with the TimeSlotCreated hook I create special days for the holidays:

Protected Sub RadScheduler1_TimeSlotCreated(sender As Object, e As TimeSlotCreatedEventArgs) Handles RadScheduler1.TimeSlotCreated
 
        Dim añoInicial As Integer = Today.Year
        Dim añoFinal As Integer = Today.Year + 2
 
        Dim dicNonLaborDays As Dictionary(Of Date, String) = clsDataBaseFunctions.GetNonLaborDays(añoInicial, añoFinal)
 
        For Each fiesta In dicNonLaborDays
 
            If DateTime.Compare(e.TimeSlot.Start.[Date], fiesta.Key) = 0 Then
                'Set the CssClass property to visually distinguish your special days.
                e.TimeSlot.CssClass = "Disabled"
 
                Dim lblNombreFiesta As New Label
                lblNombreFiesta.Text = fiesta.Value
 
 
                If Not IsNothing(e.TimeSlot.Control) Then       'Si es Nothing es porque hay un appointment en esa fecha
 
                    Select Case RadScheduler1.SelectedView
                        Case SchedulerViewType.DayView
                            e.TimeSlot.Control.Controls.AddAt(1, lblNombreFiesta)
                        Case SchedulerViewType.WeekView
                            e.TimeSlot.Control.Controls.AddAt(1, lblNombreFiesta)
                        Case SchedulerViewType.MonthView
                            e.TimeSlot.Control.Controls.AddAt(1, lblNombreFiesta)
                    End Select
                End If
            End If
        Next
 
        ' Resaltar la fecha de hoy
        If DateTime.Compare(e.TimeSlot.Start.[Date], DateTime.Now.[Date]) = 0 Then
 
            Select Case RadScheduler1.SelectedView
                Case SchedulerViewType.DayView
                    e.TimeSlot.CssClass = "CurrentDay_WeekView"
                Case SchedulerViewType.WeekView
                    e.TimeSlot.CssClass = "CurrentDay_WeekView"
                Case SchedulerViewType.MonthView
                    e.TimeSlot.CssClass = "CurrentDay_MonthView"
            End Select
 
        End If
 
    End Sub

Everything Works fine. In month view, when there are no holidays in the displayed month, the height of the days boxes is 3 lines (3 divs), as defined with:

<MonthView UserSelectable="true" MinimumRowHeight="3" />

However, if there is any holiday present in the displayed month, the height of all the displayed days boxes changes to 4.

I would like to keep the height of all the days boxes (regardless there are holidays or not present) in 3 lines. Is there any way to achieve this?

Thank you,

Joaquín

Joaquín
Top achievements
Rank 2
 answered on 08 May 2016
2 answers
57 views

My radeditor was working fine until i updated to the latest Telerik Ajax. Now I keep getting: "Object Reference not set to an instance of an object.". This error will go away if i remove the attribute toolfile in radeditor control. Please let me know why it is behaving like this. Thank you

 

Duy
Top achievements
Rank 1
 answered on 08 May 2016
0 answers
184 views

Hi ,

I am looking for Outlook integration to a web application.

Is their away that we can be in microsoft outlook or in the my web application and be able to connector pull in the email message text into our note section or attach the email? I know I have seen a system that can do this – The software was called Bull Horn staffing or something like that.

 

For example. If I got a email from one person I have to move that email from outlook to my web application. I want to show  the attachments from outlook email to web application. Is there any way we can achieve in kendo UI. Please let me know if this functionality is possible or not. Thanks in advance. 

 

I saw one functionlaity online that was released in Feb 2016. How this functionality relates to my functionality. Can I achieve that functionality in Kendo UI MVC.?

http://demos.telerik.com/aspnet-ajax/webmail/

 

 

Thanks,

Rekha

 

 

Rekha
Top achievements
Rank 1
 asked on 07 May 2016
6 answers
501 views
Im new to Telerik. Please help me in this regard.
We are doing online competitive Exam template. 





Total Number of Question : based on the exam (Random Questions)


Question Type : Optional, Multiple Choice, Match the following, Reordering, Fill in the blanks


Exam Duration : Based on the exam.

Please suggest us which telerik control is suitable for quiz, Match the following, Reordering.



binny
Top achievements
Rank 1
 answered on 06 May 2016
1 answer
70 views

Hi Telerik,

We faced one weird problem related to particularly one skin. i.e : MetroTouchMobile. The error we faced mentioned below:

Telerik.Web.UI.GridFilterMenu with ID='rfltMenu' was unable to find an embedded skin with the name 'MetroTouchMobile'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

This error generates only for "MetroTouchMobile" RadSkin. All other skins works good.

Actually, we are applying skin to each control at server side (code behind) dynamically, When we assign this skin we get error mentioned above for all the control.

What do we need to resolve such error?

 

Thanks,

Novoguys

Dimitar
Telerik team
 answered on 06 May 2016
1 answer
451 views

I'm working with UI for ASP.Net 2015.3 and I'm starting to get a strange error when I'm trying to do an ajax post in IE 10/11 - 

 

Unhandled exception at line 563, column 32 in http://localhost:9090/WebUI/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=3.5.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:f425c57c-3f06-4ae5-9b9a-1c136e57ba79:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2015.3.1111.35,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:148acb90-275a-4dd3-bcec-73473d72fc70:16e4e7cd:4877f69a:86526ba7:f7645509:ed16cbdc:88144a7a:24ee1bba:c128760b:1e771326:f46195d3:2003d0b8:aa288e2d:258f1c72:a675b4ab:bfc858fd:58366029

0x800a138f - JavaScript runtime error: Unable to get property '_events' of undefined or null reference

 

I've seen other posts with errors like this one - the suggestion is usually upgrade to latest version, but 2015.3 seems pretty new.

Trying to run this page in an ie emulation mode for an earlier version of ie does not resolve the problem.

Any ideas why this would start happening?  

Konstantin Dikov
Telerik team
 answered on 06 May 2016
2 answers
467 views

I have a RadComboBox with checkboxes and I want to get all the values in the DataValueField as a comma separated string.

$get("myComboBox").value gets me a comma separated string of the DataTextField and not the DataValueField.

How do I do this?

Ivan Zhekov
Telerik team
 answered on 06 May 2016
5 answers
843 views

Hi, I'm difficulty with exported date formats in my mulicultural application.  

The issue is that users within my application are allowed to change their language (thus, their culture setting within our application) but the radgrid's exports seem to "stick" to whatever their previous culture's date format is.  This "sticking" behavior is regardless of which culture is started with and then changed to.

To support multiple dates, I'm applying a DataFormatString of "{0:d}" to the GridDateTimeColumn so I can allow .NET to auto-format it with the builtin Globalization features.  So my column is defined like this:

<telerik:GridDateTimeColumn ItemStyle-Wrap="false" HeaderText="<%$ Resources: OurstringsResource, HeaderTextInvoiceDate %>" DataField="invDate" HeaderStyle-Width="8em" DataFormatString="{0:d}" />

 

When applying this format, the on-screen date is shown correctly, however it is not when exporting in the same format as shown on the screen.  Again, this is after they've changed their language/culture.  All other aspects of our application regarding the culture change work correctly (e.g. I am debugging the code and can see the correct culture is set) so I'm confident it is not a problem with our application.

I've found a number of posts on the Telerik site describing similar behavior, but in my case I'm using the Xlsx format, such as this:

protected void btnExportToExcel_Click(object sender, EventArgs e)

{

    RadGrid1.ExportSettings.FileName = "MyExportedFile";

    RadGrid1.ExportSettings.ExportOnlyData = true;

    RadGrid1.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;

    RadGrid1.MasterTableView.ExportToExcel();

}

  Since we are using the format of Xlsx I don't see many events that I can change the format, per the many suggestions found in the other threads.  I did see that OnItemCreated looked promising and I tried doing something like this:

if (e.Item is GridDataItem && exporting)

{

   var item = (GridDataItem)e.Item;

  //also tried manually setting the specific short date as defined by the current culture

  item["invDate"].Text = Convert.ToDateTime(item["invDate"].Text).ToString("d"); 
}

... but this didn't work.  

I've tried many other things such as changing my column type, setting the appropriate culture in either/both the Page.Culture and RadGrid.Culture, binding the DataFormatString string to a fixed string appropriate for the culture, etc etc etc.  

I'm really at a loss here and could use some help.  

Thanks in advance!

 

BTW, I'm using the Q1 2016 version of UI for ASP.NET AJAX, and .NET 4.5.

 

Eyup
Telerik team
 answered on 06 May 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?