Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
72 views
I am having issues with updating the value of a control within the edittemplate of a radgrid control. 

Here is the layout of the javascript

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
        <script type="text/javascript">
            function setTotal() {
                var radCostF = 0;
                var radPercentF = 0;
                var radTotal;
                  
                var radLength = document.getElementsByTagName("INPUT");
                var strToFind = "TEMPCOST";
                for (i = 0; i < radLength.length; i++) {
                    var element = radLength[i];
                    strToFind = "TEMPCOST";
                    if (element.id.indexOf(strToFind) >= 0) {
                        if (element.id.lastIndexOf(strToFind) + strToFind.length == element.id.length) {
                            alert(element.id + "=" + element.value);
                            radCostF = element.value;
                        }
                    }
                    strToFind = "TEMPPCT";
                    if (element.id.indexOf(strToFind) >= 0) {
                        if (element.id.lastIndexOf(strToFind) + strToFind.length == element.id.length) {
                            alert(element.id + "=" + element.value);
                            radPercentF = element.value;
                        }
                    }
  
                    strToFind = "TOTAL";
                    if (element.id.indexOf(strToFind) >= 0) {
                         
                        if (element.id.lastIndexOf(strToFind) + strToFind.length == element.id.length) {
                        element.value = radCostF * radPercentF / 100;
                        }
                    }
  
  
                }
  
            }
          
        </script>
      
    </telerik:RadCodeBlock>


In the user control the code is such

 

<td>

 

Total:

<br />

 

 

<telerik:RadNumericTextBox NumberFormat-DecimalDigits="2" ID="TEMPCOST" runat="server"

 

 

Value= '<%#CheckNumericNull(DataBinder.Eval(Container, "DataItem.TEMPCOST"))%>' >

 

 

<ClientEvents OnBlur="setTotal" />

 

 

</telerik:RadNumericTextBox>

 

 

</td>

 

<

 

td>

 

 

 

 

Total:

<br />

 

 

 

 

 

<telerik:RadNumericTextBox NumberFormat-DecimalDigits="2" type="Currency" ID="TOTAL" runat="server"

 

 

 

 

 

ReadOnly="true" Value="0.00" />

 

 

 

 

 

</td>

 

 

 



The event OnBlur fires and I can read the values from the source controls and set the value of the target (TOTAL) but the value is not reflected to the user.  In other words if I set the value of TempCost to 100 and Percent to 10 then when I pass through the same code again, the value of the TOTAL field is 10 but screen still shows 0 even after the event has fired.  Any thoughts as to why the screen is not displaying the updated value?

Princy
Top achievements
Rank 2
 answered on 28 Dec 2010
1 answer
66 views
Hi Guys,

I have a problem with radComboBox control during drugging the radwindow. When i expand radcombobox  and then drug( move ) radwindow, expanded items are not moving with window, they are glued, you can see it on the attached screenshot.  I created small test application for reproducing this issue, here is my code:
<telerik:RadScriptManager runat="server" ID="radManager">
</telerik:RadScriptManager>
<telerik:RadWindow runat="server" ID="rd" VisibleOnPageLoad="true">
<ContentTemplate>
<div style="width: 200px; height: 200px;">
<telerik:RadComboBox runat="server" ID="radCombo">
<Items>
<telerik:RadComboBoxItem Text="Item 1" />
<telerik:RadComboBoxItem Text="Item 2" />
<telerik:RadComboBoxItem Text="Item 3" />
<telerik:RadComboBoxItem Text="Item 4" />
<telerik:RadComboBoxItem Text="Item 5" />
</Items>
</telerik:RadComboBox>
</div>
</ContentTemplate>
</telerik:RadWindow>


Steps to reproduce:
1) Expand the radcombobox control,
2) Move the radwindow

Can somebody help me with it?
Thanks in advance!
Simon
Telerik team
 answered on 28 Dec 2010
1 answer
66 views
The grid is displaying the pound sign as two question marks whenever a postback occurs.  The £ is displayed correctly on initial load, however changes on any grid interaction.  The £ needs to be presnt in a text field, for example the cell may have the following text, 'this is worth £6k'.  It is also displaying incorrectly on a decimal formatted cell when £ is appended.

