Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
Hi,

I have a TreeList with AllowLoadOnDemand="true". When I export the TreeList using the following code, the exported document has a blank row for header as can be seen in the attached screenshot.


protected void radButtonExcel_Click(object sender, EventArgs e)
 
{
 
rptTreeList.ExportSettings.IgnorePaging = true;
 
rptTreeList.ExportSettings.ExportMode = TreeListExportMode.RemoveAll;
 
rptTreeList.Rebind();
 
rptTreeList.ExportToExcel();
 
}


Please Help!

Thanks,
NA
Kostadin
Telerik team
 answered on 14 Oct 2013
2 answers
59 views
I am trying to implement recurrence appointment. In appointmentinsert event the recurenncestate is showing as not recurring, even though i checked the recurrence checkbox. Someone tell me what i am missing
Plamen
Telerik team
 answered on 14 Oct 2013
2 answers
111 views
Hi,

We are having major problem with the tooltip closing unexpectedly...

In your demo:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/overview/defaultcs.aspx

Change to:
HideEvent: LeaveToolTip
RenderMode: Lightweight

After the tooltip is displayed, move the cursor slowly (moving really fast wont reproduce the issue!), from the top or from the left until the cursor is above the tooltip. In this case the tooltip closes immediately when entering the tooltip!!!

If moving the cursor from the right or bottom into the tooltip, this does not happen.

This issue happens all the time for our users since the tooltip in our case always are located directly to the right of the hovered element, and users often moves the cursor just a little bit to the right and the tooltip closes...

Tested in Firefox and IE10, same behavior.
Only happens in Lightweight render mode...

Regards
Caesar
Andreas
Top achievements
Rank 1
 answered on 14 Oct 2013
4 answers
199 views
Hi,

I don't understand why this settings don't work well?

<telerik:RadAsyncUpload ID="RadAsyncUpload1" Width="200px" AllowedFileExtensions=".xls" MultipleFileSelection="Disabled" runat="server" OnFileUploaded="RadAsyncUpload1_FileUploaded">
    <FileFilters>
        <telerik:FileFilter Description="Excel(*.xls)" Extensions="xls" />
    </FileFilters>
</telerik:RadAsyncUpload>

Anyone have an idea?

Thank you.
Peter Filipov
Telerik team
 answered on 14 Oct 2013
1 answer
158 views
 Hi 
I want to color the rows who has value of Size Not Accessed in Month( in Tib) >2 to red and to yellow for value between 1 and 2 

if you expand the group of rows it should show the inner row for which the value is >2 as red 

Please see the attached image as example.
Antonio Stoilkov
Telerik team
 answered on 14 Oct 2013
1 answer
105 views
Hello
Hello I am trying to place radconfirm through client side .but it wont work .
I have one button .while i clicking the button passed values to client using client script.
but the radconfim is not working inside the client function

 protected void rbconfirm_Click(object sender, EventArgs e)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "closewin", "confirmation('subin');", true); 
        }


   function confirmation(E) {

           radconfirm('Do you want to save?', CallBackFnDefaultSave);

        }

   function CallBackFnDefaultSave(val) {
            alert(val);
        }
User
Top achievements
Rank 2
 answered on 12 Oct 2013
3 answers
82 views
Hello,
I am having a rad grid, in which I try to filter one column according to a range of dates.
I don't know what is the problem, but the filter is doing its job only by the day of the month.
I will appreciate if you have a look on the following.

Thank you in advance.
Tal

  ********** aspx:***************
 
