Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
218 views
First, I think I have found a bug, a little glitch in fact.

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx

Select the combobox, open the options, double esc it. Next time you open it, the list will be blank (you have to delete the text inside, usability fail). Something about the "emptytext" and the filtering action.

The same bug hapens here, but a little bad, the list dont open at all:

<telerik:RadComboBox ID="RadComboBox1" runat="server"
 AllowCustomText="False"
 Filter="Contains"
 EmptyMessage="Select one...">
 <Items>
  <telerik:RadComboBoxItem Text="" Value="None" />
  <telerik:RadComboBoxItem Text="test1" Value="0" />
  <telerik:RadComboBoxItem Text="test2" Value="1" />
  <telerik:RadComboBoxItem Text="test3" Value="2" />
 </Items>
</telerik:RadComboBox>

Second, im trying to build a very simple combobox, with some options inside, AllowCustomText setted to false, and contains filtering on. If the user enter some customtext, and click outside the combobox, or just press enter, I do expected the combo to come back to "emptytext" property, because customtext its not allowed. Do i miss understood the property, is it valid for filtered combos, or Im missing something?

Third, I do live in a country (Brazil) that uses accents, like french. Is there a property to ignore accents in the filter? If not, I think its a good idea for the future.


All the best,
André.

Yana
Telerik team
 answered on 23 Feb 2010
5 answers
132 views
Hi,

In my current web application I am extensively using export functionality of rad grid for excel file.
But when I click on "Open" button of "File Download" dialog fix the opened file shows up with junk charactes like % in its name even though the "File Download" dialog displays correct name.
e.g. file name - "%43%75%72%72%65%6e%74%20%4d%61%72%6b%65%74%20%4f%74%68%65%72%20%43%6f%6d%6d%6f%64%69%74%79%20%50%72%69%63%65 1 .xls"
I haven't changed the export code, just setting up default properties in ASPX for export.

I will appreciate the help at earliest.
Thanks,
Avi
Mark Galbreath
Top achievements
Rank 2
 answered on 23 Feb 2010
1 answer
155 views
Hi All,

I am using RadGrid, and i am using following functions to export grid data, all export method works fine except export to pdf, it will not display data properlly in pdf file

protected void BtnExcel_Click(object sender, EventArgs e)
        {
            SetExport();
            ViewState["ExportingPDF"] = null;

            switch ((sender as Button).ID)
            {
                case "Excel":
                    foreach (GridItem commandItem in this.rgAgenda.MasterTableView.GetItems(GridItemType.CommandItem))
                    {
                        commandItem.Visible = false;
                    }

                    rgAgenda.MasterTableView.ExportToExcel();
                    break;
                case "CSV":
                    rgAgenda.MasterTableView.ExportToCSV(); break;
                case "Word":
                    rgAgenda.MasterTableView.ExportToWord(); break;
                case "PDF":
                    rgAgenda.ExportSettings.OpenInNewWindow = true;
                    ViewState["ExportingPDF"] = "True";
                    ExportToPDF();
                    break;
            }
        }

        private void SetExport()
        {
            rgAgenda.ExportSettings.ExportOnlyData = true;
            rgAgenda.ExportSettings.IgnorePaging = true;
            rgAgenda.ExportSettings.OpenInNewWindow = false;
            rgAgenda.ExportSettings.FileName = "AppointmentsInGrid";

            // Removing command item from the exported document
            foreach (GridItem commandItem in this.rgAgenda.MasterTableView.GetItems(GridItemType.CommandItem))
            {
                commandItem.Visible = false;
            }
        }

        private void ExportToPDF()
        {
            if (ddlPaperSize.SelectedIndex > 0 && ddlPaperSize.SelectedIndex <= 5)
            {
                rgAgenda.ExportSettings.Pdf.AllowAdd = false;
                rgAgenda.ExportSettings.Pdf.AllowCopy = true;
                rgAgenda.ExportSettings.Pdf.AllowModify = true;
                rgAgenda.ExportSettings.Pdf.AllowPrinting = true;
                rgAgenda.ExportSettings.Pdf.Author = "Anonymous";

                rgAgenda.ExportSettings.Pdf.PageTitle = "Appointments Report";
                rgAgenda.ExportSettings.Pdf.Subject = "PDF Export";
                rgAgenda.ExportSettings.Pdf.Title = "PDF Export";

                rgAgenda.ExportSettings.Pdf.PaperSize = (GridPaperSize)Enum.Parse(typeof(GridPaperSize), ddlPaperSize.SelectedValue);
                rgAgenda.MasterTableView.ExportToPdf();
                ddlPaperSize.ClearSelection();
            }
        }


