Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
53 views
Can you  let me know  where  the Ajax-Schedule  Video's "Schedulercustomadvancedform"  latest source code  is  ? 

I   need  it  quickly,  Netframe 4  version  is preferred. 

Please  send  Ajax-Schedule  Video's "Schedulercustomadvancedform"  latest source code  URL or  source zip file  into 
Indong@nouvolution.com;sooyoun@nouvolution.com      !!!

Thanks
Veronica
Telerik team
 answered on 26 Mar 2011
2 answers
123 views
Hello,

I am using the scheduler in a project with a webservice and a custom dbschedulerprovider (all working very nicely).

I am now making a custom advanced form to handle the appointment data.  My problem is that I need to reload the controls on my form as the data loaded (in the combo boxes) changes in relation to which appointment has been opened.

I have been looking at the OnClientFormCreated event for a way to do this.  This is what is in the example.

function OnClientFormCreated(scheduler, eventArgs) {
               // Create a client-side object only for the advanced templates
               var mode = eventArgs.get_mode();
               if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
                   mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
                   // Initialize the client-side object for the advanced form
                   var formElement = eventArgs.get_formElement();
                   var templateKey = scheduler.get_id() + "_" + mode;
                   var advancedTemplate = schedulerTemplates[templateKey];
                   if (!advancedTemplate) {
                       // Initialize the template for this RadScheduler instance
                       // and cache it in the schedulerTemplates dictionary
                       var schedulerElement = scheduler.get_element();
                       var isModal = scheduler.get_advancedFormSettings().modal;
                       advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
                       advancedTemplate.initialize();
 
                       schedulerTemplates[templateKey] = advancedTemplate;
                   }
 
                   // Are we using Web Service data binding?
                   if (!scheduler.get_webServiceSettings().get_isEmpty()) {
                       // Populate the form with the appointment data
                       var apt = eventArgs.get_appointment();
                       var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
                       var editSeries = eventArgs.get_editingRecurringSeries();
                       advancedTemplate.populate(apt, isInsert, editSeries);
                   }
               }

I would be grateful if you could direct me to more detailed information regarding this or any examples that demonstrate my required functionality.

Best Regards,
Michael
Veronica
Telerik team
 answered on 26 Mar 2011
6 answers
251 views
protected void rauIMAGE_ValidatingFile(object sender, Telerik.Web.UI.Upload.ValidateFileEventArgs e)
        {
            //we will check image height and width
            if (rauIMAGE.UploadedFiles.Count > 0)
            {
                foreach (UploadedFile theFile in rauIMAGE.UploadedFiles)
                {
                    //Stream stream = theFile.InputStream; (when uncomment problem occurs)
                    //using (System.Drawing.Bitmap myImage = new System.Drawing.Bitmap(stream,false))
                    //{
                    //    if (myImage.Width > 128 || myImage.Height > 128)
                    //    {
                    //        master.ShowMessage("Image bigger than width :300px by height: 100px not allowed", null, "");
                    //        e.IsValid = false;
                    //    }
                    //}
                    //e.SkipInternalValidation = true;
                }
            }
        }

In the above code block I try to determine uploaded image width and height to be able to prevent from uploading image size larger than (128x128)
but when use inputstream to create new image object I come across with strange error. Also

System.Drawing.Bitmap myImage = new System.Drawing.Bitmap(stream,false) error
System.Drawing.Bitmap myImage = new System.Drawing.Bitmap(theFile.InputStream,false) error
System.Drawing.Bitmap myImage = new System.Drawing.Bitmap(128,128) no error when also comment this line--> (Stream stream = theFile.InputStream)

Do you have any idea about that strange error ??
Dan Hardin
Top achievements
Rank 1
 answered on 25 Mar 2011
7 answers
112 views
I have a panel bar in a user control. I can see all the items in the panel bar and expand it too, but I cannot collapse the panel bar. below is my code
if (!Page.IsPostBack)
        {
            CSModel.CsMenu menu = new CSModel.CsMenu();
  
  
            IList<CsMenuSection> getMenuItems = menu.GetAllItems();
            
               foreach (CsMenuSection section in getMenuItems)
               {
                   RadPanelItem newItem = new RadPanelItem(section.Text);
                   RadPanelBar1.Items.Add(newItem);
                   CsMenuItem item = new CsMenuItem();
                   for (int i = 0; i <= section.MenuItems.Count-1; i++)
                   {
                       RadPanelItem childItem = new RadPanelItem(section.MenuItems[i].Text);
                       RadPanelItem InternalChildItem = new RadPanelItem();
                       // add to the child
                       childItem.Items.Add(InternalChildItem);
                       // set the content
                       InternalChildItem.Value = section.MenuItems[i].Link;
                       newItem.Items.Add(childItem);
  
                   }
                  
  
               }
        }
  
My .aspx page is like this
  
<table>
    <tr>
   
           <td>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="FullExpandedItem" Height="250px" >
            </telerik:RadPanelBar>
          
        </td>
      
      
    </tr>
  
  
  
  
</table>
  
