Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
307 views
I am trying to reproduce wav files but I do not know what is the problem. I works with youtube but not with my files


<telerik:RadMediaPlayer  ID="RadMediaPlayer1" runat="server"  Text="RadMediaPlayer"
            Height="281px" Width="500px">
            <Sources>
                 
  <%-- <telerik:MediaPlayerSource Path="http://www.youtube.com/watch?v=QuuUn2tm5wY" />--%>
                 <telerik:MediaPlayerSource  Path="C:/code/dotnet4/PAPortal/files/voxeo/Confirmed By Recipient_12820-469398-cfc3410d2d1bcf81e8decaf11e87dafd-0-ReminderID-4578795.wav" />
            </Sources>
</telerik:RadMediaPlayer>
Eyup
Telerik team
 answered on 26 Nov 2013
2 answers
272 views
I have implemented drill down functionality for a column chart but I want my users to actually see they can click it by changing the cursor to the hand cursor on mouseover. I can see no way to get that done. Hoping someone can help.

Thanks!
RBeco
Top achievements
Rank 1
 answered on 26 Nov 2013
4 answers
285 views
I setup a pager template per your example at:
http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/Programming/PagerTemplate/DefaultCS.aspx

This works fine by itself. I can set the page size successfully and the grid will change to the appropriate number of rows. I then implemented custom paging in order to speed up the database calls per your example at:
http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/Programming/CustomPaging/DefaultCS.aspx

For some reason the page size is not getting saved, so the when the post back occurs it still shows ten. This javascript function from the 2nd is example is getting called in both cases, but on the page load of the post back the first contains the updated page count while the other does not. Does custom paging keep this feature from working? If so is there a different way I should be setting the page count when using custom paging?

Thanks!
Levi
Konstantin Dikov
Telerik team
 answered on 26 Nov 2013
2 answers
78 views
Hi,

I am trying to apply CSS to a RadDock and having a bit of trouble getting things to work.

For example I am trying this CSS:
.rdExpand, .rdCollapse, .rdCollapsed {
   background-position: 0px 0px !important;
   height:60px !important;
}

When I inspect it in Chrome I can see it there but it is being overridden by value in WebResource.axd:
.RadDock.rdCollapsed {
 height: 27px!important;
}

BTW I tried appending the classes with "div" like below but no dice :(

div.rdExpand, div.rdCollapse, div.rdCollapsed {
   background-position: 0px 0px !important;
   height:60px !important;
}

 
If there anyway of overridding this value with the one I have in my CSS?

Thanks,

Dave.
Dave
Top achievements
Rank 1
 answered on 26 Nov 2013
1 answer
197 views
I have a combo box inside an ajax panel like so
<telerik:RadScriptManager ID="manager" runat="server"></telerik:RadScriptManager>
            <telerik:RadAjaxPanel ID="RadAjaxPanel3" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <telerik:RadComboBox ID="userInput" runat="server" AllowCustomText="True" CausesValidation="false" ShowToggleImage="False"
                ShowMoreResultsBox="true" EnableLoadOnDemand="True" MarkFirstMatch="True"
                OnItemsRequested="LoadSearch"
                ErrorMessage="Value not Found" AutoPostBack="True" Width="300">
                <CollapseAnimation Duration="1000" Type="InBack" />
            </telerik:RadComboBox>
</telerik:RadAjaxPanel>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" SkinID="Hay"
        Height="25px" Transparency="1" BackgroundPosition="Center" >
        <img alt="Loading..." src="../images/loading.gif" style="border: 0px;" />
    </telerik:RadAjaxLoadingPanel>

When I click in it, it loads items and if I start typing, it also searches correctly. However, once I select an item, no more items will load. Even if I delete text, nothing comes up. Here's my code behind

protected void Page_Load(object sender, EventArgs e)
{
 
    if (!Page.IsPostBack)
    {
         
 
        userInput.DataSource = GetCustomers();
        userInput.DataValueField = "Key";
        userInput.DataTextField = "Value";
        userInput.DataBind();
    }//if !page.ispost
 
}//PageLoad
 
protected void LoadSearch(object sender, RadComboBoxItemsRequestedEventArgs e)
{
  
    //get the list based on the search
    IEnumerable<Vw_CustomersSearchView> customers = DbRepository.GetCustomersSearchView().Where(c => c.Customer.Contains(e.Text));
 
    //how many items we'll show
    int itemsPerReq = 10;
 
    //keep count of the items
    int count = 0;
 
    RadComboBox box = (RadComboBox)sender;
    box.Items.Clear();
 
 
    //make sure we have at least one record
    if (customers.Count() > 0)
    {
        //now add any customer items
        foreach (var i in customers)
        {
 
            //if we're above 10, exit the loop
            if (count >= itemsPerReq)
            {
                break;
            }//if count > itemsper
 
            //if we're here, add the items
            box.Items.Add(new RadComboBoxItem(i.Customer, i.UserName));
 
            count++;
        }//foreach
    }//if customers.count
    else
    {
        e.Message = "No matches";
    }
 
 
}//LoadSearch
 
/// <summary>
/// this returns a dictionary of the customers for the customer dropdown
/// </summary>
/// <returns></returns>
protected Dictionary<string, string> GetCustomers()
{
 
    Dictionary<string, string> customersList = new Dictionary<string, string>();
 
    //now add the items
    var cTable = DbRepository.GetActiveCustomers().Where(a => a.LoyaltyCardNumber != null).Select(a => new {a.UserName, a.FirstName, a.LoyaltyCardNumber, a.LastName});
 
    foreach (var i in cTable)
    {
        string name = String.Format("{0}{1}{2}{3}{4}", i.FirstName, " ", i.LastName, " - ", i.LoyaltyCardNumber);
        customersList.Add(i.UserName, name);
    }//foreach
 
    return customersList;
 
}//GetCustomers
 
/// <summary>
/// if they picked an item in the combox box, repopulate it
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void userInput_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    userInput.DataSource = GetCustomers();
    userInput.DataValueField = "Key";
    userInput.DataTextField = "Value";
    userInput.DataBind();
}//resetPasswordButtonClick

