Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
205 views
hello Telerik supporter i have a issue i've been a week working on it but i couldn't find a proper solution for it and i hope if you can help me with a proper solution for it i am using RadAsyncUpload to upload my client files and i am using the OnClientValidationFailed to display a message for the user but my problem is the invalid uploaded file is displayed in the <li>..</li> with the message how can prevent this from happening ? in other word how can i display only the message without letting the user see the unvalid file and let him click the remove button please show me some code if available and thank you 
Peter Filipov
Telerik team
 answered on 29 Aug 2012
1 answer
57 views
Hi

I have multiple select radupload control after I selct the file I want set file name to link button aside to it.
click on link file will give the view of uploaded file .

Please help me in this functionality.

Thanks.

Peter Filipov
Telerik team
 answered on 29 Aug 2012
1 answer
85 views
I have been working on an old system that uses "RadControls for ASP.NET AJAX Q3 2010 NET 40" where the controls are suddenly not working for IE9 only. The system works perfectly in Firefox and IE8, but in IE9 today (yesterday it was fine!) it suddenly won't work in any IE9 I can test it with. I've tried rebooting machines, clearing cache, rebooting web servers: it's only IE9. It's almost as if Microsoft have released an update that has wrecked it.

In the developer tools for IE9, it's saying this:

SCRIPT5022: ASP.NET Ajax client-side framework failed to load.
Default.aspx, line 90 character 34
SCRIPT5009: 'Sys' is undefined
Default.aspx, line 139 character 1
SCRIPT5009: 'Telerik' is undefined
Default.aspx, line 848 character 6
SCRIPT5009: 'Telerik' is undefined
Default.aspx, line 1145 character 1

But in Firefox, there's no whiff of there being any errors whatsoever and the thing works perfectly. Works fine in Chrome 17, as well.

What could be causing this sudden strangeness in IE9 only?

Thanks.
Marc Fearby
Top achievements
Rank 1
 answered on 29 Aug 2012
4 answers
273 views
Hello Everyone,

I need some help in figuring out how to implement a RadComboBox bound to a Linq datasource with a "add new item in the header of the radcombobox which adds an item to the datasource.  The radcombobox in also inside a RadGrid.  Here is a screen-shot of what I am trying to accomplish.  If anyone could help or post a sample project I would appreciate it! 

What I would like the behaviour to be is that on edit or insert to be able to add the item in the RadComboBox and do a postback to update the datasource bound to the RadComboBox.  Ideally I would like to see two versions one for SQLDatasource and one for LinqDatasource to understand the differences.

I have no idea on how to implement this to work?
I tried to add a sample project but this post would not allow me to do so?

