Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
335 views
Hello,
I have 2 developing environments. I have developed a sharepoint project where I include the drag and drop feature from the RadGrid to RadSchdeuler. When I drag and drop an item to the schdeuler, I am showing a RadDock as a Popup from client side using

Sys.Application.add_load(openForm);

So that it will show my appointment editing window. In one environment it is working and in the other one when I drag and drop it is giving me a script exception.

"Error: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded."

If I remove that Sys.Application.add_load(openForm); then it wont give me an error, but it wont load the dock.

The Dock

<asp:Panel runat="server" ID="panelAlert">
    <telerik:RadDock runat="server" ID="RadDockAlert" Width="350px" Height="120px" Closed="true"
        Style="z-index: 2000;" Title="Alert">
        <Commands>
            <telerik:DockCloseCommand></telerik:DockCloseCommand>
        </Commands>
        <ContentTemplate>
            <div align="center">
                <asp:Label ID="lbAlertMsg" runat="server"></asp:Label>
            </div>
            <br />
            <div align="center">
                <a onclick="hideAlertForm();" id="aAlertOK" runat="server">
                    <asp:Label ID="Label3" CssClass="spriteButtons popUpOkButton" runat="server">Ok</asp:Label>
                </a>
            </div>
        </ContentTemplate>
    </telerik:RadDock>
</asp:Panel>


The function to show the popup
function openAlertForm() {
 
    var dock = $find("<%= RadDockAlert.ClientID %>");
    // Center the RadDock on the screen
    var viewPort = $telerik.getViewPortSize();
    var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);
    var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);
    $telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });
 
    dock.set_closed(false);
 
    Sys.Application.remove_load(openAlertForm);
}


Drag-n-Drop function
function rowDropping(sender, eventArgs) {
            // Fired when the user drops a grid row
            var htmlElement = eventArgs.get_destinationHtmlElement();
            var scheduler = $find('<%= RadScheduler1.ClientID %>');
            if (isPartOfSchedulerAppointmentArea(htmlElement)) {
                // The row was dropped over the scheduler appointment area
                // Find the exact time slot and save its unique index in the hidden field
 
                var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement);
                startDateTime = timeSlot.get_startTime();
 
                Sys.Application.add_load(openForm);
 
                $get('<%= TargetSlotHiddenField.ClientID %>').value = timeSlot.get_index();
 
                // The HTML needs to be set in order for the postback to execute normally
                eventArgs.set_destinationHtmlElement('<%= TargetSlotHiddenField.ClientID %>');
            }
            else {
                // The node was dropped elsewhere on the document
                eventArgs.set_cancel(true);
            }
        }


I am also doing this on the OnInit of the function of the page.

http://www.telerik.com/community/forums/aspnet-ajax/scheduler/asp-updatepanel-and-radscheduler-issues.aspx

I did this because the navigation from day to week etc in the RadSchdeuler.

Any help on this would be gladly accepted.
Slav
Telerik team
 answered on 09 Jan 2013
2 answers
136 views
I have this
    <style type="text/css">
 
html .RadTreeView_Default,
html .RadTreeView_Default a.rtIn,
html .RadTreeView_Default .rtEdit .rtIn input {
  font-familyarial !important;
        font-size8pt !important;
        colorred !important;
}
 
    </style>
and my simple tree
    <telerik:RadTreeView ID="RadTreeView1" runat="server" Width="300px"   style="white-space:normal"  
        OnClientNodeExpanded="rtvExplore_OnNodeExpandedCollapsed"
                    OnClientNodeCollapsed="rtvExplore_OnNodeExpandedCollapsed" 
     >
    </telerik:RadTreeView>

but the CSS has no effect on the format?
david
Top achievements
Rank 1
 answered on 09 Jan 2013
1 answer
55 views
Hello,

Please find below a definition for a rotator with a viewport of 4 items. 5 items were placed statically inside the rotator. After clicking buttons, in either direction, in the rotator, an empty placeholder is depicted in the rotator image area. Could you please help me in fixing this problem.

Please find below the rotator definition.

<telerik:RadRotator ID="radRotator" runat="server" Width="520px" Height="120px" ItemHeight="120px" ItemWidth="120px" RotatorType="Buttons">
                <telerik:RadRotatorItem>
                    <ItemTemplate>
                        <asp:Image  runat="server" ID="imgRotatorItem" ImageUrl=""  Height="120px" Width="120px"/>
                    </ItemTemplate>
                </telerik:RadRotatorItem>


Thanks,
Oner
Slav
Telerik team
 answered on 09 Jan 2013
3 answers
148 views
Hello,

I was hoping to get some help in figuring out how to open up a form that pops up as a rad window when clicked open from the context menu on a record, with its existing data that has been previously input. I tried figuring it out, but it will only open up a new blank form, (although it shows up with the form id pertaining to that record). Is there a reason why the data does not display? I am storing and retrieving data from Management Studio SQL Server db.
Marin Bratanov
Telerik team
 answered on 09 Jan 2013
5 answers
125 views
Hello
I upgraded Telerik Controls to DevCraft Ultimate. Radcombobox used to work with my older version now it stopped working checked the forums changed the code as per this link
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridincombobox/defaultvb.aspx?product=grid


It shows undefined

var ajxgrid =Window[Window['RadAjaxManager1'

 

]];

My old version was

