Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
Hello all,

I setup a vertical CoverFlow RadRotator in a user control bound to a generic List<> but i cant seem to get the rotator to "wrap" using WrapFrames="true" and i only get 1 cycle of the items in the List<>. I've tried changing the binding to IEnumerables and string[].
For this example, the List<> is just List<string> vpaths.

Heres the markup for the rotator.

<

telerik:RadRotator ID="rotatorVerticalMediaItems" runat="server" Height="400px" Width="400px" CssClass="ucCoverArtRotatorV_RotatorStyle" RotatorType="CoverFlow" PauseOnMouseOver="false" Skin="Black" ScrollDuration="2000" ScrollDirection="Down,Up" FrameDuration="1" ItemHeight="300px" ItemWidth="202px" WrapFrames="true">

 

<ItemTemplate>

 

<div title='<%# Container.DataItem %>'>

<a href='<%# Container.DataItem %>'><img class="ucCoverArtRotatorV_CoverArtStyle" alt="" 
    
src='<%# Container.DataItem %>' /></a>

</div>

</ItemTemplate>

</telerik:RadRotator>

 
Thanks in advance.

Slav
Telerik team
 answered on 01 Dec 2011
1 answer
89 views
Hello,
I'm using the telerik grid but when I try to update any of the information, the grid disappears completely. Following are the steps I follow:
1. Click on the 'Edit' button for any of the row and update any information.
2. Press Update button.

As soon as I press 'Update' button, grid disappears. And when I reload the page, it appears again.
Following is the html code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
  <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="tgLicenseInfo">
      <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="tgLicenseInfo" LoadingPanelID="RadAjaxLoadingPanel1" />
      </UpdatedControls>
    </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="tgLicenseInfo" runat="server" AutoGenerateColumns="false" AllowSorting="true"
                                                            AllowPaging="true" AllowFilteringByColumn="true" OnNeedDataSource="tgLicenseInfo_NeedDataSource"
                                                            OnUpdateCommand="tgLicense_UpdateCommand">
  <EditItemStyle BackColor="AliceBlue" />
  <PagerStyle Mode="NextPrevAndNumeric" />
  <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" CommandItemDisplay="TopAndBottom" EditFormSettings-PopUpSettings-Modal="true">
    <Columns>
    <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-HorizontalAlign="Center"
                                                                        UniqueName="EditCommandColumn" HeaderText="Edit" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="ID" UniqueName="ID" Visible="false" />
    <telerik:GridBoundColumn DataField="LNumber" HeaderText="License #" SortExpression="LNumber"
                                                                        UniqueName="LNumber" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="StateDesc" HeaderText="State" SortExpression="StateDesc"
                                                                        UniqueName="StateDesc" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LType" HeaderText="Type" SortExpression="LType"
                                                                        UniqueName="LType" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LHolder" HeaderText="Holder" SortExpression="LHolder"
                                                                        UniqueName="LHolder" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LExpireDate" HeaderText="ExpireDate" SortExpression="LExpireDate"
                                                                        UniqueName="LExpireDate" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="LicenseStatus" HeaderText="Status" SortExpression="LicenseStatus"
                                                                        UniqueName="LicenseStatus" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridBoundColumn DataField="VerifiedByUserID" HeaderText="Verified By" SortExpression="VerifiedByUserID"
                                                                        UniqueName="VerifiedByUserID" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    <telerik:GridButtonColumn Text="Delete" CommandName="Delete" HeaderText="Delete"
                                                                        ButtonType="ImageButton" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
    </Columns>
    <EditFormSettings EditFormType="Template">
      <EditColumn UniqueName="EditColumn"> </EditColumn>
      <FormTemplate>
        <table border="0" cellpadding="2">
          <tr>
            <td> License #:  </td>
            <td><asp:TextBox ID="txtLNumber" Width="150px" Text='<%# Bind( "LNumber") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> State:  </td>
            <td><asp:TextBox ID="txtState" Width="150px" Text='<%# Bind( "StateDesc") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Type:  </td>
            <td><asp:TextBox ID="txtLType" Width="150px" Text='<%# Bind( "LType") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Holder:  </td>
            <td><asp:TextBox ID="txtLHolder" Width="150px" Text='<%# Bind( "LHolder") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Exp Date:  </td>
            <td><asp:TextBox ID="txtLExpireDate" Width="150px" Text='<%# Bind( "LExpireDate") %>'
                                                                                        runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Status:  </td>
            <td><asp:TextBox ID="txtStatus" Width="150px" Text='<%# Bind( "LicenseStatus") %>' runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td> Verified By:  </td>
            <td><asp:TextBox ID="txtVerifiedByUserID" Width="150px" Text='<%# Bind( "VerifiedByUserID") %>'
                                                                                        runat="server"></asp:TextBox>
            </td>
          </tr>
        </table>
        <asp:Button ID="Button3" CommandName="Update" Text="Update" runat="server" />
        <asp:Button ID="Button3a" CommandName="Cancel" Text="Cancel" runat="server" />
      </FormTemplate>
    </EditFormSettings>
  </MasterTableView>