ASPX:
<div>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True" CellSpacing="0"
            DataSourceID="SqlDataSource1" GridLines="None" Width="800px">
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top"
                DataKeyNames="ProblemID" DataSourceID="SqlDataSource1">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column">
        </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn DataField="ProblemID" DataType="System.Int32"
            FilterControlAltText="Filter ProblemID column" HeaderText="ProblemID"
            ReadOnly="True" SortExpression="ProblemID" UniqueName="ProblemID">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn DataField="DefectID" DataType="System.Int32"
            FilterControlAltText="Filter DefectID column" HeaderText="DefectID"
            SortExpression="DefectID" UniqueName="DefectID">
            <EditItemTemplate>
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px" width="300px">
             
                <telerik:RadComboBox ID="DefectComboBox" runat="server" AllowCustomText="True"
                    AppendDataBoundItems="True" DataSourceID="SqlDataSource2"
                    DataTextField="Defect" DataValueField="DefectID" Height="150px"
                    HighlightTemplatedItems="True" SelectedValue='<%# Bind("DefectID") %>'
                    Skin="Windows7" Width="365px">
                    <Items>
                        <telerik:RadComboBoxItem Selected="True" Text="[Not Defined]" Value=""
                            Owner="DefectComboBox" />
                    </Items>
                    <WebServiceSettings>
                        <ODataSettings InitialContainerName="">
                        </ODataSettings>
                    </WebServiceSettings>
                    <HeaderTemplate>
                        <telerik:RadTextBox ID="RadTextBox1" Runat="server" AutoPostBack="True"
                            EmptyMessage="add a new defect" LabelWidth="" Text='<%# Bind("Defect") %>'
                            Width="185px">
                        </telerik:RadTextBox>
                        <telerik:RadButton ID="addDefect" runat="server" Text="Add">
                            <Icon PrimaryIconCssClass="rbAdd" />
                        </telerik:RadButton>
                    </HeaderTemplate>
                    <FooterTemplate>
                        <br />
                    </FooterTemplate>
                </telerik:RadComboBox>
                </telerik:RadAjaxPanel>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="DefectIDLabel" runat="server" Text='<%# Eval("DefectID") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="ProblemName"
            FilterControlAltText="Filter ProblemName column" HeaderText="ProblemName"
            SortExpression="ProblemName" UniqueName="ProblemName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ProblemDescription"
            FilterControlAltText="Filter ProblemDescription column"
            HeaderText="ProblemDescription" SortExpression="ProblemDescription"
            UniqueName="ProblemDescription">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ProblemDate" DataType="System.DateTime"
            FilterControlAltText="Filter ProblemDate column" HeaderText="ProblemDate"
            SortExpression="ProblemDate" UniqueName="ProblemDate">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</HeaderContextMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            DeleteCommand="DELETE FROM [Problems] WHERE [ProblemID] = @ProblemID"
            InsertCommand="INSERT INTO [Problems] ([DefectID], [ProblemName], [ProblemDescription], [ProblemDate]) VALUES (@DefectID, @ProblemName, @ProblemDescription, @ProblemDate)"
            SelectCommand="SELECT * FROM [Problems]"
            UpdateCommand="UPDATE [Problems] SET [DefectID] = @DefectID, [ProblemName] = @ProblemName, [ProblemDescription] = @ProblemDescription, [ProblemDate] = @ProblemDate WHERE [ProblemID] = @ProblemID">
            <DeleteParameters>
                <asp:Parameter Name="ProblemID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="DefectID" Type="Int32" />
                <asp:Parameter Name="ProblemName" Type="String" />
                <asp:Parameter Name="ProblemDescription" Type="String" />
                <asp:Parameter Name="ProblemDate" Type="DateTime" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="DefectID" Type="Int32" />
                <asp:Parameter Name="ProblemName" Type="String" />
                <asp:Parameter Name="ProblemDescription" Type="String" />
                <asp:Parameter Name="ProblemDate" Type="DateTime" />
                <asp:Parameter Name="ProblemID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [DefectID], [Defect] FROM [Defects]">
        </asp:SqlDataSource>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            DeleteCommand="DELETE FROM [Defects] WHERE [DefectID] = @DefectID"
            InsertCommand="INSERT INTO [Defects] ([Defect]) VALUES (@Defect)"
            SelectCommand="SELECT [DefectID], [Defect] FROM [Defects]"
            UpdateCommand="UPDATE [Defects] SET [Defect] = @Defect WHERE [DefectID] = @DefectID">
            <DeleteParameters>
                <asp:Parameter Name="DefectID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="Defect" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Defect" Type="String" />
                <asp:Parameter Name="DefectID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
            Skin="Default">
             
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    </div>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web;
 
public partial class PBM : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
         
    }
    //protected void addDefect_Click(object sender, EventArgs e)
    //{
    //    DefectsTableAdapters.InsertDefectsTableAdapter instdfcts = new
    //    DefectsTableAdapters.InsertDefectsTableAdapter();
    //    int numRows = instdfcts.InsertDefects(RadTextBox1.Text);
    //}
}



Thanks
Bill.
Pavlina
Telerik team
 answered on 28 Aug 2012
0 answers
56 views

Hi telerik Team,

I have created  HTML dropdown and HTML input box as Additional fields for RADUpload, everything is working fine but I want all of them in one row , please advise how can I achieve it.

-----------------------------


 

function addTitle(radUpload, args) {              

                var curLiEl = args.get_row();

                var firstInput = curLiEl.getElementsByTagName("input")[0];

                //Create a simple HTML template.

                var table = document.createElement("table");

                table.className = 'AdditionalInputs';

                //A new row for a Title field

                row = table.insertRow(-1);

                cell = row.insertCell(-1);

              

                select = document.createElement("select");

              

                select.name = "SubmissionType";

                select.className = "DropDownList";

                select.id = select.name = radUpload.getID(select.name);

                var labelDocType = CreateLabel("Document Types: ", select.id);

                cell.appendChild(labelDocType);

                cell.appendChild(select);

                addOption(select, "------- Select Document Type -------", "0");

                bindDropDown(select);

                input = CreateInput("SubmissionForm", "hidden");

                input.name = "SubmissionForm";

                input.id = input.name = radUpload.getID(input.name);               

                cell.appendChild(input);

                select.onchange = function () { assignHiddenInput(); }; // Call function on Dropdown change event.

                //A new row for a Title field

                row = table.insertRow(-1);

                cell = row.insertCell(-1);

                var inputTitle = CreateInput("Title", "text");

                inputTitle.className = "TextField";

                inputTitle.id = inputTitle.name = radUpload.getID(inputTitle.name);

                var label = CreateLabel("Notes about Documents if any: ", inputTitle.id);

                cell.appendChild(label);

                //cell = row.insertCell(-1);

                cell.appendChild(inputTitle);

              

                var fileInputSpan = curLiEl.getElementsByTagName("span")[0];

                var firstNode = curLiEl.childNodes[0];

                label = CreateLabel("Upload File : ",radUpload.getID());

                curLiEl.insertBefore(label, firstNode);

                curLiEl.insertBefore(table, label);              

            }

 

