Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
233 views
Hello
I am using RelatedLoDRadComboboxesinAdvForm. In my RadScheduler if I select a RadcomboBox list's value then some data according to this value should be displayed in my RadTextBox but not editable.
 suppose Client  First  name is selected then Last Name should be displayed in textbox.
Any help
Thanks
Ivana
Telerik team
 answered on 07 Dec 2011
2 answers
115 views
Hello, 

I am having difficulty with the problem of accessing the Selected value of a programatically created RadGrid.  The purpose of this app is to allow a user to select an order from a grid and open a new page with a new grid populated based on the selection of the previous grid.  I can't seem to find an example like this in the forums.  Most example assume the grid is bound directly, however I am pulling from a programatically created grid.  I am new to Telerik controls.  I tried using the format code block but it made my code unreadable.

Here is how I create the grid:

    <telerik:RadGrid ID="OrdersGrid" runat="server" Skin="WebBlue" CellSpacing="0" GridLines="None"
        ClientSettings-Selecting-AllowRowSelect="True">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView DataKeyNames="OrderID" ClientDataKeyNames="OrderID">
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_WebBlue">
        </HeaderContextMenu>
    </telerik:RadGrid>    <telerik:RadGrid ID="OrdersGrid" runat="server" Skin="WebBlue" CellSpacing="0" GridLines="None"
        ClientSettings-Selecting-AllowRowSelect="True">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView DataKeyNames="OrderID" ClientDataKeyNames="OrderID">
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_WebBlue">
        </HeaderContextMenu>
    </telerik:RadGrid>

Here is how I bind the data to the new grid:

protected void Page_Load(object sender, EventArgs e)
        {
            using (Dbcontext)
            {
                companyID = Convert.ToInt32(Request.QueryString["CompanyID"]);
                OrdersGrid.DataSource = Dbcontext.usp_SelectOrders(null,companyID);
                OrdersGrid.DataBind();
                OrdersGrid.MasterTableView.DataKeyNames = new String[] { "OrderID" };
             }
        }

Here is how I am attempting to access the SelectedValue of the OrdersGrid:

protected void OrderDetailsButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Pages/OrderDetails.aspx?OrderID=" + OrdersGrid.SelectedValue.ToString());
        }

When the button is clicked I get an error stating that the Selected value has not been initialized.  When I hover over the SelectedValue in Debugging mode it says it is "null."

Any thoughts?

Thanks in advance,
Jonathan
Jonathan
Top achievements
Rank 1
 answered on 07 Dec 2011
5 answers
59 views
Hi,

I followed the instructions on the demo page: http://demos.telerik.com/aspnet-ajax/scheduler/examples/keyboardsupport/defaultcs.aspx , but do not get the required result.

In IE a javascript error is shown: Line: 17846
Error: Object doesn't support property or method '_getContentTable'

Line 17846 and surroundings:
var r=i.KeyboardNavigation.Models.createMap(d.get_activeModel()._getContentTable(),function(u){q=false;
var w=u.get_targetSlot().get_domElement();
var v=w.cellIndex;
var t=w.parentNode.rowIndex;
m.x=t;
m.y=v;
});


FF and Chrome do not show the javascript error, but no keyboard support eighter.

Any idea what might cause this?

Sceduler code:
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
<telerik:RadScheduler ID="rs_Planner" runat="server" Culture="Dutch (Netherlands)"  AccessKey="F" TabIndex="1"
    HoursPanelTimeFormat="HHtt" LastDayOfWeek="Sunday" FirstDayOfWeek="Monday" RowHeight="30px" 
    OverflowBehavior="Expand" Width="100%">
    <AppointmentContextMenus>
        <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
            <Items>
                <telerik:RadMenuItem Text="Ga naar klant" Value="1" />
                <telerik:RadMenuItem IsSeparator="True" />
                <telerik:RadMenuItem Text="Niveau aanpassen" Value="2" />
                <telerik:RadMenuItem IsSeparator="True" />
                <telerik:RadMenuItem Text="Klant is niet geweest" Value="3" />
                <telerik:RadMenuItem IsSeparator="True" />
                <telerik:RadMenuItem Text="Klant toevoegen aan werkvoorraad" Value="4" />
                <telerik:RadMenuItem IsSeparator="True" />
                <telerik:RadMenuItem Text="Mail boekingen naar klant" Value="5" />
                <telerik:RadMenuItem IsSeparator="True" />
                <telerik:RadMenuItem Text="Losse verkoop aan deze klant" Value="6" />
            </Items>
        </telerik:RadSchedulerContextMenu>
        <telerik:RadSchedulerContextMenu runat="server" ID="RadSchedulerContextMenu1">
            <Items>
                <telerik:RadMenuItem IsSeparator="True" />
            </Items>
        </telerik:RadSchedulerContextMenu>
    </AppointmentContextMenus>
    <WeekView ColumnHeaderDateFormat="ddd, d MMM" HeaderDateFormat="d-MMM-yyyy" />
    <Localization AdvancedAllDayEvent="All day" AdvancedCalendarCancel="Annuleren" AdvancedCalendarToday="Vandaag"
        HeaderDay="Dag" HeaderMonth="Maand" HeaderToday="Vandaag"></Localization>
    <AdvancedForm DateFormat="d-M-yyyy" TimeFormat="H:mm" Modal="true"></AdvancedForm>
    <AppointmentTemplate>
        <%#GetAppointment(Eval("Onderwerp"), Eval("Plaatsenover"), Eval("start"), Eval("Type"), Eval("Naam"), Eval("Niveau"), Eval("RoosterStatusOmschrijving"), Eval("Boeking"), Eval("RoosterOpmerking"), Eval("Koppel"), Eval("OpenstaandBedrag"), Eval("Geboortedatum"), Eval("AlertMemo"), Eval("lesnummer"), Eval("KlantNietGeweest"))%>
    </AppointmentTemplate>
</telerik:RadScheduler>

Thanks for any help that you can give me
Genady Sergeev
Telerik team
 answered on 07 Dec 2011
17 answers
330 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
79 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
867 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
72 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
632 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
98 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
78 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?