Thanks & Regards
Amit Prajapati





Daniel
Telerik team
 answered on 23 Feb 2010
1 answer
74 views
1. What's a green picker in the header (all browsers)?
2. IE7: I can't repair its apperance...
Peter
Telerik team
 answered on 23 Feb 2010
3 answers
142 views

I'm having a problem with my rad docks.  All my docks are created in code behind.  I add the title and the commands in code behind as well.  Everything works fine to that point.  Now I am trying to add a control to the title bar.  When I add it the vertical position of the commands is pushed down causing them to be hidden from view.

I have tried to implement a custom titlebar template, but I have not found out how to control the placement of the commands.

Here is some code creating the rad dock.

 
//Create the Rad Dock and set properties   
RadDock rd = new RadDock ();  
rd.DockMode = DockMode.Docked;   
rd.UniqueName = Guid.NewGuid().ToString();  
rd.ID = string.Format("rd{0}",rd.UniqueName);   
rd.Width = Unit.Percentage(99);   
rd.Skin = "Custom";  
rd.EnableEmbeddedSkins = false ;  
rd.EnableRoundedCorners = true ;  
rd.Title = "Title";  
   
rd.Command += new   
DockCommandEventHandler(rd_Command);  
DockCommand cmd = new DockCommand();  
cmd.AutoPostBack = true;   
cmd.Name = hideCommand;  
cmd.Text = "Hide";   
rd.Commands.Add(cmd);  
rd.Commands.Add(new DockExpandCollapseCommand());  
 

 
Here is the code to add the Icon and title to the title bar.

 
Label lbl = new Label();  
lbl.ID = "lbl" + rd.ID;  
lbl.EnableViewState = true;  
lbl.Width = Unit.Pixel(250);  
lbl.Text = "My Desired Content";  
 
Image mg = new Image();  
mg.ImageUrl = "~/demo/oldData.jpg";  
mg.ID = "mg" + rd.ID;  
// This method here will add a tooltip to the image  
// so users can see old data on mouseover.  
CreatePastDataToolTip(rd,null, mg.ID);  
rd.ContentContainer.Controls.Add(lbl);  
rd.TitlebarTemplate = new TitleBarTemplate();  
rd.TitlebarContainer.Controls[0].FindControl(TitleBarContent).Controls.Add(mg); 


Here is my Custom TitleBar Template.  I've implemented a couple different ideas, this was my last idea, and it worked as far as lining up the Title and the Image in the title.  But, I still couldn't get the Commands to display within the titlebar.

  

 
   public class TitleBarTemplate : ITemplate  
   {  
      Label lblText = new Label();  
      Panel pContainer = new Panel();  
      Panel pControls = new Panel();  
 
      public void InstantiateIn(Control container)  
      {  
         Literal l;  
         lblText.ID = "TitleText";  
         lblText.Text = "Initial Text";  
         //pControls.CssClass = "rdTitleControls";  
         pControls.ID = "PanelForControls";  
         l = new Literal();  
         l.Text = "<table><tr><td>";  
         pContainer.Controls.Add(l);  
         pContainer.Controls.Add(lblText);  
 
         l = new Literal();  
         l.Text = "</td><td>";  
         pContainer.Controls.Add(l);  
         pContainer.Controls.Add(pControls);  
         l = new Literal();  
         l.Text = "</td></tr></table>";  
         pContainer.Controls.Add(l);  
 
         container.Controls.Add(pContainer);  
      }  
   } 

Any help would be greatly appreciated.



Adam
Adam Heeg
Top achievements
Rank 1
 answered on 23 Feb 2010
3 answers
175 views
I've searched and search and can't quite find an example like I'm looking for.  Here's my situation and I'll keep it as simple as possible:

I have a RadToolbar and a user control on a page.  The user control has a RadGrid in it.  When I click a button on the RadToolbar, I want to ajaxify the user control (no screen flash / reload).  The grid gets populated in the NeedDataSource() event by pulling it's data from a session variable that was populated in the button click event..  Really all I need to know is how to wire this up. If a simple example could be provided, that would be great.  Like I already said, I've searched the forums, online demos, & help file.

Thanks,
Rob
Iana Tsolova
Telerik team
 answered on 23 Feb 2010
4 answers
401 views
Hi,
I am using RadTree and i want a tree without root node. So How can i remove only root node from tree. Please help me.

Thanks,
Sagar
Simon
Telerik team
 answered on 23 Feb 2010
4 answers
188 views
Hi,

I'm getting close - but I'm having an issue with the positioning being consistant. Also, I'd like to be able to click as well as hover - (since I'm using jquery.hoverIntent.js)

