Telerik Forums
UI for ASP.NET AJAX Forum
17 answers
342 views
I have created my own advanced form "AdvForm.ascx"

At the top of my .aspx file i have put:

<%@ Register  tagprefix="schedular" tagname="AdvForm"  src="AdvForm.ascx"%>

Then further down in the scheduler i have put the following:

<script type="text/javascript">   
        //<![CDATA[
 
            // Dictionary containing the advanced template client object
         // for a given RadScheduler instance (the control ID is used as key).
         var schedulerTemplates = {};
         
         function schedulerFormCreated(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;
 
                        // Remove the template object from the dictionary on dispose.
     scheduler.add_disposing(function() {
                            schedulerTemplates[templateKey] = null;
     });
         }
 
         // 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;
         advancedTemplate.populate(apt, isInsert);
         }
         }
         }
             
        //]]>
        </script>
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        <scripts>
                <asp:ScriptReference Path="AdvancedForm.js" />
            </scripts>
        </telerik:RadScriptManager>
         
            
        <br />
        <telerik:RadScheduler ID="RadScheduler1" runat="server" EnableAdvancedForm="true"
            EnableDescriptionField="true" OnClientFormCreated="schedulerFormCreated">
             
            <AdvancedForm Modal="true" />
              <AdvancedInsertTemplate>
                
                 <schedular:AdvForm ID="AdvForm1" runat="server" Mode="Insert" />
                   
             </AdvancedInsertTemplate>
             
             
        </telerik:RadScheduler>
Is anyone able to tell me whey when i double click on the scheduler in run-time i.e. add appointment, nothing happens? That is the advanced form control is not popping up.
Peter
Telerik team
 answered on 07 Dec 2011
1 answer
82 views
Hi, One of our developers is trying to access the changed event for a resource dropdown in the advanced form of the RadScheduler.  Is it possible to fire a server-side event when this dropdown is changed? Any help would be greatly appreciated, as this is a time-sensitive project.

Thanks,
Peter
Telerik team
 answered on 07 Dec 2011
8 answers
886 views
If I know the column index, how do I get its header text and its unique name?
Please provide me the sample code to do that on both client-side (Javascript) and server-side (C# or VB).

Thanks

Lamk.
Elliott
Top achievements
Rank 2
 answered on 07 Dec 2011
1 answer
80 views
I have a master page...content page...usercontrol that contains a radgrid. From that radgrid I launch an edit form into a radwindow using a custom url in the itemcreated event. The edit form contains various controls but at the end of the edit form I will have 2 textboxes and a button. If the user needs to change the values of those 2 textboxes they must open another form to perform various database operations to retrieve the new values. I am saving values into Session so they will be available across the application. My question is how can I implement a delegate to reload the values of just those the textboxes when I close the child form. I am not as up on delegates as I need to be.
Maria Ilieva
Telerik team
 answered on 07 Dec 2011
4 answers
642 views
Hi!
By default RadDatePicker displays its Calendar below DateInput, but I need to display it above. In the help I've found how to implement it using JavaScript, and it works in general. A problem comes when I disable and then enable RadDatePicker with JavaScript. After that when I click on DatePopupButton the Calendar appears for a short moment and then disappears.
Here is my aspx-page code:
<head runat="server">
    <title></title>
</head>
<body>
   <telerik:RadCodeBlock ID="radCodeBlock" runat="server">
   <script type="text/javascript">
      function enableDTPicker(isEnabled)
      {
         var dtStartDate = $find("<%=dtStartDate.ClientID %>");
         if (dtStartDate != null)
         {
            dtStartDate.set_enabled(isEnabled);
            dtStartDate.get_calendar().set_enabled(isEnabled);
            dtStartDate.get_popupButton().disabled = !isEnabled;
         }
      }
 
      function PopupOpen()
      {
         var picker = $find("<%= dtStartDate.ClientID %>");
         var textBox = picker.get_textBox();
         var popupElement = picker.get_popupContainer();
         var dimensions = picker.getElementDimensions(popupElement);
         var position = picker.getElementPosition(textBox);
         picker.showPopup(position.x - 10, position.y - dimensions.height - 5);
      }
   </script>
   </telerik:RadCodeBlock>
    <form id="form1" runat="server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
      <table>
         <tr><td><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></td></tr>
            <tr>
               <td>
                  <table border="0" cellspacing="0" cellpadding="3" width="100%">
                     <tr>
                        <td><asp:RadioButton ID="option1" Text="option1" GroupName="group1" runat="server" Checked="true" /></td>
                        <td> </td>
                     </tr>
                     <tr>
                        <td><asp:RadioButton ID="option2" Text="option2" GroupName="group1" runat="server" Checked="true" /></td>
                        <td>
                        <telerik:RadDatePicker ID="dtStartDate" runat="server" Enabled="true">
                           <DatePopupButton onclick="PopupOpen();" Enabled="true" />
                        </telerik:RadDatePicker>
                        </td>
                     </tr>
                     <tr>
                        <td><asp:RadioButton ID="option3" Text="option3" GroupName="group1" runat="server" /></td>
                        <td> </td>
                     </tr>
                  </table>
               </td>
         </tr>
      </table>
    </form>
</body>
</html>

It's cs-file:
using System;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       option1.Attributes.Add("onclick", "enableDTPicker(false);");
       option2.Attributes.Add("onclick", "enableDTPicker(true);");
       option3.Attributes.Add("onclick", "enableDTPicker(false);");
    }
}

