Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
238 views
Hi

Is it possible to set the value of RadSlider through JavaScript based on a value in my textbox?  When I enter some value in the textbox then the slider should be set accordingly and vice-versa.
Thanks
Ben.
Princy
Top achievements
Rank 2
 answered on 15 Feb 2013
1 answer
109 views
ISSUE:show grid data with currency and export to excel in currency format,(sum is not working in excel).
on googling issue i was able to perform the task with inherting GridBoundColumn to my custom class GridCurrencyColumn
 but filters not working


here is my code:

i am facing problem with rad grid custom class GridCurrencyColumn
inherits GridTemplateColumn. 


 public class GridCurrencyColumn<T> : GridTemplateColumn
    {
        private string _javascript;
        private string _buttonName;
        private int _columnWidth;

        public GridCurrencyColumn(string buttonName, string dataField, int columnWidth, string javascript, string gridId)
        {
            _buttonName = buttonName;
            ITemplate template = new GridMoneyItemTemplate<T>(dataField);
            _javascript = javascript;
            string onClientClick = string.Format(_javascript, typeof (long), dataField, gridId);

            DataField = dataField;
            UniqueName = dataField;
            DataType = typeof (decimal);
            AllowFiltering = true;
            HeaderTemplate = new ButtonGridHeaderTemplate(buttonName, onClientClick);
            ItemTemplate = template;
            _columnWidth = columnWidth;
            ItemStyle.Width = Unit.Pixel(_columnWidth);
            HeaderStyle.Width = Unit.Pixel(_columnWidth);
            HeaderStyle.Wrap = false;
            ItemStyle.HorizontalAlign = HorizontalAlign.Right;
            HeaderStyle.HorizontalAlign = HorizontalAlign.Right;
            ItemStyle.Wrap = false;
            HeaderText = buttonName;
        }

        public override string EvaluateFilterExpression()
        {
            string expression = base.EvaluateFilterExpression();
            return expression.Replace("$", "").Replace(",", "");
        }

        public override GridColumn Clone()
        {
            GridCurrencyColumn<T> res = new GridCurrencyColumn<T>(_buttonName, DataField, _columnWidth, _javascript, null);
            res.CopyBaseProperties(this);
            return res;
        }
    }
i have converted data using {0:C} so that i am able to view data with $ in GridMoneyItemTemplate.


//ExportCellFormatting funtion for grid
static void Grid_ExportCellFormatting(object sender, ExportCellFormattingEventArgs e)
        {
     
            if (e.FormattedColumn.ColumnType.IndexOf(GridCurrencyColumnName) > -1)
            {
               
                e.Cell.Style["mso-number-format"] = "currency";
            }
}


but in excel i am not getting data in currency format.
moreover i am not getting  e.cell.text in ExportCellFormatting funtion
Shinu
Top achievements
Rank 2
 answered on 15 Feb 2013
2 answers
229 views
Hi,

I have a RadPanelBar that uses an ItemTemplate.  Inside of this ItemTemplate I have a radMenu which has an ItemTemplate of its own containing a checkboxlist and a radbutton.  I am dynamically populating the checkboxlist, and have found that if the checkboxlist contains several items, it causes the menu to be larger than the panelbaritem that contains it.  When this happens, the radmenu is cut off by the next panelbaritem.  I have seen several tips about setting z-index but nothing seems to work.  I have tried setting the z-index on the radmenu, the radmenuitem (via a cssclass), and I have tried wrapping my inner template with a div with the z-index set to a high value.  I have also tried using the mouseover client event to set the menu z-index.  None of these have any affect.    Below is some sample code.  If you set the checkboxlist to contain several items the problem should occur.  Any suggestions would be greatly appreciated.

Thanks!
Richard
<telerik:RadPanelBar runat="server" ID="pbPanelBar" Width="100%" Skin="Office2007"
                                    AllowCollapseAllItems="true"
                                    ExpandMode="MultipleExpandedItems" >
                                    <ItemTemplate>
                                        <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="LoadingPanel1">
                                            <telerik:RadMenu ID="MyMenu" runat="server" Style="float: right" EnableScreenBoundaryDetection="true"
                                                EnableRoundedCorners="true">
                                                <Items>
                                                    <telerik:RadMenuItem Text="Copy" GroupSettings-ExpandDirection="Left">
                                                        <Items>
                                                            <telerik:RadMenuItem Text="Copy" GroupSettings-ExpandDirection="Left">
                                                                <ItemTemplate>
                                                                    <div style="z-index:5000000003">
                                                                    <asp:CheckBoxList runat="server" ID="cblList" Width="300px">
                                                                    </asp:CheckBoxList>
                                                                    <telerik:RadButton style="z-index:inherit" ID="btnButton1"
                                                                        runat="server" Text="Test Button" />
                                                                    </div>
                                                                </ItemTemplate>
                                                            </telerik:RadMenuItem>
                                                        </Items>
                                                    </telerik:RadMenuItem>
                                                </Items>
                                            </telerik:RadMenu>
</telerik:RadAjaxPanel>
</ItemTemplate>
</RadPanelBar>
Richard
Top achievements
Rank 1
 answered on 15 Feb 2013
