Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
Hiya,

I been running through this forum several times trying to find a scenario similar to mine but I have not seen any. In my situation I'm using Telerik ASP.NET AJAX Q2 and Telerik Reporting Q3. I've created a test report using Telerik Reporting's Report Designer which I intended to be used as printing template for my RadGrid. The problem arises when I've finshed my Grid and .trdx template. I've yet to find a way to make RadGrid to pass over the data into the .trdx template which should appear as PDF embeded in browser. I hope someone could shed a little light to accomplish this task. Thanks in advance.
Pavlina
Telerik team
 answered on 29 Nov 2012
4 answers
222 views
I just upgraded to Q2 2009 and noticed that the mastertableview tablelayout="auto" seems to be ignored and results in a table-layout: fixed; in the markup. This seems to an issue in chrome where my layout for an empty grid breaks. (headers are shuffled left in the commandrow and a gap is left on the right hand side, whereas other browsers suchas a firefox and safari seem to still visually work fine.

Here's my aspx:

<telerik:RadGrid ID="rgLiens" runat="server" EnableEmbeddedSkins="false" Skin="RealMax" 
        OnNeedDataSource="rgLiens_NeedDataSource" OnItemCreated="rgLiens_ItemCreated"  
        ondeletecommand="rgLiens_DeleteCommand" oninsertcommand="rgLiens_InsertCommand"  
        onupdatecommand="rgLiens_UpdateCommand" OnPreRender="rgLiens_PreRender" OnItemDataBound="rgLiens_ItemDataBound" 
        OnRowDrop="rgLiens_RowDrop" GridLines="None" ShowFooter="True" > 
    <ClientSettings EnableRowHoverStyle="true" AllowRowsDragDrop="true"
        <ClientEvents OnRowMouseOut="rowMouseOut" OnRowMouseOver="rowMouseOver" OnPopUpShowing="PopUpCentered" /> 
        <Selecting AllowRowSelect="true" /> 
        <Resizing AllowColumnResize="True" /> 
    </ClientSettings> 
        <FilterMenu EnableTheming="True"
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </FilterMenu> 
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" EditMode="EditForms" TableLayout="auto" 
            DataKeyNames="LienId,LienIndex,PropertyId">         
      <NoRecordsTemplate><div style="margin:6px">No liens recorded for this property</div></NoRecordsTemplate>        
      <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="false" /> 
      <ItemStyle CssClass="RowMouseOut" /> 
      <AlternatingItemStyle CssClass="RowMouseOut" /> 
      <RowIndicatorColumn HeaderStyle-Width="20px" /> 
      <ExpandCollapseColumn HeaderStyle-Width="20px" /> 
       
      <Columns> 
        <telerik:GridEditCommandColumn EditImageUrl="~/Images/Buttons/edit.gif" ButtonType="ImageButton" Resizable="false" > 
            <HeaderStyle Width="24px" /> 
            <ItemStyle CssClass="CommandColumn" /> 
        </telerik:GridEditCommandColumn> 
        <Telerik:GridBoundColumn DataField="LienIndex" DataType="System.Int16" ReadOnly="true"
            <HeaderStyle Width="20px" HorizontalAlign="Center" /> 
        </Telerik:GridBoundColumn> 
 
etc 
 
and here's the html generated...

<div id="ctl00_mainPlace_Liens_rgLiens" class="RadGrid RadGrid_RealMax">  
  
                <table cellspacing="0" class="rgMasterTable rgClipCells" border="0" id="ctl00_mainPlace_Liens_rgLiens_ctl00"
                                      
style="width:100%;table-layout:fixed;overflow:hidden;empty-cells:show;">  
    <colgroup>  
        <col width="24px"  />  
        <col width="20px"  />  
        <col width="90px"  />  
        <col width="90px"  />  
        <col width="90px"  />  
        <col width="90px"  />  
        <col />  
        <col />  
        <col />  
        <col />  
        <col />  
        <col width="90px"  />  
        <col width="24px"  />  
    </colgroup>  
<thead>  
        <tr class="rgCommandRow">  
            <td class="rgCommandCell" colspan="13">  
        <table border="0px" width="100%" cellpadding="0px" cellspacing="0px"><tr>  
            <td style="width:20%"><div id="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiensIcon" class="RadToolBar RadToolBar_Horizontal RadToolBar_RealMax RadToolBar_RealMax_Horizontal " style="z-index:9000;">  
                <div class="rtbOuter">  
                    <div class="rtbMiddle">  
                        <div class="rtbInner">  
                            <ul class="rtbUL">  
                                <li class="rtbItem rtbBtn"><title="Click to view all Liens" class="rtbWrap" href="Properties.aspx" style="font-size:140%;"><span class="rtbOut"><span class="rtbMid"><span class="rtbIn"><img alt="Click to view all Liens" src="Images/Buttons/lien.png" class="rtbIcon" /><span class="rtbText">Liens</span></span></span></span></a></li>  
                            </ul>  
                        </div>  
                    </div>  
                </div><input id="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiensIcon_ClientState" name="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiensIcon_ClientState" type="hidden" />  
            </div></td>  
            <td style="width:25%"><div id="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiens" class="RadToolBar RadToolBar_Horizontal RadToolBar_RealMax RadToolBar_RealMax_Horizontal " style="z-index:9000;">  
                <div class="rtbOuter">  
                    <div class="rtbMiddle">  
                        <div class="rtbInner">  
                            <ul class="rtbUL">  
                                <li class="rtbItem rtbBtn"><title="Add new lien" class="rtbWrap" href="#"><span class="rtbOut"><span class="rtbMid"><span class="rtbIn"><img alt="Add new lien" src="Images/Buttons/Add.png" class="rtbIcon" /><span class="rtbText">Add</span></span></span></span></a></li><li class="rtbItem rtbBtn"><title="Edit lien details" class="rtbWrap" href="#"><span class="rtbOut"><span class="rtbMid"><span class="rtbIn"><img alt="Edit lien details" src="Images/Buttons/Edit.gif" class="rtbIcon" /><span class="rtbText">Edit</span></span></span></span></a></li><li class="rtbItem rtbBtn"><title="Delete lien" class="rtbWrap" href="#"><span class="rtbOut"><span class="rtbMid"><span class="rtbIn"><img alt="Delete lien" src="Images/Buttons/Delete.gif" class="rtbIcon" /><span class="rtbText">Delete</span></span></span></span></a></li>  
                            </ul>  
                        </div>  
                    </div>  
                </div><input id="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiens_ClientState" name="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiens_ClientState" type="hidden" />  
            </div></td>  
            <td style="width:40%" align="left">  
            </td>  
            <td style="width:15%" align="right"><div id="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiensRefresh" class="RadToolBar RadToolBar_Horizontal RadToolBar_RealMax RadToolBar_RealMax_Horizontal " style="z-index:9000;">  
                <div class="rtbOuter">  
                    <div class="rtbMiddle">  
                        <div class="rtbInner">  
                            <ul class="rtbUL">  
                                <li class="rtbItem rtbBtn"><title="Refresh data" class="rtbWrap" href="#"><span class="rtbOut"><span class="rtbMid"><span class="rtbIn"><img alt="Refresh data" src="Images/Buttons/Refresh.png" class="rtbIcon" /><span class="rtbText">Refresh</span></span></span></span></a></li>  
                            </ul>  
                        </div>  
                    </div>  
                </div><input id="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiensRefresh_ClientState" name="ctl00_mainPlace_Liens_rgLiens_ctl00_ctl02_ctl00_rtbLiensRefresh_ClientState" type="hidden" />  
            </div></td>  
            </tr></table>  
     </td>  
        </tr><tr style="display:none;">  
            <th scope="col">&nbsp;</th><th scope="col">&nbsp;</th><th scope="col">Loan Amount</th><th scope="col">Interest Rate</th><th scope="col">Payment</th><th scope="col">Arrears</th><th scope="col">Lender</th><th scope="col">Loan Number</th><th scope="col">Loan Date</th><th scope="col">Loan Type</th><th scope="col">Term</th><th scope="col">Loan Balance</th><th scope="col">&nbsp;</th>  
        </tr>  
    </thead><tbody>  
    <tr class="rgNoRecords">  
        <td colspan="13" style="text-align:left;"><div style="margin:6px">No liens recorded for this property</div></td>  
    </tr>  
    </tbody>  
  
</table><input id="ctl00_mainPlace_Liens_rgLiens_ClientState" name="ctl00_mainPlace_Liens_rgLiens_ClientState" type="hidden" />  
                    </div>  
                 
  
            </div>  
        </div>  
  
<div id="ctl00_mainPlace_Liens_RadAjaxLoadingPanel" class="RadAjax RadAjax_Vista " style="display:none;">  
            <div class="raDiv">  
  
            </div><div class="raColor raTransp">  
  
            </div>  
        </div>  
         
    </div><div id="ctl00_mainPlace_RPV_Owners" class="GridPageView" style="display:none;">  

Pavlina
Telerik team
 answered on 29 Nov 2012
1 answer
106 views
I am using Load on Demand ComboBoxes (http://www.telerik.com/support/kb/aspnet-ajax/scheduler/related-load-on-demand-radcomboboxes-in-the-advanced-form-of-radscheduler.aspx) in my Advanced Form.  The combos contain Specialty, Physician, and Contact Number rather than Continent, Country, City.  The Scheduler is setup with TimeLine View and is sorted by Specialty, which is setup as a Resource for Scheduler. 
My issue is that if I double click on a time slot for a Specialty(e.g. Cardiology) when the advanced form loads Cardiology is pre-selected as the Specialty and the Physician combo does not get loaded.  I have to select another specialty for the Physicians to get loaded.  Would it be possible to set Specialty to 'Select a Specialty' No matter what Specialty time slot gets double clicked? 
See attached screenshots



Plamen
Telerik team
 answered on 29 Nov 2012
1 answer
47 views
Hi guys,
Can i create of the reports with telerik reporting using a project web site and not project web application? If yes, how do it?

Thaks
Peter
Telerik team
 answered on 29 Nov 2012
2 answers
130 views
Dear ALL 

I have a RadNumericTextBox and I use a client event called "OnValueChanged" 
It's called when the user changes the value.

What I need more is to call another event when the user changes the value even if it's the same value

i.e if the value is "55" and the user changes it to "55" I need to fire the event

Any Suggestions ??
Noha
Top achievements
Rank 1
 answered on 29 Nov 2012
4 answers
816 views
Hello,

I want to call WebMethod (HelloWorld) from Javascript, when I click on Telerik Button, which will display alert message box.

But I am always getting error as Webmethod Failed.

Am I missing anything?

It is working when use ASP.NET Button control and ScriptManager.
If you can give me any example, it would be helpful.

Thanks in advance.

Regards,
Prajakta Shevade
Prajakta
Top achievements
Rank 1
 answered on 29 Nov 2012
4 answers
148 views
Hi Team,

We have a requirement where we need the RadFilter and RadGrid Inline filter in synchronization, we have noticed that this does not happen out of box in Telerik. So we tried to create a Filter Expression via code and apply it on the grid, It did work but it broke up on the paging of the control.

I would be very grateful if anyone could upload a sample code which does the same. If there is any other way, please do let us know.

Thanks in advance.

Regards,
Abhijit Narvekar
Abhijit
Top achievements
Rank 1
 answered on 29 Nov 2012
3 answers
88 views
How can i get this icon left to right?
Duygu
Top achievements
Rank 1
 answered on 29 Nov 2012
1 answer
41 views

Im trying to check the records present in a popup window from a grid.

 

The items.count returns 0 despite doing a rebind of the popup window prior to the button click.

 

However if I actually launch the popup window to verify the records there and close it the count of records in this popup is then correct from the grid button click.

 

How do I get this working correctly without having to launch the popup every time? I assumed a rebind of this window would suffice?

Rumen
Telerik team
 answered on 29 Nov 2012
1 answer
67 views
Hey Guys,

I've followed one of the forum topics on here in respect of disabling AJAX for a specific postback. Basically I have a button on a page that creates a PDF file. Because the routine is modifying the response and adding response headers, AJAX failed to work. So this is what I've done:

ASPX Page:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" UpdatePanelsRenderMode="Inline" ClientEvents-OnRequestStart="onRequestStart">
<%-- AJAX EVENTS GOES HERE --%>
</telerik:RadAjaxManager>

The ClientEvents-OnRequestStart javascript script looks like this:

function onRequestStart(ajaxManager, eventArgs) {
            if (eventArgs.EventTarget == "ctl00$ContentPlaceHolder1$btnMainExportToPDF") {
                eventArgs.set_enableAjax(false);
                document.getElementById("<%= btnMainExportToPDF.ClientID %>").style.display = "none";
                document.getElementById("<%= imgExportLoader.ClientID %>").style.display = "";
            }
        }

On the server side I have this:

protected void btnMainExportToPDF_Click(object sender, EventArgs e)
    {
        string transDateStart = "";
        string transDateEnd = "";
        if (dtTransDateStart.SelectedDate.HasValue && dtTransDateEnd.SelectedDate.HasValue)
        {
            transDateStart = string.Format("{0}-{1}-{2}", dtTransDateStart.SelectedDate.Value.Year.ToString(), dtTransDateStart.SelectedDate.Value.Month.ToString().PadLeft(2, '0'), dtTransDateStart.SelectedDate.Value.Day.ToString().PadLeft(2, '0'));
            transDateEnd = string.Format("{0}-{1}-{2}", dtTransDateEnd.SelectedDate.Value.AddDays(1).Year.ToString(), dtTransDateEnd.SelectedDate.Value.AddDays(1).Month.ToString().PadLeft(2, '0'), dtTransDateEnd.SelectedDate.Value.AddDays(1).Day.ToString().PadLeft(2, '0'));
        }
 
        string storeID = hfActiveSelectedStoreID.Value;
        string pageRequestURL = string.Format("ReportsPrint-GlobalSpendHistory.aspx?TS={0}&TE={1}&SI={2}", NecBase.Encryption(transDateStart), NecBase.Encryption(transDateEnd), NecBase.Encryption(storeID));
 
        string gridQuery = GetMainGridQuery(false);
        Session["mainGridQuery"] = NecBase.Encryption(gridQuery);
 
        //Also add to Session: Master Category, Sub Category, Products
        IList<RadComboBoxItem> selMasterCategories = cboMainCategories.CheckedItems;
        IList<RadComboBoxItem> selSubCategories = cboSubCategories.CheckedItems;
        //IList<RadComboBoxItem> selProducts = cboProducts.CheckedItems;
 
        Session["selMasterCats"] = GetStringArrayFromIList(selMasterCategories);
        Session["selSubCats"] = GetStringArrayFromIList(selSubCategories);
        //Session["selProducts"] = GetStringArrayFromIList(selProducts);
 
        StringWriter sWriter = new StringWriter();
        Server.Execute(pageRequestURL, sWriter);
 
        string htmlCodeToConvert = sWriter.GetStringBuilder().ToString();
 
        PdfConverter pdfConverter = new PdfConverter();
        pdfConverter.LicenseKey = ConfigurationManager.AppSettings["EvoPdfKey"].ToString();
        pdfConverter.HtmlViewerWidth = 793;
 
        pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
        pdfConverter.PdfDocumentOptions.PdfPageOrientation = PdfPageOrientation.Portrait;
        pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
        pdfConverter.PdfDocumentOptions.ShowHeader = false;
        pdfConverter.PdfDocumentOptions.ShowFooter = false;
        pdfConverter.PdfDocumentOptions.FitWidth = true;
 
        pdfConverter.PdfDocumentOptions.EmbedFonts = true;
        pdfConverter.PdfDocumentOptions.LiveUrlsEnabled = true;
 
        pdfConverter.JavaScriptEnabled = true;
        pdfConverter.PdfDocumentOptions.JpegCompressionEnabled = true;
 
        byte[] pdfBytes = pdfConverter.GetPdfBytesFromHtmlString(htmlCodeToConvert.ToString());
 
        string fileName = string.Format("SpendHistoryReport_{0}{1}{2}", DateTime.Today.Date.Day.ToString(), DateTime.Today.Date.Month.ToString(), DateTime.Today.Date.Year.ToString());
 
        HttpResponse response = HttpContext.Current.Response;
        response.Clear();
        response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}.pdf; size={1}", fileName, pdfBytes.Length.ToString()));
        response.BinaryWrite(pdfBytes);
        response.End();
    }

My question now is, after the server code has executed, I need to re-enable the controls which I just disabled using the Javascript script. I have tried using the ScriptManager.RegisterStartupScript but the javascript never gets called. How can I re-enable the controls after the entire routine has finished executing?

The javascript script I'm using to re-enable the controls looks like this:

function reEnableControl() {
            alert('test');
            document.getElementById("<%= imgExportLoader.ClientID %>").style.display = "none";
            document.getElementById("<%= btnMainExportToPDF.ClientID %>").style.display = "";
        }

The alert box is never shown either. I need to re-enable the controls so that the user can continue selecting other filters or re-export the document if they choose to do so. Since the code modifies the response headers, I cannot ajaxify the button control and use a loading panel instead. Any ideas or thoughts?

The reason why I'm hiding the controls is so that the user is aware that there is activity at that point in time after clicking the button.
Angel Petrov
Telerik team
 answered on 29 Nov 2012
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?