Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
81 views
Good afternoon - using the Entity Framework / an Entity Data Source, I need to get the data the user has filtered from the Grid. What's the easiest way? 

It seems difficult to iterate through the entire paged data-set getting ID's and then re-fetching all the rows based on the Primary Key/ID. 

I've found a "double rebind" hack works quite well - though not sure on performance yet - but I'd be interested to hear the best options:

        private bool StoreInLocalVariable;
        private Collection<CustomerData> CustomerData;

protected
void btnGetData_Click(object sender, EventArgs e)
{
   // Rebind grid without paging to get full data-set
                StoreInLocalVariable = true;        
            rgCustomerBalance.AllowPaging = false;
            rgCustomerBalance.Rebind();
            var result = CustomerData;
 
// Restore grid back to normal (i.e. with paging)
            StoreInLocalVariable = false;
            rgCustomerBalance.AllowPaging = true;
            rgCustomerBalance.Rebind();
 
           // Do something with Result
}
 
        // Entity Data Source Selected
        protected void edsCustomerData_Selected(object sender, EntityDataSourceSelectedEventArgs e)
        {
            if (StoreInLocalVariable)
            {
                CustomerData = new Collection<CustomerData>(e.Results.Cast<CustomerData>().ToList());
            }
        }
Konstantin Dikov
Telerik team
 answered on 05 Mar 2015
4 answers
156 views
<telerik:RadWindowManager ID="rwmSalesCallList" runat="server" Style="z-index: 3">
<Windows
<telerik:RadWindow ID="rwSalesCallList_PDFExport" runat="server"
    OnClientClose="rwSalesCallList_PDFExport_OnClientClose"
    Modal="true"
    AutoSize="true"
    Behaviors="Close"
    ShowOnTopWhenMaximized="false">