Any help would be much appreciated.
Nikolay Rusev
Telerik team
 answered on 28 Dec 2010
8 answers
475 views
Hi all,

I'm using a radconfirm window on a webform and when the user clicks Ok, I do a __doPostBack() to perform some server operations.

Here's my javascript:
function promptConfirm(id)
{
    var callBackFn = function(arg)
    {
        if (arg == true)
            __doPostBack("yesButton", id);
    }
    radconfirm("Did you print the confirmation report(s)?", callBackFn, 330, 100);
}

In the code behind, I update a field in the database and rebind a grid on the same page.
I'm trying to write it so the grid rebinds during postback, but using ajax, so the user can't see the whole page flicker.

Any help would be appreciated.

Rod

Iana Tsolova
Telerik team
 answered on 28 Dec 2010
1 answer
107 views
Hi,
I am working on a requirement where users can copy paste image and also type some text in a control. This contenet along with the image has to be saved either to database or in any SharePoint contents, also this content should be retrieved as is from saved object and shoule be shown to user. Please let me know whether Telerik supports this type of control.

Thanks & Regards,
Pradeep

Stanimir
Telerik team
 answered on 28 Dec 2010
1 answer
31 views
Hi there,

Can any one help me, how to format data exporting from grid to Excel, PDF and CSV?
When I export the grid its alignment looks very badly.

And i am not getting the ExportToExcelML() in my code behind.

Regards,

Amarnath
Shinu
Top achievements
Rank 2
 answered on 28 Dec 2010
4 answers
49 views

Hello.

I'm using a RadSplitter control with a RadTreeView in the left pane and a detail ASP:Panel on the right pane.

All is working fine except the speed of the right panel update. Updating the controls in the as:panel container is very slow when the tree contains many nodes and it's fast when the tree contains a few nodes. The update is triggered when the user clicks on a node.

In the Ajax Manager i'm updating the asp:panel PanelTreeItems only and not the left pane that contains the tree (PanelMain). Does it mean that the tree is also updated?
Here is the ASP code

...
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyFilters" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTreeView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelTreeItems" LoadingPanelID="RadAjaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadWindowManager ID="RadWindowManager" runat="server" Skin="Outlook">
    </telerik:RadWindowManager>
...
<asp:Content ID="ContentMain" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <asp:Panel ID="PanelMain" runat="server" Visible="true">
    <table>
        ...
        <telerik:RadSplitter ID="RadSplitter" runat="server" Height="100%" Width="100%" Visible="false"
            ResizeMode="EndPane" Skin="Office2007">
            <telerik:RadPane ID="Radpane1" runat="server" Width="350" Scrolling="Y" MinWidth="22">
                <table id="MainTable" style="z-index: 102;" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <telerik:RadTreeView ID="RadTreeView" runat="server" CheckBoxes="false" Height="90%">
                        </telerik:RadTreeView>
                    </tr>
                </table>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
            <telerik:RadPane ID="Radpane2" runat="server" Scrolling="None" MinWidth="22">
                <asp:Panel ID="PanelTreeItems" runat="server" Visible="true">
                ...
                </asp:Panel>
            </telerik:RadPane>
        </telerik:RadSplitter>
    </table>
    </asp:Panel>
</asp:Content>

Thanks for you help.
Regards
Augusto
Iana Tsolova
Telerik team
 answered on 28 Dec 2010
3 answers
62 views
Hello, I upgraded to the latest and it seems that the LoginStatus and LoginName are rendering as Buttons!  They are supposed to be normal text, I think.  I use the formdecorator in my master page for All controls - any way to turn it off specifically for this or to override the style below?  Note: I'm not a CSS expert, so you would have to tell me what to put.   Maybe a good feature going forward is to also specify IgnoreControls="LoginControl", in case you want ALL but ignore only these controls...
thanks
Marty

<span id="ctl00_ctl00_DefaultContent_LoginView1_loginName1" class="rfdLoginControl">Welcome sa</span>
Bozhidar
Telerik team
 answered on 28 Dec 2010
