Telerik Forums
UI for ASP.NET AJAX Forum
20 answers
151 views
We have an app that uses RadAsyncUpload.

If Silverlight isn't installed at all, the the control fails over to the next control type (flash?) before going back to the old school way of doing things.

This is all fine.

If, on the other hand, the user does have Silverlight installed, but it is some version other than Silverlight 5 then the control complains that the wrong version is installed and does nothing.

Now, in the ideal world the user would just update their version of Silverlight and all would be well with the world. Sadly, the users in question are run by IT departments that are only just coming to terms with the fact that there are browsers other than IE6, so upgrading anything is simply a non-starter.

Is there something we can do that will:
  1. use the installed version of Silverlight, where that version is correct (Silverlight 5 only, I assume)
  2. failover to the next available Async upload method where Silverlight is not installed or it is installed but is the wrong version.

I know that I can force the system to believe that Silverlight isn't installed, but I don't want to penalize those users whose IT departments are enlightened enough to have the most recent version installed.

--
Stuart

Peter Filipov
Telerik team
 answered on 12 Feb 2014
4 answers
214 views

Hi

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestPartialPostback.aspx.vb"
    Inherits="Rentware.TestPartialPostback" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <br />
        <telerik:RadFormDecorator ID="rfDecorator" runat="server" DecoratedControls="Buttons,Fieldset,RadioButtons,CheckBoxes" />
        <telerik:RadWindowManager runat="server" ID="radWindowMgr" />
        <telerik:RadAjaxManager ID="radAjaxMgr" runat="server">
            <ajaxsettings>
            <telerik:AjaxSetting AjaxControlID="cbTest">
                <UpdatedControls>                    
                    <telerik:AjaxUpdatedControl ControlID="testPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            </ajaxsettings>
        </telerik:RadAjaxManager>
        <h2>
            Account Management</h2>
        <telerik:RadTabStrip ID="RadTabsAccManage" runat="server" MultiPageID="RadMultiPageAccManage"
            SelectedIndex="0" Skin="WebBlue">
            <tabs>
            <telerik:RadTab Text="General">
            </telerik:RadTab>
            <telerik:RadTab Text="Contacts">
            </telerik:RadTab>
        </tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPageAccManage" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="RadPageViewAccManageGeneral" runat="server">
                <telerik:RadGrid ID="RadGridAccManageMain" runat="server" GridLines="None" AutoGenerateColumns="False"
                    ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
                    AllowAutomaticUpdates="True" DataSourceID="SqlDataSource1">
                    <alternatingitemstyle cssclass="DisplayNone" />
                    <itemstyle cssclass="DisplayNone" />
                    <headerstyle cssclass="DisplayNone" />
                    <footerstyle cssclass="DisplayNone" />
                    <groupingsettings casesensitive="false" />
                    <mastertableview gridlines="None" datasourceid="SqlDataSource1" autogeneratecolumns="false"
                        datakeynames="RegionID">
                    <Columns>
                        <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Center" AllowFiltering="false">
                            <ItemTemplate>
                                   
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>
                            <asp:CheckBox ID="cbTest" runat="server" Text="Enable" TextAlign="Left"
                                OnCheckedChanged="checkBoxCheckedChanaged" AutoPostBack="true" />
                            <asp:Panel ID="testPanel" runat="server" Enabled="false">
                                <fieldset>
                                    <legend>Add Or Edit Region:</legend>Region Description:
                                    <asp:TextBox runat="server" ID="txtText" Text='<%#Bind("RegionDescription") %>' />
                                </fieldset></asp:Panel>
                        </FormTemplate>
                    </EditFormSettings>
                </mastertableview>
                </telerik:RadGrid>
                <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT [RegionID], [RegionDescription] FROM [Region] WHERE ([RegionID] = @RegionID)"
                    runat="server">
                    <SelectParameters>
                        <asp:SessionParameter Name="RegionID" SessionField="regionId" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageViewAccManageContacts" runat="server">
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </div>
    </form>