<ContentTemplate>
<asp:Panel ID="pSalesCallList_PDFExport" runat="server">
            <asp:ValidationSummary ID="vsReportSelection_Reporting" runat="server"
                        HeaderText="ERROR! The report cannot be generated due to the following reasons:
                        "
                        ValidationGroup="vgReportSelection" CssClass="LabelWarning"
                        ShowMessageBox="true" ShowSummary="false"
                         />
            <table border="0" cellpadding="5" cellspacing="0" class="ContentTableBordered TableCentered" style="border: solid 1px black" width="450">
            <tr>
                <td class="ContentTableCellTitleDark LabelBold LabelMedium " colspan="2" style="background-color: #808080;color: #FFFFFF;font-size: 10pt;font-weight: bold;border-left: #CCCCCC outset 1px;border-right: #CCCCCC outset 2px;border-top: #CCCCCC outset 1px;border-bottom: #CCCCCC outset 2px;vertical-align:top;">
                    <asp:Label ID="lblErrorTitle" runat="server"
                        Text="Select Filter Criteria Below"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="tableSectionLabelCell" nowrap style="background-color:#d3d3d3;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;">
                    <asp:Label ID="lblReportSelection_StartDateLabel" runat="server" Text="Start Date:" ViewStateMode="Disabled" ></asp:Label>
                    <asp:RequiredFieldValidator ID="rfvReportSelection_StartDate" runat="server"
                        ErrorMessage="Start Date is required."
                        ToolTip="Start Date is required."
                        Text="*"
                        ControlToValidate="rdpReportSelection_StartDatePicker"
                        InitialValue=""
                        ValidationGroup="vgReportSelection"></asp:RequiredFieldValidator
                    <asp:comparevalidator id="cvReportSelection_StartDate" runat="server"
                        Operator="DataTypeCheck"
                        ControlToValidate="rdpReportSelection_StartDatePicker"
                        Type="Date"
                        ErrorMessage="The value for Start Date is invalid."
                        ToolTip="The value for Start Date is invalid."
                        Text="*"
                        EnableClientScript="true"
                        ValidationGroup="vgReportSelection"></asp:comparevalidator>                                                                                            
                </td>
                <td class="tableSectionDataCell" style="background-color:#ffffff;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;word-break :  break-all;">
                    <telerik:RadDatePicker ID="rdpReportSelection_StartDatePicker" runat="server" Style="z-index: 4">
                        <DateInput runat="server" DisplayDateFormat="MM/dd/yyyy" DateFormat="MM/dd/yyyy"></DateInput>
                    </telerik:RadDatePicker>
                </td>
            </tr>
            <tr>
                <td class="tableSectionLabelCell" nowrap style="background-color:#d3d3d3;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;">
                    <asp:Label ID="lblReportSelection_EndDateLabel" runat="server" Text="End Date:" ViewStateMode="Disabled" ></asp:Label>
                    <asp:RequiredFieldValidator ID="rfvReportSelection_EndDate" runat="server"
                        ErrorMessage="End Date is required."
                        ToolTip="End Date is required."
                        Text="*"
                        ControlToValidate="rdpReportSelection_EndDatePicker"
                        InitialValue=""
                        ValidationGroup="vgReportSelection"></asp:RequiredFieldValidator
                    <asp:comparevalidator id="cvReportSelection_EndDate" runat="server"
                        Operator="DataTypeCheck"
                        ControlToValidate="rdpReportSelection_EndDatePicker"
                        Type="Date"
                        ErrorMessage="The value for End Date is invalid."
                        ToolTip="The value for End Date is invalid."
                        Text="*"
                        EnableClientScript="true"
                        ValidationGroup="vgReportSelection"></asp:comparevalidator>
                    <asp:comparevalidator id="cvReportSelection_EndDateGreater" runat="server"
                        Operator="GreaterThanEqual"
                        ControlToCompare="rdpReportSelection_StartDatePicker"
                        ControlToValidate="rdpReportSelection_EndDatePicker"
                        Type="Date"
                        ErrorMessage="The value for End Date must be equal or greater than the Start Date."
                        ToolTip="The value for End Date must be equal or greater than the Start Date."
                        Text="*"
                        EnableClientScript="true"
                        ValidationGroup="vgReportSelection"></asp:comparevalidator>                           
                                                                                                                          
                </td>
                <td class="tableSectionDataCell" style="background-color:#ffffff;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;word-break :  break-all;">
                    <telerik:RadDatePicker ID="rdpReportSelection_EndDatePicker" runat="server" Style="z-index: 4">
                        <DateInput runat="server" DisplayDateFormat="MM/dd/yyyy" DateFormat="MM/dd/yyyy"></DateInput>
                    </telerik:RadDatePicker>
                </td>
            </tr>
             <tr>
                <td class="tableSectionLabelCell" style="background-color:#d3d3d3;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;">
                    <asp:Label ID="lblReportSelection_RegionLabel" runat="server"
                        Text="Sales District/Region:" ViewStateMode="Disabled" ></asp:Label>
                </td>
                <td class="tableSectionDataCell" style="background-color:#ffffff;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;word-break :  break-all;">
                    <telerik:RadComboBox ID="rcbReportSelection_Region" runat="server"
                        DataValueField="Id"
                        DataTextField="Description"
                        AppendDataBoundItems="true"
                        MarkFirstMatch="True" Style="z-index: 5000">
                        <Items>
                        <telerik:RadComboBoxItem runat="server" Text="-- ALL --" Value="-1" />
                        </Items>
                    </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td class="tableSectionLabelCell" style="background-color:#d3d3d3;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;">
                    <asp:Label ID="lblReportSelection_IndividualLabel" runat="server"
                        Text="Individual:" ViewStateMode="Disabled" ></asp:Label>
                </td>
                <td class="tableSectionDataCell" style="background-color:#ffffff;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;word-break :  break-all;">
                <telerik:RadComboBox ID="rcbReportSelection_Individual" runat="server"
                    DataValueField="Id"
                    DataTextField="Description"
                    AppendDataBoundItems="true"
                    DropDownWidth="250px"
                    MarkFirstMatch="True" Style="z-index: 5000">
                    <Items>
                    <telerik:RadComboBoxItem runat="server" Text="-- ALL --" Value="-1" />
                    </Items>
                </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td class="tableSectionLabelCell" style="background-color:#d3d3d3;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;">
                    <asp:Label ID="lblReportSelection_TradingPartnerLabel" runat="server"
                        Text="Trading Partner:" ViewStateMode="Disabled" ></asp:Label>
                </td>
                <td class="tableSectionDataCell" style="background-color:#ffffff;border-left: #cccccc outset 2px;border-right: #cccccc outset 2px;border-top: #cccccc outset 2px;word-break :  break-all;">
                <telerik:RadComboBox ID="rcbReportSelection_TradingPartner" runat="server"
                    DataValueField="TradingPartnerNo"
                    DataTextField="Name"
                    AppendDataBoundItems="true"
                    DropDownWidth="275px"
                    MarkFirstMatch="True" Style="z-index: 5000">
                    <Items>
                    <telerik:RadComboBoxItem runat="server" Text="-- ALL --" Value="" />
                    </Items>
                </telerik:RadComboBox>
                </td>
            </tr>
 
            <tr>
                <td class="ContentTableCellFooterDark LabelBold LabelMedium TableCellMiddleCenter" colspan="2" style="background-color: #808080;color: #FFFFFF;font-size: 10pt;font-weight: bold;border-left: #CCCCCC outset 1px;border-right: #CCCCCC outset 2px;border-top: #CCCCCC outset 2px;border-bottom: #CCCCCC outset 1px;vertical-align:top;">
                    <telerik:RadButton ID="btnReportSelection_GeneratePDF" runat="server"
                        Text="Generate PDF" CssClass="Button"
                        OnClick="btnReportSelection_GeneratePDF_Click"
                        ValidationGroup="vgReportSelection"
                        OnClientClicking="SubmitAllPDFExport"
                        Icon-PrimaryIconUrl="~/images/icons/acrobat.gif"
                        Icon-PrimaryIconHeight="16px"
                        Icon-PrimaryIconWidth="16px" />
                    <telerik:RadButton ID="btnReportSelection_CancelPDF" runat="server"
                        Text="Cancel" CssClass="Button" OnClientClicking="rwSalesCallList_PDFExport_Close"
                         Icon-PrimaryIconCssClass="rbCancel"/>
                </td>
            </tr>                      
        </table>