1 answer
170 views
Hi,
We are facing issues while using the Clinet side validation (RequiredFieldValidator) in RadGrid EditFormSettings section.
The Edit/Add form has a button (btnGrdSave), on click btnGrdSave button the RequiredFieldValidator doesn't gets fired, instead the server side code is executed. This behaviour is causing the server code execution before validating the form.

I am attaching the code, kindly review and help me in sorting out the issue.

Code:
<telerik:RadGrid ID="RadGridAmount" runat="server" GridLines="None" AllowPaging="True"
                                                                        PageSize="5" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true"
                                                                        HorizontalAlign="NotSet" AllowMultiRowEdit="false" AllowFilteringByColumn="true"
                                                                        OnItemCommand="RadGridAmount_ItemCommand" Width="100%" AllowMultiRowSelection="False" AllowAutomaticUpdates="True"
                                                                        OnNeedDataSource="RadGridAmount_NeedDataSource" OnPreRender="RadGridAmount_PreRender">
                                                                        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                                                        <MasterTableView CommandItemDisplay="Bottom" DataKeyNames="RangeID" EditMode="PopUp">
                                                                            <CommandItemSettings ShowAddNewRecordButton="true" />
                                                                            <Columns>
                                                                                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Select" AllowFiltering="false">
                                                                                    <ItemTemplate>
                                                                                        <asp:CheckBox ID="chkRangeID" runat="server" AutoPostBack="false" />
                                                                                    </ItemTemplate>
                                                                                </telerik:GridTemplateColumn>
                                                                                <telerik:GridBoundColumn UniqueName="RangeID" HeaderText="RangeID" AllowFiltering="false"
                                                                                    DataField="RangeID" Visible="false">
                                                                                </telerik:GridBoundColumn>
                                                                                <telerik:GridBoundColumn FilterControlWidth="105px" HeaderStyle-Width="300px" ItemStyle-Width="300px"
                                                                                    DataField="RangeFrom" HeaderText="RangeFrom" SortExpression="RangeFrom" UniqueName="RangeFrom"
                                                                                    HeaderStyle-Font-Bold="true" ReadOnly="true">
                                                                                </telerik:GridBoundColumn>
                                                                                <telerik:GridBoundColumn FilterControlWidth="105px" HeaderStyle-Width="300px" ItemStyle-Width="300px"
                                                                                    DataField="RangeTo" HeaderText="RangeTo" SortExpression="RangeTo" UniqueName="RangeTo"
                                                                                    HeaderStyle-Font-Bold="true" ReadOnly="true">
                                                                                </telerik:GridBoundColumn>
                                                                                <telerik:GridTemplateColumn HeaderText="Percentege" DataField="Percentege" UniqueName="Percentege"
                                                                                    HeaderStyle-Font-Bold="true" AllowFiltering="false">
                                                                                    <ItemTemplate>
                                                                                        <asp:TextBox ID="txtPercentage" runat="server" Width="30%"></asp:TextBox>
                                                                                    </ItemTemplate>
                                                                                </telerik:GridTemplateColumn>
                                                                                <telerik:GridTemplateColumn HeaderText="Amount" DataField="Amount" UniqueName="Amount"
                                                                                    HeaderStyle-Font-Bold="true" AllowFiltering="false">
                                                                                    <ItemTemplate>
                                                                                        <asp:TextBox ID="txtAmount" runat="server" Width="30%"></asp:TextBox>
                                                                                    </ItemTemplate>
                                                                                </telerik:GridTemplateColumn>
                                                                                <telerik:GridEditCommandColumn>
                                                                                </telerik:GridEditCommandColumn>
                                                                                <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete">
                                                                                </telerik:GridButtonColumn>
                                                                            </Columns>
                                                                            <EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit RangeID: {0}"
                                                                                CaptionDataField="RangeID" EditFormType="Template">
                                                                                <FormTemplate>
                                                                                    <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0">
                                                                                        <tr>
                                                                                            <td>
                                                                                            </td>
                                                                                            <td>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td>
                                                                                                Range From:
                                                                                            </td>
                                                                                            <td>
                                                                                                <asp:TextBox ID="txtRangeFrom" Text='<%# Bind("RangeFrom") %>' runat="server" ValidationGroup="RangeValidation1">
                                                                                                </asp:TextBox>
                                                                                                  <asp:RequiredFieldValidator runat="server" ID="rfvFrom" ControlToValidate="txtRangeFrom"
                                                                                                    Display="Dynamic" ErrorMessage="Range From is required" ValidationGroup="RangeValidation1" />
                                                                                           
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td>
                                                                                                Range To:
                                                                                            </td>
                                                                                            <td>
                                                                                                <asp:TextBox ID="txtRangeTo" Text='<%# Bind("RangeTo") %>' runat="server" ValidationGroup="RangeValidation1">1
                                                                                                </asp:TextBox>
                                                                                                  <asp:RequiredFieldValidator runat="server" ID="rfvTo" ControlToValidate="txtRangeTo"
                                                                                                    Display="Dynamic" ErrorMessage="Range To is required" ValidationGroup="RangeValidation1" />
                                                                                           
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                    <table style="width: 100%">
                                                                                        <tr>
                                                                                            <td align="right" colspan="2">
                                                                                                <asp:Button ID="btnGrdSave" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                                                    ValidationGroup="RangeValidation1" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                                                                                </asp:Button>&nbsp;
                                                                                                <asp:Button ID="btnGrdCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                                                                    CommandName="Cancel"></asp:Button>
                                                                                                <asp:ValidationSummary ID="valsumm" runat="server" ValidationGroup="RangeValidation1" ShowSummary="true">
                                                                                                </asp:ValidationSummary>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </FormTemplate>
                                                                            </EditFormSettings>
                                                                        </MasterTableView>
                                                                    </telerik:RadGrid>
