Telerik Forums
UI for ASP.NET AJAX Forum
17 answers
284 views
Hi
I have an aspx page in a sharepoint site which has a RadHTMLField. When I edit the page and publishes it without updating the RadHTMLField, an extra div gets created as the outer div to the existing contents of the field. And this happens every time I publish the page after editing it.

The code looks like
<radE:RadHtmlField ID="RadHtmlField1" FieldName="FocusOn" AllowSpecialTags="true" AllowScripts="true" runat="server"></radE:RadHtmlField>

Can you plz suggest a script or some other resolution so that the extra div is not checked in with the page every time.
Regards
Sudhanshu Kaushik
Rumen
Telerik team
 answered on 09 Nov 2011
5 answers
97 views
Hello,

I have a treeview and its context menu for which i initialize its items at the design time .
I populate the treeview dynamically. For each node, i want to configure the context menu differently ( ex: Add new contextMenu Items, change their text...). Can I do it at the server side? It seems that the contextMenu is not proper to the node, but to all the treeview? And the modifications are applied to the contextMenus of all the TreeViewItems..

Thank You for Clarification.


Kate
Telerik team
 answered on 09 Nov 2011
1 answer
211 views
I've customized the editor toolbars by removing some buttons while adding my own custom buttons.  I've implemented a clientside OnClientCommandExecuting handler to intercept and cancel keyboard shortcuts to the removed editor buttons.  I also want to handle click events from the editor toolbar custom buttons. 

Telerik documentation says to add onclick handlers to the editor's RadEditorCommandList.  But, I've noticed that custom button click events are first processed by the OnClientCommandExecuting handler before they get to the RadEditorCommandList handlers.  

What is the difference between using these two handlers?  The custom buttons will instigate serverside save and saveas functionality via an ajax post.  I'ld prefer to combine everything into the OnClientCommandExecuting handler, and to launch save/saveas ajax posts from there.  After each launch I will cancel the click event.


<script type="text/javascript">
  
    function OnClientCommandExecuting(editor, args) {
       if ("Save" == args.get_commandName()) {
            alert("OnClientCommandExecuting Save"); 
            args.set_cancel(true);          
        } else if ("SaveAs" == args.get_commandName()) {
            alert("OnClientCommandExecuting SaveAs");
            args.set_cancel(true); 
        }
    } //EOF OnClientCommandExecuting
  
</script>
  
<telerik:RadEditor ID="telerikeditor" Runat="server" 
                   OnClientLoad="onClientLoad"
                   OnClientCommandExecuting="OnClientCommandExecuting">
    <Tools>
        <telerik:EditorToolGroup Tag="grpInputOutput">
            <telerik:EditorTool ImageUrl="Images/radeditorSave.gif" 
                Name="Save" ShowText="False" 
                Text="Save" />
            <telerik:EditorTool ImageUrl="Images/radeditorSaveAs.gif" 
                Name="SaveAs" ShowText="False" 
                Text="Save As" />
            <telerik:EditorSeparator />     
        </telerik:EditorToolGroup>
     </Tools>
     <Content>
     </Content>
</telerik:RadEditor>    
          
<script type="text/javascript"> 
     //locate this script after the radeditor HTML declaration
    RadEditorCommandList["Save"] = function(commandName, editor, oTool) {
        alert("RadEditorCommandList Save");
    }
</script>
Rumen
Telerik team
 answered on 09 Nov 2011
6 answers
131 views
Hi Telerik team,

is it possible to change the size of the SPRadEditor via Javascript? 

Following code does not work for me:

function OnClientLoad(editor, args) {
    editor.get_contentAreaElement().style.height = 490px;
}


Thank you very much,
Ben
Rumen
Telerik team
 answered on 09 Nov 2011
4 answers
106 views
Hi,

I need to put circa 20 sliders onto one page - a survey.  I'd prefer to somehow use one shared slider - similar to with the calendar popup code.  Is there an easy way to do this?  Same goes for the slider items - worst case I suppose that I can add them from the server code but would prefer that I could use a shared calendar.

Any help much appreciated.

Cheers,

Jon
Jon
Top achievements
Rank 1
 answered on 09 Nov 2011
1 answer
203 views
We have requirement to use x and y coordinate of cell within radgrid.

Please suggest on it that how to get this.


Thanks
Shimab
Marin
Telerik team
 answered on 09 Nov 2011
1 answer
63 views
I have a complex problem:

I have in my Grid a GridTemplatecolumn which displays the text " rapport " but this text must be visible only for some lines

The condition to enable or disable the visibility is within the second if

protected void GridDisplayOldRDV_ItemDataBound(object sender, GridItemEventArgs e)
{
 
    HiddenField HiddenFieldIdParticipant = e.Item.FindControl("HiddenFieldIdParticipant") as HiddenField;
    Utilisateur utilisateur = (Utilisateur)Session["utilisateur"];
    if (HiddenFieldIdParticipant != null)
    {
         if (utilisateur.idUtilisateur.ToString() != HiddenFieldIdParticipant.Value.ToString())
        {
            GridDisplayOldRDV.MasterTableView.GetColumn("Debriefing").Visible = false;
        }
    }
}


Right now , my problem is with this line :
GridDisplayOldRDV.MasterTableView.GetColumn("Debriefing").Visible = false;