<telerik:GridBoundColumn DataField="date" HeaderText="תאריך" DataType="System.DateTime"
                                   SortExpression="date" UniqueName="Date"
                   DataFormatString="{0:D}"  HeaderStyle-Width="330px"  ItemStyle-HorizontalAlign="Center">
                   <FilterTemplate>
                       מתאריך
                       <telerik:RadDatePicker ID="FromDate"  Culture="he-IL" runat="server" Width="140px" ClientEvents-OnDateSelected="FromDateSelected"
                           MinDate="07-04-1000" MaxDate="05-06-3000" DbSelectedDate='<%# startDate %>'/>
                           <dateinput DateFormat="dd/MM/yyyy"></DateInput
                      עד תאריך
                       <telerik:RadDatePicker  ID="ToDate" Culture="he-IL" runat="server" Width="140px" ClientEvents-OnDateSelected="ToDateSelected"
                           MinDate="07-04-1000" MaxDate="05-06-3000" DbSelectedDate='<%# endDate %>'/>
                           <dateinput DateFormat="dd/MM/yyyy"></DateInput>
 
                       <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                        
                           <script type="text/javascript">
                               function FromDateSelected(sender, args) {
                                   var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                   var ToPicker = $find('<%# ((GridItem)Container).FindControl("ToDate").ClientID %>');
 
                                   var fromDate = FormatSelectedDate(sender);
                                   var toDate = FormatSelectedDate(ToPicker);
                                   if (toDate != '') {
                                       tableView.filter("Date", fromDate + " " + toDate, "Between");
                                   }
 
                               }
                               function ToDateSelected(sender, args) {
                                   var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                   var FromPicker = $find('<%# ((GridItem)Container).FindControl("FromDate").ClientID %>');
 
                                   var fromDate = FormatSelectedDate(FromPicker);
                                   var toDate = FormatSelectedDate(sender);
                               
                                      
                                       if (fromDate != '')
                                       {
                                       tableView.filter("Date", fromDate + " " + toDate, "Between");
                                   }
                               }
                               function FormatSelectedDate(picker) {
                                   var date = picker.get_selectedDate();
                                   var dateInput = picker.get_dateInput();
                                   var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
 
                                   return formattedDate;
                               }
                           </script>
                       </telerik:RadScriptBlock>
                   </FilterTemplate>
               </telerik:GridBoundColumn>



code behind cs:
 
     if (e.CommandName == RadGrid.FilterCommandName)
            {
                Pair filterPair = (Pair)e.CommandArgument;
  
                switch (filterPair.Second.ToString())
                {
                    case "date":
                        this.startDate = ((e.Item as GridFilteringItem)[filterPair.Second.ToString()].FindControl("FromDate") as RadDatePicker).SelectedDate;
                        this.endDate = ((e.Item as GridFilteringItem)[filterPair.Second.ToString()].FindControl("ToDate") as RadDatePicker).SelectedDate;
                        break;
                    default:
                        break;
                }
 
 
            }
Konstantin Dikov
Telerik team
 answered on 12 Oct 2013
3 answers
114 views
Hi,
I am trying to upgrade the Telerik dll in a project from version(2010.3.1317.40) to version(2013.1.417.40).
I have removed the older version dll and then I have added the latest version dll.
But when I run the project after building the prioject I am getting an exception like given below
"Could not load file or assembly 'Telerik.Web.UI, Version=2013.1.417.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference".

I have googled on this and got the below links
http://www.telerik.com/help/aspnet-ajax/introduction-troubleshooting.html
http://www.telerik.com/support/kb/aspnet-ajax/editor/error-could-not-load-file-or-assembly-telerik-web-ui-version-xxxxx-x-xxxx-x-culture-neutral-publickeytoken-xxxx-or-one-of-its-dependencies.aspx
http://www.telerik.com/help/aspnet-ajax/introduction-upgrading.html

I have followed exactly what Telerik Experts mentioned in these links. But still I am getting exception.

On further investigation I found out that there is another dll namely "RadTreeview.Net2.dll" in my solution.

Will this have any effect for this issue.?

Please suggest me a work around for this issue
A2H
Top achievements
Rank 1
 answered on 12 Oct 2013
2 answers
235 views
Hi,

I'm using two lists as a dual list.  I need to enhance the lists in a few ways: allow checkboxes in the destination list, only allow ONE item to be checked in the destination list, and enhance the items in the destination list to provide obvious visual cues for users.

