Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
I have a radgrid that displays a radajaxloadingpanel upon update.
In IE, when update occurs, the entire grid is greyed out with the loading panel (desired). However, in firefox, if the user scrolls down to update a row that was not originally not visible, the greyed out effect of the loading panel only affects the originally visible rows in the grid. So if a user has scrolled so far down that none of the original rows are visible, they receive no feedback that anything is executing.
Pavlina
Telerik team
 answered on 11 Mar 2011
1 answer
84 views
Any one send me the ASP.NET AJAX - ListBox CSS with all skin


please help me


send me in fennrussel@gmail.com
Kate
Telerik team
 answered on 11 Mar 2011
1 answer
249 views
Hello,

I just upgraded to Telerik 2010 Q3.

I am facing issue to convert the characters to entities.
For eg.
If you paste this string "

若要以中文阅读此电子邮件,请单击此处。

" (this resembles chinese characters) in html view and switch to design view it shows the chinese characters properly.
Again if you switch to html view it shows the same chinese characters in there where as it should show the unicode/entities for the characters.

I tried setting "ConvertCharactersToEntities" contentfilter but that didn't help too.

You can reporduce the above scenario in the built-in content filters demo.

Due to this "?????" is saved in db or when I write the content in file using RadEditor.Content property which returns the chinese characters as it is.

I want to display chinese characters in design view and in html view it should show the entities/unicode numbers for the characters.
By doing this RadEditor.Content property will return the unicode numbers and so in DB proper values will be saved.

Please help me in this senario.

Thanks in advance
Marin Bratanov
Telerik team
 answered on 11 Mar 2011
1 answer
100 views
I've gotten the RadPrompt working along with the Delete button column. The End user will click the delete button on a row, the radprompt will open and the user must input a reason for the deletion. Then he clicks OK, I take the text through the args passed to the clientside and store it in a hiddenfield and then I need the Radgrid to resume the Server Side  OnDeleteCommand code that is already wired. I know that I'm probably going to need to raise this on the client side once the radprompt closes. However, I cannot find any way of doing this. Help please!
Vasil
Telerik team
 answered on 11 Mar 2011
5 answers
456 views

Folks,

I am using RadControls for ASP.NET AJAX Q3 2010 SP2 with VS2010. I am using Form Template for editing rows. Below is my code.

In my form I have a RadioButton list (RadioButtonListApprovalType) with 3 list items. (Approved, Denied and Pending). I would like to see if the user's selects 'Denied', prior to updating the form, show an alert (i.e. 'Are your sure to Deny the Process?'). If user's chooses 'Yes', Update the row. If user's chooses 'No', Cancel the update. Basically I would like to see the same sort of alert prior to Deleting Radgrid rows.

Thanks

GC_0620
______________

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
                AllowSorting="True" DataSourceID="SqlDataSource3" GridLines="None" AutoGenerateColumns="False"
                PageSize="8" Skin="Office2007" AllowAutomaticDeletes="True"
                AllowAutomaticUpdates="True" EnableLinqExpressions="False" OnColumnCreated="RadGrid1_ColumnCreated"
                OnUpdateCommand="RadGrid1_UpdateCommand" 
  
                OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound">
                        '''''
                        ''''               
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>
                            <table id="Table2" class="form-controls" cellspacing="2" cellpadding="1" width="100%"
                                border="0" rules="none" style="border-collapse: collapse; background: #DCDCDC;">
                                  
                                            <tr>
                                                <td style="font-size: 11px">
                                                    Approval status:
                                                </td>
                                                <td>
                                                    <asp:RadioButtonList ID="RadioButtonListApprovalType" DataTextField="ProcessStatus"
                                                        TabIndex="11" DataValueField="ProcessStatus"
                                                        RepeatDirection="Horizontal" runat="server" SelectedValue='<%# Bind("ProcessStatus") %>'>
                                                        <asp:ListItem Text="" />
                                                        <asp:ListItem Text="Approved" />
                                                        <asp:ListItem Text="Denied" />
                                                        <asp:ListItem Text="Pending" />
                                                    </asp:RadioButtonList>
                                                </td>
                                                 
                                         
                                </tr>
                                <tr>
                                    <td align="right" colspan="2">
                                        <asp:Button ID="btnUpdate" runat="server" CssClass="form-button" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                            Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
                                           
                                        <asp:Button ID="btnCancel" runat="server" CausesValidation="False" CssClass="form-button"
                                            CommandName="Cancel" Text="Cancel" />
                                    </td>
                                </tr>
                            </table>
                        </FormTemplate>
                    </EditFormSettings>
                    '''''
                    '''''
                  
            </telerik:RadGrid>