Purvish
Top achievements
Rank 1
 asked on 28 Aug 2012
10 answers
258 views
Hi,
Couple of out customers using Avast antivirus are reporting Trojan detected they are unable to use the site properly because of this.
We are using  version 2011.3.1115.40

I used following service(http://virusscan.jotti.org/en) to scan txt file with the js inside and "avast" and "g data" reported
JS:Blacole-AV
in the js content

I can send you the suspected js if needed.

Hope this is only false alert since only these two AV products report problems found?

Br
Joona
Ivan Zhekov
Telerik team
 answered on 28 Aug 2012
3 answers
160 views
Hi,

Our customer gets a message from their anti-virus program when they visiting our website with Telerik controls. More information below: 
Program: Avast
Malware name: JS:Blacole-AV
Type: Trojan Horse
From: Telerik.Web.Ui.Webresource.axd

I hope this is a false postive?
What should we do?

Kind regards,

Jelle
Iana Tsolova
Telerik team
 answered on 28 Aug 2012
2 answers
126 views
I have an ASP.NET image control in a templated column within RadGrid (lastest release)

I have been able to adjust the background color of the cell as shown in the code below. However, the client prefers that I use customized icons that would vary based on several data conditions.

I am hoping there is a way that I can access the ImageUrl property of the control in this cell.
 
Note that this control differs from my color-coding example quoted below, but I think that whatever statement I need would fit into that overall logic.

 

<telerik:GridTemplateColumn DataField="id"
    FilterControlAltText="Filter column column" HeaderText="Info"
    UniqueName="ID_column" SortExpression="id">
    <ItemTemplate>
           <asp:Image ID="targetControl" runat="server" ImageUrl="images/info16.gif" />
    </ItemTemplate>
Protected Sub Event_Grid_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles Event_Grid.ItemCreated
    Dim Temp As String = Nothing
    Dim Event_Date As Date = Nothing
    Dim End_Date As Date = Nothing
    If TypeOf (e.Item) Is GridDataItem Then
        Try
            Event_Date = CDate(e.Item.DataItem("event_date_sort"))
            End_Date = CDate(e.Item.DataItem("end_date"))
            Dim gdi As GridDataItem = CType(e.Item, GridDataItem)
            If End_Date < Today Then
                gdi.Cells(2).BackColor = System.Drawing.Color.Silver
            ElseIf (End_Date >= Today) And (Event_Date <= Today) Then
                gdi.Cells(2).BackColor = System.Drawing.Color.PaleGreen
            ElseIf Event_Date < DateAdd(DateInterval.Month, 1, Today) Then
                gdi.Cells(2).BackColor = System.Drawing.Color.Yellow
            Else
                gdi.Cells(2).BackColor = System.Drawing.Color.WhiteSmoke   
            End If
            If e.Item.DataItem("type_code") = "x" Then
                gdi.Cells(2).BackColor = System.Drawing.Color.Tomato
            End If
        Catch ex As Exception
            'leave default shading
        End Try
    End If
End Sub

Tomica
Top achievements
Rank 2
 answered on 28 Aug 2012
0 answers
52 views
Hi!

How can I change the background color of the menu in css without using images or sprites, only with RGB codes?

The menu is always gray :( I can change the color when it is selected but the background and borders are always gray.

Thanks.
João
João
Top achievements
Rank 1
 asked on 28 Aug 2012
9 answers
200 views
Hi,

I am binding AutoCompleteBox  with my DB. In my table there are names like( xyz's company,robin's house etc.).
When i type x it shows me the name list but when i select the xyz's company i just got error because of single quotes.

Please help!!!!!!!!

Thanks in Advance.


 
Kalina
Telerik team
 answered on 28 Aug 2012
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?