Here's a video of what's happening. How do I make it pull the dropdown again, even after you select an item. https://dl.dropboxusercontent.com/u/4979877/combo.swf




Nencho
Telerik team
 answered on 26 Nov 2013
1 answer
52 views
I have a scenario where i am using a RadCombobox to filter the DataSource for an asp.net Repeater.
i will try my best to explain what is happening first, with the code snippets below the explanation.


so the way the code works, is that every time someone types something in the combobox, it will fire the 'onKeyUp' attribute which calls the 'handleKeyPress' javascript method.
this method will call the 'InitiateAjaxRequest' javascript method after its done a few bits of checking.

the 'InitiateAjaxRequest' javascript method will merely call the AjaxRequest which will call the vb.net method 'ajxMan_AjaxRequest'. This will rebind the Repeater with the information i want to show.

when testing on localhost, i can type in the box as fast as i like and it works brilliantly. it doesn't matter what Browser i use.
when i upload it to my testing server, it works fine on Chrome and Safari but IE 11 (and 10, 9 & 8) cannot handle me typing so fast. it ends up looking like its not doing anything but after awhile (anything up to a couple of minutes) it will bring back the data i am expecting. if i type 1 or 2 characters at a time, the Repeater will refresh correctly. typing at least 4 or 5 characters  in quick succession, with no pause, causes the hanging.
i found a piece of code that allows  the code within 'handleKeyPress' to run if no keys have been pressed for 1 second, and this solves the problem but the pause is not really acceptable to me.

is there anything obvious that i am doing wrong, or anything i can do to resolve this? i would like the Repeater to be rebound with minimal pause between the typing and the stopping-typing.

the combobox is declared in the aspx.vb code:

Protected cmb As New RadComboBox
 
private sub buildCombobox
 
      cmb = New RadComboBox
        cmb.ID = "cmbSearch"
        cmb.ShowDropDownOnTextboxClick = False
        cmb.OnClientLoad = "firstItemEmptyOnLoad"
        cmb.MarkFirstMatch = True
        cmb.DataTextField = "StockItemName"
        cmb.DataValueField = "StockItemID"
        cmb.ShowToggleImage = False
cmb.Attributes("onkeyup") = "handleKeyPress();"
        Master.Menubar.Add(cmb)
 
       If Not Page.IsPostBack Then
            cmb.DataSource = _recipe.getItems(ID, DivisionId)
            ViewState("cmbDataSource") = cmb.DataSource
            cmb.DataBind()
        End If
end sub