In the beginning the RadDatePicker control is enabled, and click on DatePopupButton opens Calendar properly. If I select option1 or option3 the RadDatePicker becomes disabled. Then I select option3, and the RadDatePicker becomes enabled again, but after clicking on DatePopupButton the Calendar just appears and then disappears in a moment.

Why is that and how can I fix it?
Thank you
Praveen
Top achievements
Rank 1
 answered on 07 Dec 2011
1 answer
104 views
Hi, 
I just created 2 new skins for tollbar as in your example.
I created new folder with the name Header (for one skin) and copied all the images and the ToolBar.Header.css file.
I changed few properties in the skin but still have 2 problems:
1) How to remove the black border from the items in the toolbar dropdown?
2) How to remove the place for images and align the text to the left.

I attached the file for better explanation.
10x
Princy
Top achievements
Rank 2
 answered on 07 Dec 2011
1 answer
89 views
On the advance form i want to add a RadChart.

My question is, is this possible? I just simply add the new control? How do i do it? 

The demo that is available shows how to create your own custom form, but i just want to add a new control...

Thanks in advance.
Kate
Telerik team
 answered on 07 Dec 2011
2 answers
112 views
Hi,

I was trying to get ExcelML based export working. I was able to achieve some formatting and other Goals using ExcelML but as for ExcelML based export we need to implement Advanced databinding using NeedDataSource event, I had to do some changes to my existing code - which i did.
The problem I am facing now after doing all the changes is:

Page data source is changing as per requirement but page is not showing changed data. It's staying one step back. Here is scenario:

1. Page has a drop down with 3 types, suppose A, B and C.
2. First time page shows data depending upon the selection which is A.
3. I change selection to B. Page posts back, datatable is re-built and Grid's dataSource is Set to it but not ReBinded (as stated by Telerik). Page is still showing data shown previously i.e. data for type A.
4. I change selection to C. Page posts back, datatable is re-built and Grid's dataSource is Set to it but not ReBinded. Now page shows data for type B - which was selected in step 3.
5. If you keep changing the selection. Page shows data for previous type i.e. one step previous. Please note that datasource is built and set properly but page's view is not updated.

I tried rebinding the Grid and it some times works properly but it crashes other times. what to do? Any help?

Thanks.
Maria Ilieva
Telerik team
 answered on 07 Dec 2011
3 answers
91 views
Hey,
Guys i am really stuck here, needs some help. The scenario is something like this,

I have three separate controls, and one of these controls consist of Rad List boxes. Now i created a new control, named as Main.ascx and put in Rad Panel bar inside Rad ajax referred from this link
http://demos.telerik.com/aspnet-ajax/panelbar/examples/applicationscenarios/accessingnestedcontrols/defaultcs.aspx.
Now the issue is that Rad list boxes has stopped working, i can not select the items in the rad list box, whereas if i am running the control which has rad list boxes separately, its running perfect. but when it is dropped in radpanelbar, it stps working, rest everything is ok
Can you plz help me with this
Dimitar Terziev
Telerik team
 answered on 07 Dec 2011
1 answer
86 views
hi

please let me know that can we insert shapes from word to editor?! or is there any way to create shapes in editor?


Thanks a lot

Neda
Rumen
Telerik team
 answered on 07 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?