<script language="javascript" type="text/javascript">
     var grid;
     function GridCreated(sender,args) {
 
         grid = sender;
     }
     //Selecting value from the
     function RowClicked(rowIndex) {
         var cellValues = this.Rows[rowIndex].KeyValues["Last"] ;
         var id = this.Rows[rowIndex].KeyValues["id"];
           if (window['comboboxId']) {
             var combo = window[window['comboboxId']];
             
             setTimeout(function () {
                 combo.SetText(cellValues);
                 combo.SetValue(id);
             }, 0);
 
 
 
         }
     }
     //Show DropDown
     function HandleOpen1(sender,eventargs) {
 
         //var inputElement = document.getElementById(combobox.InputID);
         
         if (sender.get_text().length > 1) {
                       grid.AjaxRequest(grid.UniqueID, "LoadFilteredData," + sender.get_text());
              
         }
         else {
             return false;
         }
 
 
     }
</script>

 

   <Telerik:radcomboBox  id="RadComboBox1" Width="300px" runat="server" MarkFirstMatch="True" AllowCustomText="True"
                OnClientDropDownOpening="HandleOpen1"  UseEmbeddedScripts="true"   >
                        
               <ItemTemplate>
                   <Telerik:RadGrid id="Grid" Width="295px" runat="server" EnableAJAX="true" EnableAJAXLoadingTemplate="true" PageSize="10" >
<ClientSettings >
                           <ClientEvents OnRowClick="RowClicked" OnGridCreated="GridCreated"></ClientEvents>
                           <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="250px" />
                       </ClientSettings>
                   </Telerik:RadGrid>
</ItemTemplate>
               <Items>
                   <Telerik:RadcomboBoxItem ID="RadcomboBoxItem1" runat="server"></Telerik:RadcomboBoxItem>
               </Items>
           </Telerik:radcomboBox>


it gives me error near grid.ajaxrequest.

Please help. Can you let me know what exactly I need to change.

Thank you
Kavya M

 

 

Angel Petrov
Telerik team
 answered on 09 Jan 2013
8 answers
296 views
Hi,

I'm currently trying to make the SelectedIndexchanged event available inside a Formview.
What i tried was adding an handler like:
(FormView1.Row.FindControl("rb_fvCustomer") as RadComboBox).AutoPostBack = true;
(FormView1.Row.FindControl("rb_fvCustomer") as RadComboBox).SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(customerCB_SelectedIndexChanged);


Including the defintion of the method:

private void customerCB_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
  // DoStuff();
}


It somehow does add the eventhandler but does not fire the according event when changing selection. Is DataBound the wrong place to apply the Even? Any hints about this issue?

regards, Michael
Nencho
Telerik team
 answered on 09 Jan 2013
2 answers
614 views
I cannot get any skin to load other than Default in my project. I added a reference to Telerik.Web.UI.Skins.dll but it still doesn't work. I am using Telerik 2012 Q1 NET 40.


Thanks,
Sam
Sam
Top achievements
Rank 1
 answered on 09 Jan 2013
2 answers
297 views
I am working with a grid that utilizes about 3 levels of nested grouping.  On page load, some of the grid groups are expanded or contracted based on criteria. I am interested in iterating through the grid and only grabbing a collection of rows that are currently visible due to the groups that are currently expanded.  Is this possible?
Michael
Top achievements
Rank 1
 answered on 09 Jan 2013
1 answer
181 views
Hi


I want to remove  all style -webkit-scrollbar-button:horizontal:decrement from base style sheet.

I am really angry with the scrollbar style.

Because these css are too bad. How can I do this? Or can I build a dll myself? Please let me know.

Thanks.
Danail Vasilev
Telerik team
 answered on 09 Jan 2013
1 answer
299 views
Hi guys,
i've created this radwinodw on my webpage:
<telerik:RadWindow ID="RadWindowChangepwd" runat="server" ShowContentDuringLoad="false" Width="360px"
Height="220px" Title="Cambio password" Behaviors="None" Modal="True" Behavior="None"
Font-Names="Verdana" Font-Size="Small" IconUrl="/image/iconlogo.png" VisibleStatusbar="False"
Skin="Simple" ReloadOnShow="True">
<ContentTemplate>
<div class="Divchangepwd">
<div class="Divchangepwd1">
<telerik:RadAjaxPanel ID="RadAjaxPanelpwd" runat="server">
<table style="width:100%;">
<tr>
<td colspan="2" style="padding-left: 10px; padding-top: 10px">
<telerik:RadTextBox ID="Txtpwdnow" Runat="server" Label=" Password attuale:"
LabelWidth="110px" MaxLength="20" TextMode="Password" Width="300px">
</telerik:RadTextBox>
</td>
</tr>
<tr>
<td colspan="2" style="padding-left: 10px">
<telerik:RadTextBox ID="Txtpwdnew" Runat="server" Label="Nuova password:"
LabelWidth="110px" MaxLength="20" TextMode="Password" Width="300px">
</telerik:RadTextBox>
</td>
</tr>
<tr>
<td colspan="2" style="padding-left: 10px">
<telerik:RadTextBox ID="Txtpwdnewconf" Runat="server"
Label="Conferma password:" LabelWidth="110px" MaxLength="20"
TextMode="Password" Width="300px" AutoPostBack="False">
</telerik:RadTextBox>
</td>
</tr>
<tr>
<td colspan="2" style="padding-left: 10px; padding-top:15px">
</td>
</tr>
<tr>
<td align="center">
<asp:ImageButton ID="Imgbtnconfermapwd" runat="server" ImageUrl="~/Image/conferma.png" OnClientClick="return CallNotification()" />
</td>
<td align="center">
<asp:ImageButton ID="ImgBtnClosepwd" runat="server" ImageUrl="~/Image/esci1.png" />
</td>
</tr>
</table>
</telerik:RadAjaxPanel>
</div>
</div>
</ContentTemplate>
</telerik:RadWindow>



when i press the imagebutton "imgBtnclosepwd" star the postback. Is possibile with javascript code close the radwindows without postback? I usede this code too but there's erro when close radwindow:

function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
function Close() {
    GetRadWindow().close();
}

Bye
Marin Bratanov
Telerik team
 answered on 09 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?