The column disappears everytime...

I hope i'm clear enough

Thanks in advance for your help

Adigard
Top achievements
Rank 1
 answered on 09 Nov 2011
2 answers
109 views
Hi guys,
I Was working On Rad Grid recently with 5 columns in it , i was able to perform grouping  successfully by dragging and placing on top of rad grid,
but when i changed my prog and placed around 40 columns , i was not able to perform grouping..
when ever i try to drag a column always first column getting grouped.. and also i am not able to reorder by columns..

Any solutions..?
 
     <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" Skin="Black" 
      OnNeedDataSource="RadGrid1_NeedDataSource" Width="784px"
        OnColumnDblClick="Radgrid1_OnColumnDblClick" AllowAutomaticDeletes="True" OnGroupsChanging="RadGrid1_GroupsChanging"
      AutoGenerateColumns="False" OnColumnsReorder="RadGrid1_ColumnsReorder"
      ShowFooter="True" AllowPaging="True"
       onpageindexchanged="RadGrid1_PageIndexChanged"
       onitemdatabound="RadGrid1_ItemDataBound"
       onpagesizechanged="RadGrid1_PageSizeChanged"
       onsortcommand="RadGrid1_SortCommand1" CellSpacing="0"  >
                          
   <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
                              
              <MasterTableView>
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
           <HeaderStyle Width="150" />
                         
        <Columns>
        
 
        <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter column column"
                                          HeaderText=" Name" UniqueName="column">
                                      </telerik:GridBoundColumn>
                                  
         <telerik:GridBoundColumn DataField="dept id" FilterControlAltText="Filter column column"
                                          HeaderText="dept_id" UniqueName="column">
                                      </telerik:GridBoundColumn>
                                              
                                              
                                                          --
                                                          --
                                 (40 colums like this..)
                 
        </Columns>
                                  <EditFormSettings>
                                      <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                      </EditColumn>
                                  </EditFormSettings>
                              </MasterTableView>
                              <FilterMenu EnableImageSprites="False">
                              </FilterMenu>
                              <GroupingSettings ShowUnGroupButton="true" />
                              <ClientSettings EnableRowHoverStyle="true" AllowDragToGroup="True" AllowColumnsReorder="true"
                                  AllowColumnHide="True" AllowKeyboardNavigation="True" AllowRowsDragDrop="True"
                                  ReorderColumnsOnClient="True">
<Selecting AllowRowSelect="True" />
                                  <ClientEvents OnColumnContextMenu="ColumnContextMenu" />
                                  <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                  <Resizing AllowColumnResize="true" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" />
                              </ClientSettings>
                          </telerik:RadGrid>

Any solutions...???
 
Radoslav
Telerik team
 answered on 09 Nov 2011
4 answers
139 views
Hi,
I want to disable bacskapce (going to previous page) in radwindows.
So I added js code:

function getKey(keyStroke) {
            var t = window.event.srcElement.type;
            var keyCode = (document.layers) ? keyStroke.which : event.keyCode;
            var keyString = String.fromCharCode(keyCode).toLowerCase();
            var leftArrowKey = 37;
            var backSpaceKey = 8;
            var escKey = 27;
            if (t && (t == 'text' || t == 'textarea' || t == 'file')) {
                //do not cancel the event
            } else {
                if ((window.event.altKey && window.event.keyCode == leftArrowKey) || (keyCode == escKey) || (keyCode == backSpaceKey)) {
                    alert(keyCode);
                    return false;
                }
            }
        }

<body onkeydown="getKey()">...
but it doesn't work (alert is showing, but "false"doesn't stop going to previous page). Is any specific approach in radwindows to achieve the target?
Thanks.
wnl
Top achievements
Rank 1
 answered on 09 Nov 2011
4 answers
159 views
Hi,

When using the slider I am noticing some odd behaviour.  I have a set of criteria 1-5 and in the database I store which one of them was chosen.  Now If I use the code as below with the database value of 1, the second entry in the list is selected, setting the value in the database to 0 (which in practice it should never be) causes the first item to be selected.  It's almost as if the slider is treating the value as a 0 based array index.... Any ideas?  Code follows:

<telerik:RadSlider ID="uxOQC_1" runat="server"  DbValue='<%# Bind("OQC_1") %>' MinimumValue="1" MaximumValue="5" ItemType="Item" TrackPosition="Center">
   <Items>
       <telerik:RadSliderItem Text="Strongly disagree" Value="1" ToolTip="Strongly disagree" runat="server"></telerik:RadSliderItem>
       <telerik:RadSliderItem Text="Disagree" Value="2" ToolTip="Disagree" runat="server"></telerik:RadSliderItem>
       <telerik:RadSliderItem Text="Neither agree nor disagree" Value="3" ToolTip="Neither agree nor disagree" runat="server"></telerik:RadSliderItem>
       <telerik:RadSliderItem Text="Agree" Value="4" ToolTip="Agree" runat="server"></telerik:RadSliderItem>
       <telerik:RadSliderItem Text="Strongly agree" Value="5" ToolTip="Strongly agree" runat="server"></telerik:RadSliderItem>
   </Items>
</telerik:RadSlider>


Jon
Top achievements
Rank 1
 answered on 09 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?