Tsvetina
Telerik team
 answered on 11 Mar 2011
1 answer
91 views
Hi there,
I found the following nice article explaining how tools can be dynamically added/removed from the editor:
http://www.telerik.com/help/aspnet-ajax/removingtoolbarbuttons.html

I prefer to do this on the client side since I would like to modify the tools based on the clicked html tag.

Is it possible? If not, I think my only option would be calling the server side code using Ajax.

Thanks,
Reza
Marin Bratanov
Telerik team
 answered on 11 Mar 2011
3 answers
283 views
Hello,
I'm trying to build user base theme into my application. I had no problem finding how to let the user choose a theme from the built-in themes collection, but I can't find a way to apply telerik's theme to generic table. I look into the forum and found similar questions, but no satisfying answer. Most post points to articles on how to modify built-in theme and how to create your own, but I'm looking on how to do the exact opposite, I want to use the built-in theme. There was one answer that seem to go into the right direction, but I guess I'm missing something... The example is:

<div class="RadGrid RadGrid_Default" style="width:400px">
<table class="MasterTable_Default" cellspacing="0" style="width:100%">
<tr>
    <th class="GridHeader_Default">header cell</th>
    <th class="GridHeader_Default">header cell</th>
</tr>
<tr class="GridRow_Default">
    <td>data cell</td>
    <td>data cell</td>
</tr>
<tr class="GridAltRow_Default">
    <td>data cell</td>
    <td>data cell</td>
</tr>
</table>
</div>
http://www.telerik.com/community/forums/aspnet-ajax/grid/applying-skin-to-generic-table-tags.aspx

So my question is how to apply a telerik built-in theme, let say Forest, at run-time to non telerik control such as generic and asp table?
Thanks for your help,
Louis-Philippe
Tsvetina
Telerik team
 answered on 11 Mar 2011
5 answers
318 views
 I have two columns one a bound column and one a template column. The alignment of the template data column is left of the bound column

<
telerik:GridBoundColumn DataField="First Name" 
    FilterControlAltText="Filter First Name column" HeaderText="First Name" 
    SortExpression="First Name" UniqueName="First Name">
    <ItemStyle HorizontalAlign="Left" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="First Name" UniqueName="First Name">
      <EditItemTemplate>
       <telerik:RadTextBox id="tbFirstName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "First Name") %>'></telerik:RadTextBox>
       <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="(Required)"
        ControlToValidate= "tbFirstName" ForeColor="Red"> </asp:RequiredFieldValidator>
      </EditItemTemplate>
    <ItemStyle HorizontalAlign="Left" />
<ItemTemplate>  
    <asp:Label ID="dtFirst_Name" runat="server" Text='<%# Eval("First Name", "{0}") %>' />  
</ItemTemplate>  
</telerik:GridTemplateColumn>
How can I make these line up?
Thanks

Pavlina
Telerik team
 answered on 11 Mar 2011
1 answer
150 views
Hi,

I'd like to get hold of the toolbar position of a RadEditor when the Mode is set to:

            re.ToolbarMode = EditorToolbarMode.PageTop;

I've added a custom save button to the toolbar and I'd like to flash a confirmation message just below the save button in the toolbar.
Currently, when the user scrolls, the toolbar moves to ensure that it is always at the top of the page. (I assume that this is re-positioned based on the scroll event).