<telerik:RadPanelBar runat="server" ID="itemToolbar" Width="231px" Height="500px" ExpandMode="SingleExpandedItem"  AllowCollapseAllItems="true"> 
    <DataBindings> 
        <telerik:RadPanelItemBinding CssClass="anItem" Depth="1" /> 
    </DataBindings> 
</telerik:RadPanelBar> 
<telerik:RadContextMenu ID="itemMenu" runat="server" OnClientItemClicked="subItemClicked" /> 
 
$(document).ready(function() { 
    var isShown = false; 
    var hoverIntentConfig = { 
        sensitivity: 1,     
        interval: 200, // number = milliseconds for onMouseOver polling interval     
        over: function(e) { 
            var itemName = $(this).text(); 
            var panelBar = $find("<%= itemToolbar.ClientID %>"); 
            var theItem = panelBar.findItemByText(itemName); 
            if (theItem != null) { 
                showItemMenu(theItem.get_element(), itemName); 
            } 
        }, // function = onMouseOver callback (REQUIRED)     
        timeout: 500, // number = milliseconds delay before onMouseOut     
        out: function(e) { 
         
        } // function = onMouseOut callback (REQUIRED) 
    }; 
    // Setup the hoverIntent for every item in the panelBar 
    $('.anItem').hoverIntent(config); 
}); 
 
var oldItem = null; 
var isCalled = false; 
function showItemMenu(targetControl, itemName) { 
    var theMenu = $find("<%= itemMenu.ClientID %>"); 
    theMenu.removeTargetElement(targetControl); 
 
    isCalled = true; 
    $.ajax({ 
        type: 'POST', 
        url: "SamplePage.aspx/GetItemList", 
        data: "{'itemName':'" + itemName+ "'}", 
        contentType: "application/json; charset=utf-8", 
        dataType: "json", 
        success: function(result) { 
            if (isCalled == true) { 
                var menu = $find("<%= itemMenu.ClientID %>"); 
                menu.trackChanges(); 
                 
                // Empty the context menu out 
                menu.get_items().clear(); 
                var resultItems = result.d.split(","); 
 
                for (var i = 0; i < resultItems.length; i += 1) { 
                    var subItem = new Telerik.Web.UI.RadMenuItem(); 
                    subItem .set_text(resultItems[i]); 
                    menu.get_items().add(subItem); 
                } 
                 
                menu.commitChanges(); 
 
                oldItem = targetControl; 
                menu.addTargetElement(targetControl); 
 
                var offset = $(targetControl).offset(); 
                menu.showAt(offset.left + 50, offset.top); 
                isCalled = false; 
           } 
       }, 
       error: function(result) { 
           if (isCalled == true) { 
               alert(result.status + " " + result.statusText); 
               isCalled = false; 
           } 
       } 
   }); 
} 

Sometimes it'll work great, but then other times - the position of the menu is all off. I'm not sure why .. 

Anyone have any advice?
Thanks,
Kori
Kori
Top achievements
Rank 2
 answered on 23 Feb 2010
1 answer
408 views
I have a radupload control that I want to act as a simple file upload (much like the old asp file upload worked), so am using it like this:

<telerik:RadUpload ID="RadUploadEmployeePhoto" runat="server"   
         ControlObjectsVisibility="None" InitialFileInputsCount="1"   
         MaxFileInputsCount="1" /> 

I need to be able to iterate through the collection of selected files in my code behind (I'm using VB) and remove all selected files.

To give some background on why I need to do this, I am working on a corporate directory application.  When an Admin is editing an employee record, they are presented with 3 checkboxes (Add Photo / Delete Photo / Restore Backup).  I have my code set up to only allow one checkbox to be selected at a time (much like the functionality of a radio button) and the radupload is only visible when the "Add Photo" checkbox is selected (otherwise, I set visible=false).  Now, should the user select "Add Photo" and then select a photo to upload, and then change their mind and select "Restore Backup", the radupload control will not be visible, but will still have a selected value, and the upload will still be processed as normal, but will conflict with the "Restore Backup" option the user selected last.  To solve the issue, in my code behind, I need to be able to remove all selected files.

Thanks!
T. Tsonev
Telerik team
 answered on 23 Feb 2010
1 answer
83 views

Posted 0 minutes ago (permalink)

Hello telerik team,

I would appreciate so much if you can reply to me as early as possible.
I have added a "Title" custom text box to each instance of Radupload files using "onClientAdded" fucntion.

But, now i need to validate the additional text box added using java script, and
I have been trying so many ways in futile. Client side validation is mandatory

Please help me asap.

Thank you,
Bharathi
Genady Sergeev
Telerik team
 answered on 23 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?