</telerik:RadGrid>


And following is the code behind:
protected void tgLicense_UpdateCommand(object source, GridCommandEventArgs e)
{
 try
  {
   if (e.CommandName == RadGrid.UpdateCommandName)
    {
      if (e.Item is GridEditFormItem)
       {
         GridEditFormItem item = (GridEditFormItem)e.Item;
         int iLID = Convert.ToInt32(item.GetDataKeyValue("ID"));
         if (iLID != 0)
          {
           TextBox txtLHolder = (TextBox)item.FindControl("txtLHolder");
           TextBox txtLType = (TextBox)item.FindControl("txtLType");
           TextBox txtLExpireDate = (TextBox)item.FindControl("txtLExpireDate");
           TextBox txtLicenseStatus = (TextBox)item.FindControl("txtStatus");
           TextBox txtVerifiedByUserID = (TextBox)item.FindControl("txtVerifiedByUserID");
           TextBox txtState = (TextBox)item.FindControl("txtState");
           //    DropDownList drdState = (DropDownList)item.FindControl("drdState");
           SaisUser oUser = (SaisUser)Cache[this.GUID + "User"];
           AgentLicense oLI = oUser.AgentInProcess.LicenseInfo[iLID];
           oLI.LExpireDate = txtLExpireDate.Text;
           oLI.LHolder = txtLHolder.Text;
           oLI.LicenseStatus = Convert.ToBoolean(txtLicenseStatus.Text);
           oLI.VerifiedByUserID = txtVerifiedByUserID.Text;
           oLI.LType = txtLType.Text;
           //      oLI.LState = drdState.SelectedItem.Value;
           oLI.LState = txtState.Text;
           //here license is saved
           ProcessResult oPR = oLI.Save(this.CnxnString, this.LogPath);
           if (oPR.Exception == null)
             {
              oUser.AgentInProcess.LicenseInfo[iLID] = oLI;
              Cache[this.GUID + "User"] = oUser;
              this.tgLicenseInfo.Rebind();
             }
            // else
            //   this.lblUpdate.Text = "Error:" + oPR.Exception.Message;
           }
       }
     }
   }
   catch (Exception Exc)
    {
      string script = "$(function(){initializedialog();showDialog(\"" + Exc.Message + "\");});";
      ScriptManager.RegisterStartupScript(this, this.Page.GetType(), "dialog", script, true);
    }
}

Can some one help me with this issue?
Iana Tsolova
Telerik team
 answered on 01 Dec 2011
2 answers
65 views
Hi,

We are working on a rich ASP.Net application using most of Telerik controls and we are facing a strange issue. Given below is the scenario:

1. User visits our site.
2. Navigates to different pages using different Menu options (RadMenu - on Top of page, RadPanelBar - on Left).
3. in the same browser window/tab, User opens any other website e.g. msn.com.
4. Now, user moves back to previous page (our website) using browser's back button.