Currently, I have code that looks like this but GetTopLeftPosition(el)  always returns zero.
My question is how do I get hold of the new position of the toolbar (after scroll) so that I can display a message just below the save button?

        function OnClientCommandExecuting(editor, args)
        {
            var name = args.get_name();
            
            if (name == "Save")
            {   
                var tool = args.get_tool();
                var attributes = tool.get_attributes();
                
                SaveCommentary(editor,
                               attributes["templateid"],
                               attributes["controlid"],
                               attributes["commentaryid"],
                               attributes["param1"],
                               attributes["param2"],
                               attributes["param3"]);
                               
                args.set_cancel(true);
            }
        }
        
        function setOpacity(id, level)
        {
            var element = document.getElementById(id);
            element.style.display = 'inline';
            element.style.zoom = 1;
            element.style.opacity = level;
            element.style.MozOpacity = level;
            element.style.KhtmlOpacity = level;
            element.style.filter = "alpha(opacity=" + (level * 100) + ");";
        }

        function fadeIn(id, steps, duration, interval, fadeOutSteps, fadeOutDuration)
        {  
            var fadeInComplete;
            for (i = 0; i <= 1; i += (1 / steps))
            {
              setTimeout("setOpacity('" + id + "', " + i + ")", i * duration);
              fadeInComplete = i * duration;             
            }
            
            // Set the timeout to start after the fade in time and the interval to display the
            // message on the screen have both completed
            setTimeout("fadeOut('" + id + "', " + fadeOutSteps + ", " + fadeOutDuration + ")", fadeInComplete + interval);
        }

        function fadeOut(id, steps, duration)
        {
            var fadeOutComplete;       
            
            for (i = 0; i <= 1; i += (1 / steps))
            {
              setTimeout("setOpacity('" + id + "', "  + (1 - i) + ")", i * duration);
              fadeOutComplete = i * duration;
            }                  
            
            // Completely hide the displayed message after the fade effect is complete
            setTimeout("hide('" + id + "')", fadeOutComplete);
        }   

        function hide(id)
        {
            document.getElementById(id).style.display = 'none';
        }

        function SaveCommentary(editor,reportID,controlID,commID,param1,param2,param3)
        {
            debugger;
            
            var result;
            var str = editor.get_element().id;
            
            var text = editor.get_html();
            var firstStripText = text.replace("<BODY contentEditable=true>","");
            var secondStripText = firstStripText.replace("</BODY>","");
            
            if(param1==undefined)
            {
                param1 = '';
            }
            
            if(param2==undefined)
            {
                param2 = '';
            }
            
            if(param3==undefined)
            {
                param3 = '';
            }
            
            result = Winston.SaveWithAjax(reportID, controlID, commID, param1, param2, param3, secondStripText);
                                    
            if (result.error == null)
            {
                var statusLabelID = "ctl00_commentaryMessage";
                var statusLabelText = document.getElementById(statusLabelID);
                
                var date = new Date();
                var d  = date.getDate();
                var day = (d < 10) ? '0' + d : d;
                var m = date.getMonth() + 1;
                var month = (m < 10) ? '0' + m : m;
                var yy = date.getYear();
                var year = (yy < 1000) ? yy + 1900 : yy;
                var hour = date.getHours();
                var min = date.getMinutes();
                
                if (min < 10)
                {
                  min = "0" + min;
                }
                
                var window = editor.get_toolAdapter().get_window();
                
                var oPos = GetTopLeftPosition(window);  
                
                // Position the label just below the save button
                statusLabelText.style.left = oPos.x;
                statusLabelText.style.top = oPos.y;
                
                statusLabelText.innerText = "Commentary Text Last saved at " + day + "-" + month + "-" + year + " " + hour + ":" + min
                fadeIn(statusLabelID, 20, 1000, 1000, 20, 200);
            }
            else
            {
                statusLabelText.innerText = "Failed to save commentary text. Please contact your system administrator.";
                fadeIn(statusLabelID, 20, 1000, 1000, 20, 200);
            }
         }
         function GetTopLeftPosition(el)  
         {  
              var left = 0;  
              var top = 0;  
         
              while (el.offsetParent)  
              {  
                  left += el.offsetLeft;  
                  top += el.offsetTop;  
                  elel = el.offsetParent;  
              }  
              
              if (el.x) left = el.x;  
              if (el.y) top = el.y;  
              var oPos = new Object();  
              oPos.x = left;  
              oPos.y = top;  
              return oPos;  
         }  
Rumen
Telerik team
 answered on 11 Mar 2011
3 answers
107 views
Hello,

Im trying to delete a recurrence exception but I keep getting this error:

Cannot locate the parent of appointment with ID = '1232'. Ensure that the parent appointment with ID = '1231' exists and is loaded.


This appointment is there and loaded as you can see in the added picture. I added the appointment id's between hooks as you can see.
Veronica
Telerik team
 answered on 11 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?