</body>
</html>
Imports Telerik.Web.UI
Partial Public Class TestPartialPostback
    Inherits System.Web.UI.Page
    Dim regionId As Integer
    Dim commandName As String
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            regionId = Convert.ToInt32(Convert.ToString(Request.QueryString("regionId")))
            Session("regionId") = regionId
        End If
        commandName = IIf(Session("regionId").Equals(0), "PerformInsert", "Update").ToString()
    End Sub
    Private Sub RadGridAccManageMain_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridAccManageMain.ItemCreated
        If TypeOf e.Item Is GridEditableItem AndAlso commandName = "Update" Then
            e.Item.Edit = True
        End If
    End Sub
  
    Protected Sub RadGridAccManageMain_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGridAccManageMain.PreRender
        If Not Page.IsPostBack And commandName = "PerformInsert" Then
            RadGridAccManageMain.MasterTableView.IsItemInserted = True
            RadGridAccManageMain.Rebind()
            'RadGridAccManageMain.MasterTableView.InsertItem()
            RadGridAccManageMain.HeaderStyle.CssClass = "rgEditRow"
        End If
    End Sub
    Protected Sub checkBoxCheckedChanaged(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim thisCheckBox As CheckBox = CType(sender, CheckBox)
        Dim editItem As GridEditFormItem = DirectCast(thisCheckBox.NamingContainer, GridEditFormItem)
  
        CType(editItem.FindControl("testPanel"), Panel).Enabled = thisCheckBox.Checked
    End Sub
End Class

I’m using RadGrid for editing and inserting row in the place of using asp.net form view.  I’m passing the parameter to select the row for editing through query string.I’m assigning that query string to session variable in page load event and that session variable serves as select parameter in SQL Data source.If I get the required query string I’m putting RadGrid in Item Edit Mode and if not It will open the RadGrid in Item Insert mode.Inside Form Template I’ve a checkbox and asp.net panel that wraps all other contents of Form Template. I have an event to handle check box checked status changed.In that event I’m enabling and disabling the panel based on if the checkbox is checked or not.

 

I’ve RadAjaxManager in place with Ajax settings.  I’ve an AJAX setting in that RadAjaxManager with AjaxControlID as ID of the checkbox and AJAX updated control ID as the ID of the panel. So If I check or uncheck the checkbox In either Edit Mode or Insert Mode the panel should be enabled or disabled through AJAX partial post back.

 

Problem/Bug:

If the page loaded in insert mode for the first time and if I check the checkbox it is doing full post back and I can observe that clearly. (This is not expected behaviour).If I check the checkbox again it is doing partial ajaxified post back.But In Edit mode it is working fine (doing partial ajaxified post back) at all time.How I can fix this issue. For your reference I’ve attached the aspx and code behind file for you. It is stopping us from progressing further; your help would be very much appreciated.

Maria Ilieva
Telerik team
 answered on 12 Feb 2014
7 answers
461 views
I have a grid with an attachment column and every time I download an image, the Rad Grid status bar loading image just sits there a spins. Is there a way to hide or better yet, control the loading image?  

Please note, I am NOT referring to a RadAjaxLoadingPanel loading image, I know how to manage that...I am referring to the little spinner in the lower left hand side of the grid that is visible on post back.


Maria Ilieva
Telerik team
 answered on 12 Feb 2014
2 answers
72 views
I've been running Telerik tools and extensions with VS studio for about a year.  I am now upgrading to VS 2012.  What do I need to do to get the extensions with my VS 2012?  We are running on Telerik 2013.2.717.35. 

Thanks
Hunter
Missing User
 answered on 12 Feb 2014
1 answer
224 views
Hi,

Don't hold me to this, but this "may" have started after our recent upgrade to 2013.3.1324.45.

When I enter text and hit the Enter/Return key I get the expected appearance in the Design view, like this:

First line
Second line
Third line

When I subsequently save the record and reopen it, I see:

First lineCHAR(13) + CHAR(10) Second lineCHAR(13) + CHAR(10) Third line

in all 3 modes (Design, HTML and Preview).

Here's the RadEditor declaration.  By the way, we have made some minor changes to the Vista skin, but the problem persists even if I change EnableEmbeddedSkins to "true".

<telerik:RadEditor EnableEmbeddedSkins="false" Skin="Vista" ID="edtAnsRichText" runat="server"<br>                                                    Content='<%# Bind("AnswerText") %>' Width="450px" Height="200px" ToolTip="This is what the user will actually see when they take the questionnaire"><br>                                                    <Tools><br>                                                <telerik:EditorToolGroup Tag="MainToolbar"><br>                                                    <telerik:EditorSplitButton Name="Undo"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSplitButton Name="Redo"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorTool Name="Cut" /><br>                                                    <telerik:EditorTool Name="Copy" /><br>                                                    <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" /><br>                                                    <telerik:EditorTool Name="FormatStripper" /><br>                                                    <telerik:EditorTool Name="PasteStrip" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Formatting"><br>                                                    <telerik:EditorTool Name="Bold" /><br>                                                    <telerik:EditorTool Name="Italic" /><br>                                                    <telerik:EditorTool Name="Underline" /><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorSplitButton Name="ForeColor"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSplitButton Name="BackColor"><br>                                                    </telerik:EditorSplitButton><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorDropDown Name="FontName"><br>                                                    </telerik:EditorDropDown><br>                                                    <telerik:EditorDropDown Name="FontSize"><br>                                                    </telerik:EditorDropDown><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Alignment"><br>                                                    <telerik:EditorTool Name="Indent" /><br>                                                    <telerik:EditorTool Name="Outdent" /><br>                                                    <telerik:EditorTool Name="JustifyLeft" /><br>                                                    <telerik:EditorTool Name="JustifyCenter" /><br>                                                    <telerik:EditorTool Name="JustifyRight" /><br>                                                    <telerik:EditorTool Name="JustifyFull" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Tables"><br>                                                    <telerik:EditorTool Name="InsertTable" /><br>                                                    <telerik:EditorTool Name="ToggleTableBorder" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Lists"><br>                                                    <telerik:EditorTool Name="InsertUnorderedList" /><br>                                                    <telerik:EditorTool Name="InsertOrderedList" /><br>                                                    <telerik:EditorTool Name="InsertHorizontalRule" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="ImagesAndLinks"><br>                                                    <telerik:EditorSeparator /><br>                                                    <telerik:EditorTool Name="InsertLink" /><br>                                                    <telerik:EditorTool Name="Unlink" /><br>                                                </telerik:EditorToolGroup><br>                                                <telerik:EditorToolGroup Tag="Spell"><br>                                                    <telerik:EditorTool Name="AjaxSpellCheck" /><br>                                                </telerik:EditorToolGroup><br>                                            </Tools><br>                                                </telerik:RadEditor>

Any suggestions on how to debug/resolve this issue?

Thanks in advance.

Jim
Ianko
Telerik team
 answered on 12 Feb 2014
1 answer
67 views
Hi there.

I have a pivot grid showing monthly figures. I also give the user the option to change this to quarterly or annually (updates the GroupInterval attribute).

I need to show % change between months and also between quarters and years when they change the GroupInterval to these intervals.

I was thinking to create a custom sub total to display these % changes. Would that be the best solution? How would I do that?

Thanks.
Antonio Stoilkov
Telerik team
 answered on 12 Feb 2014
1 answer
296 views
hi,
"Sys.InvalidOperationException: Sys.InvalidOperationException: A control is already associated with the element." i have this error on delete button click inside grid.so provide solutions.

my code is:
function deletepermission(id) {
        
          var add = $("#" + "<%=Per_delete.ClientID %>").val();
          if (add == 0) { bootbox.alert("You have no permissions to Update Record");}
          else {
            bootbox.confirm("Are you sure you want to Delete the Record?", function (result) {
                if (result == true) {
                    $("#" + "<%=gridId.ClientID %>").val(id);
                    $("#" + "<%=btn_Delete_actual.ClientID %>").click();
                  }

              });
           }         
      }


<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Action" HeaderText="Action" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>                                                                          
                                                                            <asp:Button runat="server" ID="btnDelete" ToolTip="DeleteRecord"  Text="Delete" onclientclick='<%# Eval("LandlordId","deletepermission({0})") %>' Height="22px"></asp:Button>
                                                                       
                                                                        
                                                                        </ItemTemplate>                                                           
                                                                    </telerik:GridTemplateColumn>


 <asp:Button runat="server" ID="btn_Delete_actual" onclick="btn_Delete_actual_Click" style="display:none;"></asp:Button>                 
 <asp:HiddenField ID="gridId" runat="server"></asp:HiddenField>


serverside code:
protected void btn_Delete_actual_Click(object sender, EventArgs e)
        {
            int lid = Convert.ToInt32(gridId.Value);
            if (lid > 0)
            {
                if (s.DeleteLandlord(lid) == true)
                {
                    msg.Style.Add("display", "block");
                    lbl_msg.Text = "Record Deleted sucsessfully..";
                    lbl_msg.Style.Add("color", "green");
                    GetLandlord();
                }
            }                 
        }

Thanks,
Rahul
Princy
Top achievements
Rank 2
 answered on 12 Feb 2014
1 answer
38 views
Items in combo box is displaying in next line.
Attached snapshot for your reference.
Shinu
Top achievements
Rank 2
 answered on 12 Feb 2014
1 answer
36 views
Hi,

Is your scheduler RadScheduler ASP.NET support icalendar
Have you a soluce to synchronize with google calendar ?

Thanks
Sylo
Kate
Telerik team
 answered on 12 Feb 2014
3 answers
97 views
Hi,

I have a Grid in a page where I have updated the Radcontrols from version 2009.2.701 to 2013.2.611

The grid (code below) contains some databound columns and then a template column.
Now, when the grid is displayed, only the template column shows even though the databound columns are set to visible. Previously all visible columns were displayed as expected.

Does anyone have any idea how I can fix this?

Thank you

Paul


<rad:radgrid id="CheckListGrid" runat="server" AutoGenerateColumns="False" GroupingEnabled="False"
  style="position:absolute; top:73px; left:0px" width="900px" height="515px"
   EnableEmbeddedSkins="False" Skin="XLogixBlue" CellSpacing="0" GridLines="None">
  <clientsettings>
    <scrolling AllowScroll="true" scrollheight="500px" usestaticheaders="true"/>
    <Selecting AllowRowSelect="true" />
  </clientsettings>
  <mastertableview width="880px">
    <columns>
      <rad:GridBoundColumn UniqueName="iCheckItemID" DataField="iCheckItemID" display="false" ></rad:GridBoundColumn>
      <rad:GridBoundColumn UniqueName="sDataType" DataField="sDataType" display="false"></rad:GridBoundColumn>
       
      <rad:GridBoundColumn UniqueName="CheckDescription" DataField="CheckDescription" HeaderText="Description" Visible="true">
        <HeaderStyle width="280px"/>
        <ItemStyle width="280px" height="40px" Font-Size="Larger" font-bold="true"/>
      </rad:GridBoundColumn>
      <rad:GridBoundColumn UniqueName="CategoryDescription" DataField="CategoryDescription" HeaderText="Category">
        <HeaderStyle width="70px"/>
        <ItemStyle width="70px" height="40px"/>
      </rad:GridBoundColumn>
      <rad:GridBoundColumn UniqueName="bMandatory" DataField="bMandatory" HeaderText="Mandatory">
        <HeaderStyle width="55px"/>
        <ItemStyle width="55px" height="40px"/>
      </rad:GridBoundColumn>
      <rad:GridBoundColumn UniqueName="sRange" DataField="sRange" HeaderText="Range">
        <HeaderStyle width="100px"/>
        <ItemStyle width="100px" height="40px" Font-Size="Larger" font-bold="true"/>
      </rad:GridBoundColumn>
       
      <rad:GridTemplateColumn UniqueName="ValueTemplate" HeaderText="Entry">
        <HeaderStyle width="270px"/>
        <ItemStyle width="270px" height="40px"/>
        <ItemTemplate>
          <asp:panel id="UploadPanel" runat="server" style="display:none; text-align:left">
            <asp:FileUpload id="CheckItemUpload" runat="server" width="270px" onkeydown="return false;"/>
          </asp:panel>
          <asp:panel id="ConfirmPanel" runat="server" style="display:none; text-align:center">
            <input type="button" id="ConfirmYes" value="Yes" style="width:80px; height:35px; background-color:Silver" onclick="ToggleConfirmButton(this);"/>
            <input type="button" id="ConfirmNo" value="No" style="width:80px; height:35px; background-color:Silver" onclick="ToggleConfirmButton(this);"/>
            <input type="hidden" id="ConfirmResult" runat="server" value="" />
          </asp:panel>
          <asp:panel id="TextBoxPanel" runat="server" style="display:none; text-align:left">
            <asp:textbox id="CheckItemTextBox" runat="server" width="210px"></asp:textbox>
            <img id="WorksOrderKeyboard" alt="Show Keyboard" src="/XLogix/Images/Icon Buttons/Keyboard Btn.png" runat="server"/>
          </asp:panel>
          <asp:panel id="DropDownPanel" runat="server" style="display:none; text-align:left">
            <asp:dropdownlist id="CheckItemDropDown" runat="server" dataTextField="sDescription" DatavalueField="iCheckItemOptionID" width="270px"
              font-size="Large"></asp:dropdownlist>
          </asp:panel>
        </ItemTemplate>
      </rad:GridTemplateColumn>
       
    </columns>
  </mastertableview>
</rad:radgrid>
Viktor Tachev
Telerik team
 answered on 12 Feb 2014
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?