My CsMenu section looks like this
  public IList<CsMenuSection> GetMenuItems()
        {
            // go to DB to find menu items.
            CsMenuSection section = new CsMenuSection("DataReview","");            
            section.AddMenuItem(new CsMenuItem("Score rep", "/RepScore/Index"));
            section.AddMenuItem(new CsMenuItem("Something else", "/something/something"));
  
            CsMenuSection section2 = new CsMenuSection("Section 2", "");
            section2.AddMenuItem(new CsMenuItem("Sample", "/repScoring/Selectreps"));            
  
  
            _menu_item_list.Add(section);
            _menu_item_list.Add(section2);
            return MenuItemList;
             
              
        }
Shivers999
Top achievements
Rank 1
 answered on 25 Mar 2011
2 answers
105 views
Hi!

I can see in this link an example to expand and collpase nodes
http://www.telerik.com/help/aspnet-ajax/tree_clientexpandingcollapsing.html

My problem is how to activate this by clicking the Plus and Minus sign of the main node?

Thanks
JL
Joao
Top achievements
Rank 2
 answered on 25 Mar 2011
3 answers
182 views
Hello,

I'm using the automatically generated edit and insert controls for the RadTreeView and so far everything is working out fine, except that I'm stuck on one thing.

I would like to limit the number of nested inserts a user can do by disabling and hiding the insert on certain rows (which will be determined programatically in the ItemDataBound Event).

This is just a simple example of what I'd like to do.  Basically if the "level" of the item is 4, I would like to disable and hide the insert.

protected void ItemDataBound(object sender, TreeListItemDataBoundEventArgs e)
   {
       if (e.Item.ItemType == TreeListItemType.AlternatingItem || e.Item.ItemType == TreeListItemType.Item)
       {
           TreeListDataItem item = e.Item as TreeListDataItem;
           int level = (int)DataBinder.Eval(item.DataItem,"Level");
           if (level == 4)
           {
               item["InsertCommandColumn"].Enabled = false;
                
           }
             
       }
   }

The item["InsertCommandColumn"].Enabled kind of works, but it keeps the control visible and confusing for the end user.

If I hide the Cell entirely, all of the other cells shift over to fill the void.

Is there a more graceful way to disable an automatically generated insert button on a row by row basis?
David
Top achievements
Rank 1
 answered on 25 Mar 2011
2 answers
93 views
Hello Telerik,

I read that in the latest release you added AsyncUpload to the File Explorer.

  • http://www.telerik.com/products/aspnet-ajax/whats-new.aspx
  • RadFileExplorer - With Q1 2011 release, the Telerik ASP.NET AJAX FileExplorer component adds valuable features, such as AsyncUpload and filter textbox for grid. See demo
I went to the "see demo" page, but all I saw was the new filter.

When are you going to have a demo of the new feature? Do you have any example source code?

Thanks,

-Josh



Joshua
Top achievements
Rank 1
 answered on 25 Mar 2011
11 answers
1.3K+ views
I have read the online help on you to config the web.config file for the Telerik RadUpload Premetheus server control. I still obtain an error message the "Could not load type "Telerik.Web.UI.RadUploadProgressHandler from assembly "Telerik.Web.UI".

How do I solve this issue so that I can use the RadUpload server control?
Nishat Mazhar
Top achievements
Rank 1
 answered on 25 Mar 2011
2 answers
480 views
In radWindow, I have to pass the whole http path to enable the rad window route to the page, "~/Popus/Default.aspx" doesn't work, I have to put "http://localhost:1234/Popus/Default.aspx". Any ideas?

Thanks.
Shannnon
Top achievements
Rank 1
 answered on 25 Mar 2011
4 answers
248 views
I have been playing around with the button with splitbutton enabled, trying to show a contextmenu.

having read articles on the subject none seem to do the trick, or atleast not the way i want it to.

setting the target element of contextmenu only applies when user right-clicks, and is catched on the whole button, not the splitbutton.

Using this script i get
"Unable to get value of the property 'relatedTarget': object is null or undefined"

function showMenu(e)
 {
    var contextMenu = $find("<%ctl00_phHead_pbCaseDetails_i0_i0_RadContextMenu1");
    if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget)))
    {
       contextMenu.show(e);
    }
    $telerik.cancelRawEvent(e);
}

<telerik:RadButton ID="btnCaseSave" runat="server" EnableSplitButton="True" AutoPostBack="false" 
    Skin="Windows7" Text="Spara" OnClientClicked="showMenu(event)">
</telerik:RadButton>
<telerik:RadContextMenu ID="RadContextMenu1" runat="server" Skin="Windows7">
<Targets>
<telerik:ContextMenuElementTarget ElementID="ctl00_phHead_pbCaseDetails_i0_i0_btnCaseSave" />
</Targets>
    <Items>
        <telerik:RadMenuItem Text="Spara och avsluta">
        </telerik:RadMenuItem>
    </Items>
</telerik:RadContextMenu>


How do i get the contextmenu to show on left-click on splitbutton only, and keep postback method on the main button?
Christian
Top achievements
Rank 1
 answered on 25 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?