I have the following in the aspx:

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
       <telerik:RadAjaxManager ID="ajxMan2" runat="server" OnAjaxRequest="ajxMan_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ajxMan2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="100">
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
 
 <asp:Repeater ID="r2" runat="server"  >
                <HeaderTemplate>
                    <table class="grid" >
                        <tr class="gridHeader">
                            <th>
                                Stock Item</th>
                            <th>
                                Stock Size Group</th>
                                <th>
                                Batch
                            </th>
                            <th>
                                Can Order</th>
                             
                            <th>
                                Stock Count</th>
                            <th>
                                Non Inventory</th>
                            <th>
                                Is Active</th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class='gridRow' onmouseover="this.className+=' gridRowOn'" onmouseout="this.className=this.className.replace(' gridRowOn','')"
                         
                        onclick="window.location='StockItemAddEdit.aspx?StockItemID=<%#DirectCast(Container.DataItem, System.Data.DataRow)("StockItemID")%>'">
                        <td>
                             
                            <%#DirectCast(Container.DataItem,System.Data.DataRow)("StockItemName").ToString %>
                        </td>
                        <td>
                             
                            <%#DirectCast(Container.DataItem, System.Data.DataRow)("StockSizeGroupName").ToString%>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkBatch" runat=server Enabled=false />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkCanOrder" runat=server Enabled=false />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkStockCount" runat=server Enabled=false  />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkNonInventory" runat=server Enabled=false  />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkIsActive" runat=server Enabled=false  />
                        </td>
 
                        <td><asp:Label runat="server" Visible="false" id="lblBatch" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("BatchItemYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblCanOrder" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("CanOrderYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblStockCount" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("StockCountYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblNonInventory" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("NonInventoryYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblIsActive" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("ActiveYN")%>'></asp:Label></td>
                    </tr>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <tr class='gridRowAlt' onmouseover="this.className+=' gridRowOn'" onmouseout="this.className=this.className.replace(' gridRowOn','')"
                        
                         onclick="window.location='StockItemAddEdit.aspx?StockItemID=<%#DirectCast(Container.DataItem, System.Data.DataRow)("StockItemID")%>'">
                        <td>
                             
                            <%#DirectCast(Container.DataItem, System.Data.DataRow)("StockItemName").ToString%>
 
                        </td>
                        <td>
                             
                            <%#DirectCast(Container.DataItem, System.Data.DataRow)("StockSizeGroupName").ToString%>
                        </td>
                         <td>
                            <asp:CheckBox ID="chkBatch" runat=server Enabled=false  />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkCanOrder" runat=server Enabled=false />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkStockCount" runat=server Enabled=false />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkNonInventory" runat=server Enabled=false  />
                        </td>
                        <td>
                            <asp:CheckBox ID="chkIsActive" runat=server Enabled=false  />
                        </td>
 
                        <td><asp:Label runat="server" Visible="false" id="lblBatch" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("BatchItemYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblCanOrder" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("CanOrderYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblStockCount" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("StockCountYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblNonInventory" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("NonInventoryYN")%>'></asp:Label></td>
                        <td><asp:Label runat="server" Visible="false" id="lblIsActive" Text='<%#DirectCast(Container.DataItem, System.Data.DataRow)("ActiveYN")%>'></asp:Label></td>
                    </tr>
                </AlternatingItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
 
            <asp:HiddenField  runat="server" ID="hidAutoComplete" />
 
 
            </telerik:RadAjaxPanel>
</telerik:RadCodeBlock>

and a javascript function like this:

function handleKeyPress()
    {
 
 
 
      var combo = $find('<%=cmb.ClientID%>');
      //  alert('handleKeyPress');
      var filtText =  String(combo._filterText);
      var fullText = String(combo.get_text());
      var actualFilterText = '';
     
      for (var i = 0,len = filtText.length; i < len; i++){
     
          if (filtText[i].toUpperCase() == fullText[i].toUpperCase()){
              actualFilterText += filtText[i];
          }else{
              break;
          }
     
      }
 
       
      document.getElementById('<%=hidAutoComplete.ClientID%>').value = actualFilterText;        
        InitiateAjaxRequest();
    //  <%'=Page.ClientScript.GetPostBackEventReference(hidAutoComplete, "Change")%>    
        // alrt('error');
 
         
    }
 
 
 
    function InitiateAjaxRequest(arguments) {
       // alert('InitiateAjaxRequest');
        var ajaxManager = $find("<%= ajxMan2.ClientID%>");
        ajaxManager.ajaxRequest(arguments);
         
    }


when the AjaxRequest gets fired, it will run the following code in the aspx.vb

Protected Sub ajxMan_AjaxRequest(sender As Object, e As AjaxRequestEventArgs)
 
 
        'share the same datasource as the combobox, but filter it
        Dim dt As DataTable = DirectCast(ViewState("cmbDataSource"), DataTable)
 
        Using dt
            r2.DataSource = dt.Select("StockItemName LIKE '" + hidAutoComplete.Value + "%'")
 
            r2.DataBind()
 
            r.Visible = False
            r2.Visible = True
 
 
        End Using
 
 
 
 
End Sub

Angel Petrov
Telerik team
 answered on 26 Nov 2013
3 answers
225 views
I have a radtabstrip which i use as a wizard.
I have previous and next buttons implemented to move to and fro tabs.
I also let the user to move between the tabs by clicking the tabs.

On the previous/next buttons i save some data and update a datatable.
I need to implement the same when moving between the tabs.

I can subscribe to the TabClick event but I don't know how to update the data on the particular tab I moved out from?
Any help?
Shinu
Top achievements
Rank 2
 answered on 26 Nov 2013
3 answers
163 views
I need to copy data from a  RadDatePicker  Control which is  inside a RadGrid using GridTemplateColumn to a Label Control also in the same RadGrid also using GridTemplateColumn   when a Session Variable is True. My Situation is if Session Variable is true, Copy data form :
When Session Variable is True, Copy data from this control below
<
telerik:GridTemplateColumn HeaderText="Start Date" UniqueName="StartDate"
 Visible="false">
        <ItemTemplate>
         <asp:Label runat="server" ID="startdate" Text='<%# String.Format("{0:d}" , Eval("StartDate")) %>'>
          </asp:Label
         </ItemTemplate>
        <EditItemTemplate>
       <br />
  <telerik:RadDatePicker ID="picker3" runat="server" DbSelectedDate='<%# Bind("StartDate") %>'>
</telerik:RadDatePicker>            
<
asp:CustomValidator ID="CustomValidator3" ControlToValidate="picker3" ErrorMessage="This field was incorrect"
           runat="server" OnServerValidate="CustomValidator1_ServerValidate">
     </asp:CustomValidator>
     </EditItemTemplate>
            </telerik:GridTemplateColumn>


To Destination Control
<telerik:GridTemplateColumn HeaderText="Finish Date" UniqueName="FinishDate">
                    <ItemTemplate>
            <asp:Label runat="server" ID="FinishDate" Text=" ">
                  </asp:Label
            </ItemTemplate>
    </telerik:GridTemplateColumn>
An idea is welcome please
Princy
Top achievements
Rank 2
 answered on 26 Nov 2013
2 answers
203 views
I wrote my web app on my local machine and debugging works fine. I finally deployed to a webserver and none of the controls are loading properly. I have ruled out a browser based issue by trying several machines and several browsers. I have ruled out a permissions or pathing issue as the site on the server is running as the administrator and is identically pathed as my local machine.
I have ruled out the GAC by running the install on the server. The site has all the identical files including the bin.

Windows server 2008 
IIS 7.0
asp.net  7.0
Telerik.Web.UI_2010_3_1215_Dev

Screen shots of working and non working are attached.
Mike
Top achievements
Rank 1
 answered on 26 Nov 2013
1 answer
49 views
Hello, im using a RAD Grid - Batch Edit Mode, all fields are updating OK, also delete and insert operations, but the only column that isnt working or updating is a ItemTemplateColumn with a RAD Dropdownlist,  the information its saved on the database, but when refresing or retrieving rows the dropdown doesnt select any value. Below its my code


                    SelectCommand="SELECT [SHOP NUMBER] AS SHOP_NUMBER, NUMBER, [MANF# NUMBER] AS column1, DESCRIPTION, [QTY REQD] AS QTY_REQD, BILLBACK, [PULLED KSS] AS PULLED_KSS, [PULLED K-MLC] AS column2, [DATE ENTERED] AS DATE_ENTERED, [DATE PULLED] AS DATE_PULLED, MARKCHECK, ID, [LABOR?] AS column3 FROM USAGE WHERE ([SHOP NUMBER] = @SHOP_NUMBER) ORDER BY NUMBER"
...
UpdateCommand="UPDATE [USAGE] SET [NUMBER] = UPPER(@NUMBER), [MANF# NUMBER] = @column1, [QTY REQD] = @QTY_REQD, [BILLBACK] = @BILLBACK, [PULLED KSS] = @PULLED_KSS, [PULLED K-MLC] = @column2, [DATE ENTERED] = @DATE_ENTERED, [DATE PULLED] = @DATE_PULLED,  [LABOR?] = @column3 WHERE [ID] = @original_ID AND [SHOP NUMBER] = @original_SHOP_NUMBER">
...

                    <UpdateParameters>
                        <asp:Parameter Name="SHOP_NUMBER" Type="Double" />
                        <asp:Parameter Name="NUMBER" Type="String" />
                        <asp:Parameter Name="column1" Type="String" />
  ....

<asp:SqlDataSource ID="sdsPartlist" runat="server"
                    ConnectionString="<%$ ConnectionStrings:DRJConnectionString %>"
                    SelectCommand="SELECT DISTINCT [MANF# NUMBER] AS column1, [DESCRIPTION] FROM [PARTLIST] ORDER BY [DESCRIPTION]"></asp:SqlDataSource>
....

<telerik:GridTemplateColumn HeaderText="Mnf. #" DataType="System.String" HeaderStyle-Width="180px" UniqueName="column1" DataField="column1">
                            <ItemTemplate>
                                <%# Eval("DESCRIPTION")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadDropDownList runat="server" ID="column1box" DataValueField="column1"
                                    DataTextField="DESCRIPTION" DataSourceID="sdsPartlist" >
                                </telerik:RadDropDownList>
                            </EditItemTemplate>
                                <HeaderStyle Width="180px" />
                        </telerik:GridTemplateColumn>

Thanks for your help
Alberto
Top achievements
Rank 1
 answered on 26 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?