Once user is back on our website, both left and top menu bars are not functional i.e. clicking on menu items performs no action. Clicking or double clicking a menu makes no difference. It start behaving in a way that if there is no Page linked to any of the menu.

What could be the reason? Any fixes/help?

We are using RAD Asp.Net AJAX Q2 2011

Thanks in acticipation!
DIT
Top achievements
Rank 1
 answered on 01 Dec 2011
5 answers
61 views
OK, I just inherited a project that uses these controls and I am not sure how to word this.  I have a page thatuse radtabstrip and multipage. I have several pages and when I click on to save, the tables are getting updated with all the values with the first tab and doesn't see anything else.  I also get the identity of the record and save it as a session variable for a child table and it doesn't see it either. Is it possible for me to see the controls on all the tabs? If so, how do I do it?
Genady Sergeev
Telerik team
 answered on 01 Dec 2011
5 answers
339 views
I have a RadDateTimePicker that needs to stay empty when the page loads. When the user selects a time from the TimePopupButton, the Date & Time are populated in the RadDateTimePicker.  The problem is the date portion that's populated is always today's date. How can I default this to another date, for example DateTime.Now.AddDays(1)?

If I set the "SelectedDate" property to DateTime.Now.AddDays(1), then the date that's populated works as expected. But setting "SelectedDate" causes the RadDateTimePicker to display this date when the page loads. I need it to be empty on page load and only populated if the user selects something from the PopUpButtons. 
Kevin
Top achievements
Rank 2
 answered on 01 Dec 2011
7 answers
229 views
Hello,

I'm trying to set a customvalidator for the RadUpload control in order to check the maximum upload size, but I got an error (Attached screen-shot). My code is based on http://sample.topscms.com/blog/post/1607--client-side-file-size-validation-for-telerik-upload.

Default2.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
 
<!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">
    <div>
       <asp:ScriptManager ID="asdasD" runat="server">
       </asp:ScriptManager>
 
       <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                var currentLoadingPanel = null;
                var currentUpdatedControl = null;
 
                function RequestStart(sender, args) {
                    currentLoadingPanel = $find("<%= TasksRadAjaxLoadingPanel.ClientID %>");
 
                    if (args.get_eventTarget() == "<%= SubmitButton.UniqueID %>") {
                        args.set_enableAjax(false);
                    }
 
                    currentUpdatedControl = "<%= MainPanel.ClientID %>";
 
                    //show the loading panel over the updated control
                    currentLoadingPanel.show(currentUpdatedControl);
                }
 
                function ResponseEnd() {
                    //hide the loading panel and clean up the global variables
                    if (currentLoadingPanel != null)
                        currentLoadingPanel.hide(currentUpdatedControl);
                    currentUpdatedControl = null;
                    currentLoadingPanel = null;
                }
 
                function validateRadUploadFileSize(source, arguments) {
                    var totalFileSize = 0;
                    var maxFileSize = 100000;
                    var radUpload = $find('<%= AttachedFilesRadUpload.ClientID %>');
                    var fileInputs = radUpload.getFileInputs();
                    for (var i in fileInputs) {
                        if (fileInputs[i] && fileInputs[i].files[0]) {
                            totalFileSize += fileInputs[i].files[0].fileSize;
                        }
                    }
 
                    arguments.IsValid = totalFileSize <= maxFileSize;
 
                }
            </script>
        </telerik:RadCodeBlock>
 
 
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="SubmitButton">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="MainPanel" LoadingPanelID="TasksRadAjaxLoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
        </telerik:RadAjaxManager>
 
        <telerik:RadAjaxLoadingPanel ID="TasksRadAjaxLoadingPanel" Skin="Vista" runat="server">
        </telerik:RadAjaxLoadingPanel>
 
        <asp:Panel ID="MainPanel" Width="100%" HorizontalAlign="Left" runat="server">
 
            <telerik:RadProgressManager ID="Radprogressmanager1" Width="403px" runat="server" />
            <telerik:RadUpload ID="AttachedFilesRadUpload" InitialFileInputsCount="1" MaxFileInputsCount="10" ControlObjectsVisibility="AddButton, RemoveButtons, CheckBoxes"
                       Width="405px" runat="server" />                       
            <telerik:RadProgressArea runat="server" Width="405px" ID="ProgressArea1" ></telerik:RadProgressArea>
 
             <asp:CustomValidator runat="server" ID="CustomValidator1" Display="Dynamic" ClientValidationFunction="validateRadUploadFileSize"
                        OnServerValidate="CustomValidator1_ServerValidate" ValidationGroup="CreateNewTaskValidationGroup">       
                        The maximum upload size is 100 KB
             </asp:CustomValidator>
 
             <asp:Button runat="server" ID="SubmitButton" ValidationGroup="CreateNewTaskValidationGroup" Text="Submit" />
 
         </asp:Panel>
 
    </div>
    </form>
