Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
521 views
Hi,

I'm working on a time sheet application that has a dropdownlist on the first column to select the charge code.  The requirements I have is that this column be read-only in edit mode to disallow the user to change the charge code.  I've seen some code examples online, but they don't completely solve the problem because sometimes the charge codes are inactivated for a user, so they will no longer show up on in the dropdownlist, which throws an error. 

Is there a way to switch this to readonly on the PreRender, or otherwise prevent the dropdownlist from databinding?

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 28 Mar 2011
1 answer
135 views
how can i get the value in gridnumeric column
Shinu
Top achievements
Rank 2
 answered on 28 Mar 2011
4 answers
258 views
Hi,
In my RadPanelBar, the item text is wrapped if it's too long . The problem is when I hover the mouse over the item, only the first line changes color and this is confusing to user. Is it possible for both(or all) lines of text for that text to change color on mouse over ?

Thanks
Steele
Top achievements
Rank 1
 answered on 28 Mar 2011
1 answer
126 views
I have a RadGrid that is bound on the client-side. It contains a GridTemplateColumn with a label and a tooltip.
Because it's bound on the client i can only assume that I would need to dyanmically set the tooltip text there as well.  My issue is that I cannot get the handle of the tooltip in the OnRowDataBound event.  ...Possibly because it lies within the RadGrid.  Any ideas on how to accomplish this?

The GridTemplatecolumn:

 

<telerik:GridTemplateColumn DataField="dataf1" HeaderText="myheading1" UniqueName="dataf1">

 

 

<ItemTemplate>

 

 

<asp:Label ID="Label1" runat="server" Text='hover'>

 

 

</asp:Label>

 

 

<telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="Label1" Width="150px"

 

 

RelativeTo="Element" Position="MiddleRight" EnableShadow="true">

 

</telerik:RadToolTip>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 


handle to tooltip is null

 

 

 

 

function OnRowDataBound(sender, args)

 

 

{

 

 

 var tooltip = $find("RadToolTip1");
tooltip.set_text = "something new here";        //this is null!
}

Viz
Top achievements
Rank 1
 answered on 27 Mar 2011
1 answer
118 views
Hi,
I have some issues with the RadButton click event. I have an user control that has a ListView and RadButton. On the main page I set the radbutton clicke event in a declarative way by exposing the radbutton as a usercontrol property. when users click on a some other button on main page I am databinding the listview and adding a responsescript that i want to run after the ajax call. But when I click the radbutton on the usercontrol it doesnt work. But, when I take out the reponsescript it works fine. Please let me know if I am missing something.

Thanks in advance!!!
Mammu
Top achievements
Rank 1
 answered on 27 Mar 2011
1 answer
70 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
154 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
323 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
164 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
131 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?