</asp:Panel>
<asp:Panel ID="pSalesCallList_PDFExportWait" runat="server" style="display:none;">
<br />
<br />
<br />
<center><asp:Image ID="imgSalesCallList_MainLoadingPanelDropDown" runat="server" ImageUrl="~/images/loading3.gif" ImageAlign="Bottom" /></center>
</asp:Panel>
 
                        
</ContentTemplate>
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
I having a strange problem with using the window control with a content template in modal that controls such as comboboxes, calendars, etc. are appearing behind the window in the shaded modal part. I have tried adjusting the z-indexing of the controls to no avail. Here is the window code and a screen shot of the issue.

James Daresta
Top achievements
Rank 1
 answered on 05 Mar 2015
1 answer
125 views
Hello all,

 I am using a telerik ragdridview in my wpf view.In one of the column of telerik
radgridview i am usingGridViewImageColumn .once
the document in one grid column loads successfully the image column will show
success icon else failure icon.But the problem is after completing of this
process once i clik on filtering icon (top of rad grid) of the image
column text is showing as "System.Window.Control.Images" instead of
icon symbols.

I had overrideen the FilteringDisplayFunc of
GridViewImageColumn..My code is :



xaml:

<img:ImageFilterColumn DataMemberBinding="{BindingDocumentStatus}"     Header="{BindingHeaderStatus}"         ImageStretch="None"          ShowFieldFilters="False" /><br>

code behind:

PublicClass ImageFilterColumn    Inherits GridViewImageColumn
<
br><br>e<br><br>ProtectedOverridesReadOnlyProperty FilteringDisplayFunc() As Func(OfObject, Object)     
      GetReturnAddressOf ImageFilterColumn.ConvertUriStringToImage        
   EndGetEndProperty       
 PublicSharedFunction ConvertUriStringToImage(uriString AsObject) AsObject
Dim image As Image = New Image()          
image.Source = New BitmapImage(New Uri(uriString.ToString()))    
       Return image    
    EndFunction
EndClass<
br>

please
suggest what to do to get the icons in filtering also.
Dimitrina
Telerik team
 answered on 05 Mar 2015
3 answers
117 views
Hi,