All the code is in a user control - the lists are completely programmatically created and jquery is used to do some of the client-side magic.  I am having state issues, though.

Issue 1 - move an item from the select list to the destination list.  Check the item then move it back to the select list, using the To Top button.  Note the item's style (now in the select list) has taken on the Red style of the inserted span from the destination list.  It should be back to just a regular list item with the select list's default style.  

Issue 2 - now move the same item back to the Destination list. Note that it somehow retains its checked status and the additional span I added.  It should be back to just a default unchecked item (which then gets styled blue).  With multiple items in the bottom list, in this manner it's possible to end up with 2 items checked in the destination list.

Issue 3 - now uncheck the item then move it back to the select list, using the To Top button. Back to the Red style???

All these issues are related - the list is trying to preserve item state. I need it to forget the item state and just let the items fall back to their default state so they can be predictably manipulated.  

There is also a block of code commented out in the .js file in which I explicitly remove all the changes I make to the items.  This code doesn't work either, as spans get moved around when the listbox is trying to preserve their state.

Thanks in advance for your input.
JD

C#:
public class UserControl1 : WebControl
    {
 
        private RadListBox _RlbItemSelect = new RadListBox();
        private RadListBox _RlbItemDestination = new RadListBox();
        private Panel _ListDiv = new Panel();
        private Button _Button = new Button();
        private Label _Label1 = new Label();
        private Button _Button2 = new Button();
 
        HtmlGenericControl _TestList = new HtmlGenericControl("ul");
        HtmlButton _TestButton = new HtmlButton();
 
        void _Button_Click(object sender, EventArgs e)
        {
            _Label1.Text = "Postback";
            _RlbItemSelect.Items.Add(new RadListBoxItem("This is another item, added after postback"));
        }
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
 
            _Label1.ID = "_Label1";
            _Label1.Text = "Initial Load";
 
            _Button.Text = "RefreshPage";
            _Button.ID = "_Button";
            _Button.Click += _Button_Click;
 
            this.Page.Form.Controls.Add(_Button);
            this._ListDiv.Controls.Add(_Label1);
 
            this.Controls.Add(_ListDiv);
 
            this._ListDiv.Controls.Add(new LiteralControl("<br/><br/><span id style=\"text-align:left;\">Title</span><br/>"));
            this._RlbItemSelect.ID = "_RlbItemSelect";
            this._RlbItemSelect.Height = Unit.Pixel(200);
            this._RlbItemSelect.Width = Unit.Pixel(800);
            this._RlbItemSelect.AllowTransfer = true;
            this._RlbItemSelect.AllowReorder = false;
            this._RlbItemSelect.AllowTransferOnDoubleClick = true;
            this._RlbItemSelect.TransferToID = "_RlbItemDestination";
            this._RlbItemSelect.ButtonSettings.Position = ListBoxButtonPosition.Bottom;
            this._RlbItemSelect.ButtonSettings.HorizontalAlign = ListBoxHorizontalAlign.Center;
            this._RlbItemSelect.ButtonSettings.RenderButtonText = true;
            this._RlbItemSelect.CssClass += " PopDualListHgSelect";
 
 
            this._RlbItemDestination.ClientIDMode = System.Web.UI.ClientIDMode.Static;
            this._RlbItemDestination.ID = "_RlbItemDestination";
            this._RlbItemDestination.Height = Unit.Pixel(200);
            this._RlbItemDestination.Width = Unit.Pixel(800);
            this._RlbItemDestination.EmptyMessage = "Must choose at least one gateway pop";
            this._RlbItemDestination.CheckBoxes = true;
            this._RlbItemDestination.CssClass += " PopDualListHgDestination";
            this._RlbItemDestination.SelectionMode = ListBoxSelectionMode.Single;
            this._RlbItemDestination.OnClientItemChecking = "singleSelectionInHgDestLb";
            this._RlbItemDestination.PersistClientChanges = true;
            this._RlbItemDestination.EnableViewState = true;
 
            this._ListDiv.Controls.Add(this._RlbItemSelect);
            this._ListDiv.Controls.Add(new LiteralControl("<br/>"));
            this._ListDiv.Controls.Add(this._RlbItemDestination);
            this._ListDiv.Controls.Add(new LiteralControl("<br/>"));
 
            if (!Page.IsPostBack)
            {
                _RlbItemSelect.Items.Add(new RadListBoxItem("This is item 1"));
                _RlbItemSelect.Items.Add(new RadListBoxItem("This is item 2"));
                _RlbItemSelect.Items.Add(new RadListBoxItem("This is item 3"));
                _RlbItemSelect.Items.Add(new RadListBoxItem("This is item 4"));
            }
 
            Page.ClientScript.RegisterClientScriptInclude("scripts/listBox.js""scripts/listBox.js");
        }
 
 
    }