2 answers
149 views
hi,
i created of the web page with the telerik objects. Now i tested this page with the service Markup Validation Service from this site: http://validator.w3.org/#validate_by_uri and i've the errors this page from objects telerik.

Now i posted this error:
Validation Output: 14 Errors
Line 221, Column 59: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowProfiledelete_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 291, Column 57: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowLoadprofile_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 295, Column 54: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowLoadcard_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 299, Column 60: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowInsertCategory_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 303, Column 55: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowChangepwd_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 345, Column 62: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowAnteprimaProfile_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 349, Column 59: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowAnteprimaCard_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 353, Column 52: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="RadWindowinvito_C" style="display:none;">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 525, Column 90: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag… summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 531, Column 49: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag…class="rcbSlide" style="z-index:6000;"><div id="Categoria_DropDown" class="Rad…
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 539, Column 90: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag… summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 545, Column 49: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag…class="rcbSlide" style="z-index:6000;"><div id="Radclassificazione_DropDown" c…
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 551, Column 90: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag… summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 557, Column 49: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag…class="rcbSlide" style="z-index:6000;"><div id="Comune_DropDown" class="RadCom…
✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

this is page www.trycontact.com/profile.aspx

please help me to understand and resolve these errors.

thanks
Fabio Cirillo
Top achievements
Rank 1
 answered on 15 Feb 2013
7 answers
321 views
Hi,

I'm using the DayRender event to set styles for holidays and weekends on a radDatePicker containing a calendar with autopostback = true. I've then used AjaxManager to cause the DayRender to fire when the fast-navigation 'next month' button is clicked on the calendar.

The problem I get is that the Ajax postback appear to fire but the calendar control (month view) disappears and the user has to click the calendar button on the datepicker again to bring it back. It does however display the next month which is what i needed. I need to stop the calendar hiding itself.

Any idea how I could fix or work around this?

Many Thanks
Mark
Peter
Top achievements
Rank 1
 answered on 14 Feb 2013
2 answers
639 views
Hi

I have a Imagebutton in my RadGrid. During the OnClientClick of the image button i need to get the DataKeyNames and the Command Argument value of the imagebutton in my client side.

Regards
Nithya
Erena
Top achievements
Rank 1
 answered on 14 Feb 2013
0 answers
152 views
I created a Radcalendar inside the Radwindow in a aspx page. when I run this and open the Radwindows and click the calendar to select a date. Then I close the Radwindow but the calnedar with dates still shows.
Rokesh
Top achievements
Rank 1
 asked on 14 Feb 2013
2 answers
314 views
Hello,

Here is what I am trying to achieve. I have a grid which consists of Template columns and I use entity framework to make updates.
The gird will always have one row and the row is in editable mode at all times. Along with the grid I have couple of other controls and another grid on the same page. And I am using an external Save button to save my changes.

Now I dont want to save the Grid Data if the row data was not changed at all. I have tried using
ExtractValuesFromItem
and SavedOldValues. Both of them return nulls. Also I am using Bind and NeedDataSource as suggested in various posts. 
I am left with following options :
1) Change the entity framework resultset to a Dataset and add that dataset as a public property and use
Dim changedRows As DataRow() = ordersTable.Select("OrderID = " + editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("OrderID").ToString()

2) Add the OntextChanged event and then do some javascript.


Questions:
Q1 What is the best way of detecting changes and are there any other alternatives?
Q2 Is ther anything that I am missing in my current method of ExtractValuesFrom Item?

Please help. I have gone through numerous threads and downloaded many samples. They work but does not fit into my requirement.

Thanks
Pooja
Top achievements
Rank 1
 answered on 14 Feb 2013
1 answer
105 views
I am building upon your demo at:

http://demos.telerik.com/aspnet-ajax/ribbonbar/examples/overview/defaultcs.aspx

What I am trying to do is build a simulation to Microsoft Word 2010.  As I am adding more buttons to the existing groups, the buttons want to continue to span horizontally, but not wrap to the second or third lines.  How can I get these buttons to be placed or wrapped to move to the next lines instead of one single horizontal line of buttons?

See attached image example.

Thank you in advance for you help.
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 14 Feb 2013
3 answers
1.1K+ views
I have a radbutton that calls a local javascript function to perform a jquery animation to an object on the screen. I've set the button to not post back (button.set_autoPostBack(false), but the jquery animation is causing a postback to the server. Whenever I remove the jquery portion the postback doesn't occur. I'm new to jquery, but I figured I could call this slide animation without doing a postback.

The Code:

<script type="text/javascript">
        //<![CDATA[
        function doThis(button, args)
{

            button.set_autoPostBack(false);
            $telerik.$("#testing").slideUp(1000, "slideUp", function () { null; });                
        }
        //]]>
</script> 


 <div id="" class="page_center home_banner_info_block">
     <telerik:RadButton ID="RadButton1" ButtonType="StandardButton" ClientIDMode="Static" runat="server"  Text="RadButton" AutoPostBack="false" OnClientClicked="doThis" >
     </telerik:RadButton>

            <div id="testing" class="white-box" style="width:460px; height:400px; float: left;" >
            <div class="wrap">
            testing
            </div>
            </div>
 </div>
 </div>



    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager> 
Slav
Telerik team
 answered on 14 Feb 2013
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?