I have an web app that is over 10 years old and has gone through many revisions and upgrades...we've been using telerik's ASP.Net controls for at least 8 years now.
We can't really rewrite the entire thing to MVC, but I need the web app to match our mobile app (based on Google Material) better.
I want to step away from the heavy CSS use of the built in telerik themes.

I've had some luck incorporating this CSS theme framework that is based on Google material:
http://materializecss.com/

But in many cases, the telerik CSS is overriding or conflicting with the Materialize framework.

It would be nice if either you guys provided a Material theme for ASP.NET AJAX, or if I could keep using the Materialize framework by getting my current app using ASP.NET AJAX to push out cleaner html.

Thanks,
Sam
Sam
Top achievements
Rank 1
 answered on 05 Mar 2015
1 answer
95 views
Does anyone have a resolution for the RadButton not being focused on a Page_Load event?

ASP button you can set the .focus() in the page load event and it is truly focused when the page is displayed.  RadButton doesn't work.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="buttonnoworkie.aspx.vb" Inherits="buttonnoworkie" %>
 
<!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="ScriptManager1" runat="server" EnablePartialRendering="false">
  </telerik:RadScriptManager>
    <div>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
   <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton"
        ResolvedRenderMode="Classic">
  </telerik:RadButton>  
    </div>
    </div>
    </form>
</body>
</html>


Partial Class buttonnoworkie
    Inherits System.Web.UI.Page
 
  Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    RadButton1.Focus()
  End Sub
End Class

Danail Vasilev
Telerik team
 answered on 05 Mar 2015
1 answer
194 views
Is there a way in code behind to pull all possible Theme names from the Skin Manager into a string array?
I was thinking it might be stored in RadSkinManager.Skins but I didnt find it there. If it is possible please
show code example.

Thanks,
Boyan Dimitrov
Telerik team
 answered on 05 Mar 2015
1 answer
38 views
Hello,

I am having a problem referencing any of the iEnumerable properties on Occurrences collection for the RecurrenceRule class.  It is working OK in one project (4.0 framework) but I am having compilation errors in the other project such as:

Error 179 'Count' is not a member of 'System.Collections.Generic.IEnumerable(Of Date)'. 

The above error is happening with this code:

If parsedRule.Occurrences.Count > 0 Then

In my other project the above works OK.  I've tried adding references to different framework system libraries but it doesn't seem to make any difference.

Any idea why the above would be happening?  Am I missing a reference or do I need to change a reference?  I am using the Q3 2014 UI AJAX ASP.NET controls.

Hristo Valyavicharski
Telerik team
 answered on 05 Mar 2015
1 answer
115 views
I follow the help article to learn lightbox,but the picture does not show after running

1、Create a new webpage in Visual Studio.
2、Add a RadLightBox from the Telerik UI toolbar.
3、Add an Image control(named Image1) to the web page.
4、Into the item collection of the RadLightBox add a new item(item 0) and set the TargetControlID(Image1) to the Image ID.
5、Set ImageURL(~/img/1.jpg) to point to the image, which will be displayed into the window.
6、Add a title and description of the item that will provide descriptive information about the image.
7、Press F5 to compile and run the application.

the aspx file
==================================================================================================
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TelerikWebApp1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <div>
    
    </div>
        <telerik:RadLightBox ID="RadLightBox1" runat="server" PreserveCurrentItemTemplates="False">
            <Items>
                <telerik:RadLightBoxItem ImageUrl="~/img/1.jpg" TargetControlID="Image1">
                </telerik:RadLightBoxItem>
            </Items>
        </telerik:RadLightBox>
        <asp:Image ID="Image1" runat="server" Height="49px" Width="107px" />
    </form>
</body>
</html>

Daniel
Telerik team
 answered on 05 Mar 2015
1 answer
59 views
I see the Material theme for Kendo, MVC and your other platforms, but how about us stuck with ASP.NET AJAX apps??

Thanks,
Sam
Rumen
Telerik team
 answered on 05 Mar 2015
10 answers
228 views
Hello Community,

I want to disable the Document Manager. Using the ToolsFile.xml allows do disable it in the Toolbar only. But I want no icon in the Hyperlink Manager, too. Is this possible?

Regards
Henrik
Ianko
Telerik team
 answered on 05 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?