Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
85 views
Can someone provide me with some help on the drag and drop javascript? I noticed that the demo has drag and drop functionality between two grids and the recycling bin icon. I just want to allow drag and drop between rows in the grid. How can I modify the javascript shown here?

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx
Veli
Telerik team
 answered on 01 Jun 2010
2 answers
180 views
Hi,

I have a Toolbar split button with 3 regular buttons + 1 with 2 RadDateTimePicker Items (From and To date time) (see enclosed picture).
When the user has set the dates I do not want the drop down to collapse as it is very user un-friendly. Ideally I would want clicking the down arrow on the split button as the only way to collapse this, but just preventing it from collapsing after setting a date or time is also an option.
I have tried numerous ways but set_cancel for DropDownClosing stops the DateTimePicker from closing (guess that its this that fires the event) and using DateTimePickerClosing on the DateTimepickers is too late....
I am submitting the trial project (taken from another example on this site) - various trial are commented out - seems that "StopPropagation" on the event is not available:

Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="toolbarAndDropDown.aspx.cs" 
    Inherits="toolbarAndDropDown" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
      
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="IncidentEditorScriptManager1" runat="server">  
        <Scripts> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
        </Scripts> 
    </telerik:RadScriptManager> 
    <telerik:RadCodeBlock ID="IncidentEditorCodeBlock1" runat="server">  
            <script type="text/javascript">  
 
                function DateTimePickerClosing(sender, eventArgs) {  
//                    alert("DateTimePickerClosing: " + event);  
//                    eventArgs.set_cancel(true);  
////                    alert("DateTimePickerClosing: " + eventArgs.stopPropagation);  
//                    if (eventArgs.stopPropagation) {  
//                        eventArgs.stopPropagation();  
//                    }  
                }  
 
                function DropDownClosing(sender, args) {  
                    alert("DropDownClosing: " + args.get_item().get_value());  
                    var eventObj = args.get_domEvent();  
                    //alert("DropDownClosing: " + eventObj.fromElement);  
                    if (eventObj.fromElement == null) {  
                        if (event.stopPropagation) {  
                            event.stopPropagation();  
                        }  
                        else {  
                            alert("DropDownClosing: set cancel");  
                            args.set_cancel(true);  
                        }  
                    }  
                    // If we knew where click came from we could handle this  
                    //eventObj.cancelBubble = true;  
                      
                }  
                  
                function StopPropagation(event) {  
                    event.cancelBubble = true;  
                    if (event.stopPropagation) {  
                        event.stopPropagation();  
                    }  
                }                      
              
            </script> 
    </telerik:RadCodeBlock> 
    <div> 
        
        <telerik:RadToolBar ID="RadToolBar2" runat="server"  Width="100%"                              
                            OnClientDropDownClosing="DropDownClosing">   
            <Items> 
                <telerik:RadToolBarButton Text="button 1" CheckOnClick="true"  Group="GG" /> 
                <telerik:RadToolBarButton Text="button 2" CheckOnClick="true"  Group="GG"/>  
                <telerik:RadToolBarButton Text="button 3" CheckOnClick="true"  Group="GG"/>  
                <telerik:RadToolBarSplitButton Value="Split" EnableDefaultButton="true" DefaultButtonIndex="0" > 
                    <Buttons> 
                        <telerik:RadToolBarButton Text="Broadcast Off"/>  
                        <telerik:RadToolBarButton Text="Broadcast All Teams"  /> 
                        <telerik:RadToolBarButton Text="Broadcast Trading Support"  /> 
                <telerik:RadToolBarButton Value="DateTimeTool">  
                    <ItemTemplate> 
                        <table> 
                        <tr> 
                            <td style="width:40px;">  
                                <label>From:</label> 
                            </td> 
                            <td> 
                                <telerik:RadDateTimePicker ID="FromDateTimePicker1"   
                                                           Runat="server"   
                                                           PopupDirection="TopRight"   
                                                           ZIndex="2000000"   
                                                           > 
                                                           <ClientEvents  OnDateSelected="DateTimePickerClosing" /> 
                                </telerik:RadDateTimePicker>                                      
                            </td> 
                        </tr> 
                        </table>                                  
                        <table> 
                        <tr> 
                            <td style="width:40px;">  
                                <label>To:</label> 
                            </td> 
                            <td> 
                                <telerik:RadDateTimePicker ID="ToDateTimePicker1" Runat="server"  PopupDirection="BottomRight"  ZIndex="2000000">  
                                                           <ClientEvents OnPopupClosing="DateTimePickerClosing" /> 
                                </telerik:RadDateTimePicker> 
                            </td> 
                            </td> 
                        </table>                                  
                    </ItemTemplate> 
                </telerik:RadToolBarButton>                  
                    </Buttons> 
                </telerik:RadToolBarSplitButton> 
            </Items> 
        </telerik:RadToolBar> 
    </div> 
    </form> 