Nikolay Rusev
Telerik team
 answered on 28 Dec 2010
0 answers
110 views
I have a RadComboBox with AutoPostBack property set to "True". When the SelectedIndexChanged of RadComboBox gets fired, the page does gets loaded completely, but suddenly after that it throws a javascript runtime error. The same happens even on click of a button too.

I have attached the snapshot of the error that pops up.

Even if i comment out all the code written in SelectedIndexChanged Event, still its throws the same javascript runtime error. So i think there is something wrong with the markup written (but not sure).

It would be of great help to me if you shed some light on the possibilities of what might be the cause of the error.

Please do reply on urgent basis, as i am stuck in my project due to this issue.

Thanks in advance.
<telerik:RadAjaxManager ID="radAjaxManager" runat="server" EnableHistory="True">
        <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="btnAddMembers">           
             <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGvViewMembers" LoadingPanelID="radMembersLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="radGvViewExisitngMembers" LoadingPanelID="radMembersLoadingPanel" />
                    <telerik:AjaxUpdatedControl ControlID="lblImport"/>
                    <telerik:AjaxUpdatedControl ControlID="lblErrorImport"/>
                    <telerik:AjaxUpdatedControl ControlID="radComboDatabase"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnRemoveMembers">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGvMembers" LoadingPanelID="radMembersLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
<telerik:RadAjaxLoadingPanel ID="radMembersLoadingPanel" runat="server" Height="75px"
        Width="75px" Transparency="2">
        <asp:Image ID="loadingImg" runat="server" ImageUrl="~/App_Themes/Default/images/loading.gif"
            AlternateText="Loading..." />
    </telerik:RadAjaxLoadingPanel>
 
<!-- RadComboBox   -->
<telerik:RadComboBox ID="radComboDatabase" runat="server" AutoPostBack="true" OnSelectedIndexChanged="radComboDatabase_SelectedIndexChanged"
                        AppendDataBoundItems="true">
                        <CollapseAnimation Type="OutQuint"></CollapseAnimation>
                        <Items>
                            <telerik:RadComboBoxItem Text="Select database" Value="-1" />
                        </Items>
                    </telerik:RadComboBox>

Anup
Top achievements
Rank 1
 asked on 28 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?