</body>
</html>

Default2.aspx.cs:

using System;
using System.Web.UI.WebControls;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = (AttachedFilesRadUpload.InvalidFiles.Count == 0);
}
}

Please, I need you help in order to solve this problem.
It is very appreciated to send me the modified code.

Regards,
Bader
Kevin
Top achievements
Rank 2
 answered on 01 Dec 2011
1 answer
501 views
We have found a Xss vulnerability in the Telerik.Web.UI.WebResource.axd [_TSM_CombinedScripts_ parameter], where it is possible to edit the javascript. We are currently using an older version of the library (2009.3.1103.20). Can anyone confirm that this issue is fixed in the latest release, and in what version was this issue solved?
Simon
Telerik team
 answered on 01 Dec 2011
7 answers
168 views
I'm not even sure this can be done, but here goes:

What I am trying to do is avoid database hits on every character entered in a Load-On-Demand RadComboBox.  When one character is entered, I go to the database and get the resulting dataset.  Any further characters entered will filter that same dataset.  The only time the database is accessed is when the first character is entered.  Is this even possible? If so, any pointers?
Ivana
Telerik team
 answered on 01 Dec 2011
4 answers
180 views
Hi Everone

Can some one tell me why i get this error
Microsoft JScript runtime error: Object doesn't support property or method 'get_items'

when i execute the following js code
var listbox = document.getElementById("<%=rlbCustomEmails.ClientID %>");
var item = new Telerik.Web.UI.RadListBoxItem();
item.set_text(email);
listbox.get_items().add(item); //I get the error here

it is searching for this control
<telerik:radlistbox runat="server" style="position: absolute; top: 290px; left: 400px;"
        height="240px" width="255px" ID="rlbCustomEmails"></telerik:radlistbox>

KobusVisagie
Top achievements
Rank 1
 answered on 01 Dec 2011
1 answer
57 views
Hi,

The look of grouping (in the data area of a grid) consists of three elements:
  • the group header
  • the cell to the left of the group header, containing icons for expanding / collapsing; let's name it "the control cell"
  • cells the the left of data rows; let's name them "filling cells"

I'm using the Simple skin and Q1 2010 version of the controls.
All these elements have initially the same, darkgray background. The control cell (and its column) is quite wide. I would like to change two aspects of their look:

  • the back color of all of them
  • the width of the control cell and the filling cells

I tried to use GroupHeaderItemStyle. Changing its BackColor changed the back color of the header and the filling cells - but the control cell remained untouched. Changing its Width changed nothing.
I tried to modify Grid.Simple.css file. I've succeeded in changing the back color of all the required elements. But I cannot make the column with the control and filling cells narrower. The MasterTableView is rendered with the "colgroup" element wich contains 20px width of this column. This is the key - is it possible to me to change this value?

Regards
Tomasz

Mira
Telerik team
 answered on 01 Dec 2011
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?