</body> 
</html> 
 

Using a pop up window did not prove a good alternative as the DateTimePicker is larger than the window should natrually be.
Help on this greatly appreciated


Best Regards



Gunnar Skogen

Gunnar Skogen
Top achievements
Rank 1
 answered on 01 Jun 2010
4 answers
465 views
HI All,
I am badly struck with an issue that i want to select a row of telerk grid on button click. but on client  side. i don not want to go server side. i am unable to do it.

I have tried many things like
on Client events i add OnRowSelected="RowSelected"
and
following code add check box in all row.
 <Columns>
     <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
</Columns>


but i can not do it on button click.
so Is it possible and if yes then kindly help me.

Thanks in advance.
Princy
Top achievements
Rank 2
 answered on 01 Jun 2010
1 answer
133 views
I have a radComboBox that is loaded from javascript when another combo's value is set, I use the itemsRequested event, the problem is that this combo that is loaded through javascript doesnt keep its value when posted, why is this and how can I solve it? any help is appreciated, thanks!

I forgot to mention that if I set the EnableLoadOnDemand property of the combo to true it keeps it value, but when I do this the combo filtering function no longer works.
Kalina
Telerik team
 answered on 01 Jun 2010
7 answers
185 views
I implemented

ExpandedCssClass

attribute in radmenuItem to control item when child nodes are displayed but does not appear to work.

I want the bg color to stay when mega drop down is open.

<

 

telerik:RadMenuItem Text="Stores" PostBack="false" ExpandedCssClass="rmExpanded">

 

Kamen Bundev
Telerik team
 answered on 01 Jun 2010
1 answer
83 views
2010.1.525.35


<HeaderContextMenu CollapseDelay="0" ExpandAnimation-Type="None"></HeaderContextMenu>

Header ContextMenu takes 2 seconds to show up after right click on the column header.

2nd issue:   I defined this to false but on the tooltip of the column header it still says "drag to group or render", and if I tried to drag it still showed the "dragging shadow".

<ClientSettings AllowDragToGroup="False" />

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Windows7" AllowFilteringByColumn="true" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true"  
        AllowPaging="True" AllowSorting="True" ShowStatusBar="true" 
        GroupingSettings-CaseSensitive="false" EnableLinqExpressions="False" 
Radoslav
Telerik team
 answered on 01 Jun 2010
1 answer
121 views
I was wondering what the best way to change the cell type by row was.  I have a grid with a column "Value"  and one called "Type" which is a dropdown column.  Say there are two values for "Type" (Text and DD).  If I select "Text" I want the value column to be a textbox where the user can enter data.  If I select "DD" I want the "Value" column to be a Dropdown column.  What I can't figure out is how to change the type of cell (text or dropdown) in the ItemDataBound event.  Thoughts?
Veli
Telerik team
 answered on 01 Jun 2010
2 answers
202 views
Hi gurus,

Is there a way on how to change the node's ImageUrl or icon thru javascript?

Regards,

Jouie
Veronica
Telerik team
 answered on 01 Jun 2010
1 answer
100 views
Hi,

As per client requirement, we need to give html button in tool bar, And  from that button we can go to html view from design same as html button at bottom side.

How can i do this, what is javascript function to go to html view?

Thanks
Rumen
Telerik team
 answered on 01 Jun 2010
1 answer
93 views
Hi everyone,


I have a calculated column having for expression {0} / 40 *100.

everything works fine if I am under English culture in browser option. But if i switch to French culture in browser option, the grid is empty. I am wondering if the calculation are messed up as decimal symbol are not the same in french and english

the values are from a file and is using "." (dot)  as decimal. None of the value are entrered by user.
I don't how the parse is occuring when applying the calculation provided by the expression.

I don't know if I can set up the culture of the grid regardless of the culture of the request or something like that (if related to culture problem of course)

thank you
Veli
Telerik team
 answered on 01 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?