Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
134 views
Hi,
I have a two Radgrid in my aspx page.Based on search criteria I display either one and also it could  display both of them.Default page size is 10.When I display both RadGrid I need to change to page size 5.
I have two different method when either Radgrid Binding set page size to 10 and the other method when both RadGrid must display set page size to 5.
But when I run application it gives me  uknown server error - 500.
when I remove page size application working fine.

Please help me.
thanks,
Vitaly. 
Kostadin
Telerik team
 answered on 26 Nov 2013
1 answer
229 views
I am not sure which control this error should be mapped to.
I have an asp.net wizard and the wizard pages come from user controls. On some of those pages I have a radgrid.
On one of the page I have a chart and the next page after that is the one that has radgrid. I get the error Microsoft jscript runtime error Parameter name: panelsCreated[0] and the chart does not load for me. If I use asp.net grid instead of radgrid on that page then everything works fine.

Below is the ascx page that has the radgrid.
<%@ Control Language="c#" Inherits="ucBBucket" CodeFile="ucBBucket.ascx.cs" %>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>
<telerik:RadAjaxManagerProxy ID="RadAJAXManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgBene">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgBene" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>
            <telerik:RadGrid ID="rgBene" runat="server" GridLines="Vertical" AllowPaging="true"
                AllowAutomaticUpdates="false" AllowAutomaticInserts="false" AutoGenerateColumns="False"
                EnableLinqExpressions="false" AllowSorting="true" AllowAutomaticDeletes="false"
                Skin="MBen" EnableEmbeddedSkins="false" DataSourceID="_dataSrcBene"
                ShowFooter="true" AllowCustomPaging="false" AllowFilteringByColumn="false" Width="100%"
                PageSize="15" ImagesPath="../App_Themes/Grid">
                <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="true" EditMode="PopUp"
                    CommandItemDisplay="None" DataKeyNames="" PagerStyle-Position="Bottom">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Type" UniqueName="Type"
                            HeaderText="Type" HeaderStyle-Width="25%" SortExpression="Type" />
                        <telerik:GridBoundColumn DataField="Percent" UniqueName="Percent"
                            HeaderText="Percentage" SortExpression="Percent" HeaderStyle-Width="10%" />
                        <telerik:GridBoundColumn DataField="Bene" UniqueName="Bene" HeaderText="Bene"
                            SortExpression="Bene" />
                        <telerik:GridBoundColumn DataField="Relationship" UniqueName="Relationship"
                            HeaderText="Relationship" SortExpression="Relationship" HeaderStyle-Width="12%" />
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
          </td>
    </tr>
</table>
<asp:ObjectDataSource ID="_dataSrcBene" runat="server" SelectMethod="ListByParticipant"
    OnSelected="_dataSrcBene_Selected" >
    <SelectParameters>
        <asp:ProfileParameter Name="ParticipantID" PropertyName="ParticipantID" DefaultValue="-1"
            Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

Please advice.
Konstantin Dikov
Telerik team
 answered on 26 Nov 2013
1 answer
121 views
Hello,

I´ve a Radgrid with GridBinaryImageColumn workin in batch edit mode.

In the BatchEditCommand, I am not able to get the binary value of the image and I can not upload control access to try to get it.

I've tried to make using the properties UploadControlType Async and normal

Can you upload an example of how you solve this problem?

Thank you very much.

Regards

Angel Petrov
Telerik team
 answered on 26 Nov 2013
1 answer
66 views
Hi folks.

I have a treelist control on my page where I load the items dynamicaly. At each section I'd like to have aggregated sums at the bottom. I thing I have all set correctly regarding online demos but the result footer are all empty.

I use this code:

     <telerik:RadTreeList ID="rtlData" AllowLoadOnDemand="true" runat="server" AutoGenerateColumns="false"
         OnChildItemsDataBind="RadTreeList_ChildItemsDataBind" OnNeedDataSource="RadTreeList_NeedDataSource"
          DataKeyNames="CssClass,ParentId" ParentDataKeyNames="CssClass,ParentId" OnItemCreated="RadTreeList_ItemCreated"
         OnItemDataBound="RadTreeList_ItemDataBound" ShowFooter="true">
          <Columns>
               <telerik:TreeListBoundColumn DataField="ProductCatL3" UniqueName="ProductCatL3" HeaderText="Produkt L3">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ProductCatL2" UniqueName="ProductCatL2" HeaderText="Produkt L2">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ProductCatL1" UniqueName="ProductCatL1" HeaderText="Produkt L1">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="State" UniqueName="State" HeaderText="Stav" DataType="System.Decimal" DataFormatString="{0:C2}" Aggregate="Sum">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="Avg1Month" UniqueName="Avg1Month" HeaderText="PrůmÄ›r 1 mÄ›síc" DataFormatString="{0:C2}" Aggregate="Avg">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="Avg3Months" UniqueName="Avg3Months" HeaderText="PrůmÄ›r 3 mÄ›síce" DataFormatString="{0:C2}" Aggregate="Avg">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ApprovedLimit" UniqueName="ApprovedLimit" HeaderText="Schválený limit" DataFormatString="{0:C2}" Aggregate="Sum">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="CssClass" UniqueName="Css" HeaderText="CSS" Visible="false">
               </telerik:TreeListBoundColumn>
               <telerik:TreeListBoundColumn DataField="ParentId" UniqueName="ParentId" HeaderText="ParentId" Visible="false">
               </telerik:TreeListBoundColumn>
          </Columns>
     </telerik:RadTreeList>

What am I doing wrong that no footer are calculated and it only shows empty fields?

Sincerely
Scarlaxx
Kostadin
Telerik team
 answered on 26 Nov 2013
1 answer
307 views
I'm trying to add a button to a grid that opens a "converted" pdf file in code behind.  Everything seems to be working as far as creating the bytes but nothing opens.

code: pdfFile does have results because I saved it locally just to make sure.  It just won't open.

Dim DocumentServiceWS As New DocumentServices

Dim pdfFile As Byte()

pdfFile = DocumentServiceWS.GetDRDocumentPDF(_PRO, _DocType)

 

If Not (pdfFile Is Nothing) Then

Response.Buffer = True

Response.Clear()

Response.ContentType = "application/PDF"

Response.AddHeader("Content-Disposition:", "attachment; filename=Result.pdf")

Response.BinaryWrite(pdfFile)

Response.Flush()

Response.End()

End If

 

 

 

Daniel
Telerik team
 answered on 26 Nov 2013
7 answers
362 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
330 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
346 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
106 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
234 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?