Javascript:
function singleSelectionInHgDestLb(sender, args) {
    var item = args.get_item();
    var lb = item.get_listBox();
    lb.trackChanges();
    var items = sender.get_items();
    var checked = item.get_checked();
    var ele = $(item.get_element());
    if (checked == false) {
        clearChecks(items);
        ele.closest(".rlbItem").find("label").SetHgSpanText(true);
    }
    else {
        ele.closest(".rlbItem").find("label").SetHgSpanText(false);
    }
 
    lb.commitChanges();
}
 
 
function clearChecks(items) {
    items.forEach(function (itm) {
        itm.set_checked(false);
        var ele = $(itm.get_element());
        ele.closest(".rlbItem").find("label").SetHgSpanText(false);
    });
}
 
 
(function ($) {
    $.fn.SetHgSpanText = function (isPrimary) {
        var setText = "SECONDARY";
        var color = "blue";
        if (isPrimary) { setText = "PRIMARY"; color = "red"; }
        if ($(this).find(".hgInd").length) {
            $(this).find(".hgInd").text("(" + setText + ") ");
            $(this).find(".hgInd").attr("style""color: " + color + "; font-size: 8pt");
        else {
 
            $(this).find(".rlbCheck").after("<span class='hgInd' style='color: "
                 + color + "; font-size: 8pt' class='rlbSpan'>(" + setText + ") </span>");
        }
        $(this).find(".rlbText").removeAttr("style");
    };
})(jQuery);
 
 
$(function () {
    $("#main").on("DOMNodeInserted"".PopDualListHgDestination .rlbList"function (e) {
        if ($(e.target).is(".rlbItem")) {
            var checked = $(e.target).find(".rlbCheck[checked='checked']").length > 0;
            $(e.target).find("label").SetHgSpanText(checked);
        }
    });
});
 
////This cleanup does method not work
//$(function () {
//    $("#main").on("DOMNodeInserted", ".PopDualListHgSelect .rlbList", function (e) {
//        if ($(e.target).is(".rlbItem")) {
//            $(e.target).find(".hgInd").remove();
//            $(e.target).find(".rlbText").removeAttr("style");
//        }
//    });
//});
 
$(document).ready(function () {
    $("#main").find(".PopDualListHgDestination .rlbCheck[checked='checked']").closest("label").SetHgSpanText(true);
    $("#main").find(".PopDualListHgDestination .rlbCheck[checked!='checked']").closest("label").SetHgSpanText(false);
});
JD
Top achievements
Rank 1
 answered on 11 Oct 2013
1 answer
114 views
Hello,
this is my 2nd request.
Please help me out on this.
I have a Radgrid and when I try to export to PDF I am getting runtime error:
Invalid XHTML. RadGrid has to render correct XHTML in order to export to PDF. Parse error: '.', hexadecimal value 0x00, is an invalid character. Line 5036, position 159. at line: 1041399P5655380794N112 08/20/2012500$209.90
Source: Telerik.Web.UI

Thanks so much.
David
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 11 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?