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

I've got a theme set for my entire project in the App_Themes folder. Within this folder I have a style sheet which, among other things, specifies the style for all radGrids.  I now have a requirement to completely change the style on one particular grid within one user control.  There are other grids in this user control that shouldn't change.

What's the best way to override the style on one grid on one user control?

Thanks.

Rumen
Telerik team
 answered on 02 Apr 2019
3 answers
604 views
I apologize if this has been answered elsewhere.  I have what, I think, is a simple problem.  I am trying to access one of the controls in the LayoutTemplate of a RadListView via javascript.   Here is the ListView code:
<telerik:RadListView ID="rlvApproval" runat="server">
    <LayoutTemplate>
        <table>
            <tr>
                <td style="width: 250px;">
                </td>
                <td style="width: 200px; font-weight: bold;">
                </td>
            </tr>
        </table>
        <asp:PlaceHolder ID="itemplaceholder" runat="server" />
        <table>
                                <tr>
                <td style="width: 250px;">
                    <asp:Label ID="lblName" runat="server" Text="Total" Font-Bold="true" />
                </td>
                <td style="width: 200px; font-weight: bold;">
                    <telerik:RadNumericTextBox ID="txtTotalValue" runat="server" ReadOnly="true" DataType="System.Decimal"
                        Skin="Web20">
                        <NumberFormat DecimalDigits="0" />
                    </telerik:RadNumericTextBox>
                </td>
            </tr>
              
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <table>
            <tr>
                <td style="width: 250px;">
                    <asp:Label ID="lblName" runat="server" Text='<%# Eval("name") %>' />
                </td>
                <td style="width: 250px;">
                                                <telerik:RadNumericTextBox ID="txtValue" runat="server" DataType="System.Decimal"
                        Skin="Web20" DbValue='<%# DataBinder.Eval(Container.DataItem, "value") %>' MaxValue="100"
                        MinValue="0" AutoPostBack="false" >
                        <NumberFormat DecimalDigits="0" />
                        <ClientEvents OnValueChanged="ValidateWeighting" />
                    </telerik:RadNumericTextBox>
                </td>
            </tr>
        </table>
    </ItemTemplate>
    <EmptyDataTemplate>
        <div class="message">
            <asp:Label ID="lblEmptyMessage" runat="server" SkinID="messageBig" Text="Error loading approval information..." />
        </div>
    </EmptyDataTemplate>
</telerik:RadListView>
Whenever the txtValue is updated, I fire a javascript function to determine if the values are 100% based on the current total value that is set in the codebehind.  Here is the code I have that is working:
function ValidateWeighting(sender, eventArgs) {
    var object = document.getElementById('ctl00_ContentPlaceHolder1_Weighting1_rlvApproval_txtTotalValue_text');
    var object2 = document.getElementById('<%= rlvApproval.ClientID %>');
    var current = eval(object.value);
    var old = eventArgs.get_oldValue();
    var newval = eventArgs.get_newValue();
    var tmp = current + (newval - old);
    if (tmp == 100) {
        document.getElementById('<%= btnSave.ClientID %>').disabled = false;
    }
    else {
        document.getElementById('<%= btnSave.ClientID %>').disabled = true;
    }
    object.value = tmp;
}
However, The id to get the object for the txtTotalValue control was obtained through "View Source".  What I am looking for is the right way to do this that avoids browser differences, web server differences, etc.
Any thoughts?
Peter Milchev
Telerik team
 answered on 02 Apr 2019
0 answers
119 views
Hello,

More details about this issue you can find here:


Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Eyup
Top achievements
Rank 1
 asked on 02 Apr 2019
2 answers
1.0K+ views

Getting error Uncaught TypeError: Cannot read property 'cells' of undefined When i Click on an item from a RadContextMenu. This page has a Rad-scheduler.  

 

Peter Milchev
Telerik team
 answered on 02 Apr 2019
7 answers
1.0K+ views

Hello,

I'm experiencing an issue and I hope you can help me with this. I saw a similar thread but it's from 2017 and it doesn't answer all of my concers,  so that´s why I open a new one. But if you prefer, I can continue in the other one.

Anyway, we are using RadEditor with ImageManager.

When users of our application are trying to upload an image, the upload seems to be going on forever (there is a yellow dot by the image's name) and when I peek at the Chrome's Dev Tool console (Chrome is updated) , an "Unexpected token < in JSON at position 453" error is logged.

I attached an image showing this error message. 

But when I changed "EnableAsyncUpload" property to false, it uploads correctly and saves the image in the specified location without any problem.

I can leave it like this but it bugs me a lot not to know why the error appears.

Is it really ok leaving EnableAsyncUpload in False? Is there a way to fix the JSON issue?

 

Thank you!

PS: just in case, snippets of how it's declared the editor in the ascx file and how it's configured in the code behind

<div id="HtmlBodyCell" style="<%= HtmlBodyCellStyle %>">
 <Telerik:RadEditor ID="HtmlBodyTextArea" runat="server" Width="475px" Height="400px" />
</div>

 

string[] imgPath = { vpath };
 
HtmlBodyTextArea.EnableFilter(Telerik.Web.UI.EditorFilters.MakeUrlsAbsolute);           
HtmlBodyTextArea.ImageManager.UploadPaths = imgPath;
HtmlBodyTextArea.ImageManager.ViewPaths = imgPath;
HtmlBodyTextArea.ImageManager.MaxUploadFileSize = 200000;
HtmlBodyTextArea.ImageManager.EnableAsyncUpload = true;
HtmlBodyTextArea.ImageManager.RenderMode = RenderMode.Lightweight;

 

Rumen
Telerik team
 answered on 02 Apr 2019
3 answers
144 views

Hello, 

please I need your help in client side code ,

I need  javascript code that explain how can RadComboBox in header affects on all RadComboBoxs in asp repeater rows,

how can set same value and same text .

 

thanks

AHMED
Top achievements
Rank 1
 answered on 01 Apr 2019
0 answers
121 views

I have created a dynamic wizard steps. I want to delete the wizardsteps based on index. How can do this.

Ascx Page:

<telerik:RadButton runat="server" RenderMode="Lightweight" ID="rbtnRemoveSteps" Text="Remove Steps" AutoPostBack="false" OnClientClicked="RemoveSteps" ></telerik:RadButton>

 

Ascx Script:

function RemoveSteps() {
   var ajaxmanager = null;
   ajaxmanager = $find('<%=RadAjaxManager.GetCurrent(this.Page).ClientID%>');
   ajaxmanager.ajaxRequest('DeleteSteps');
}

Parent Page:

case "DeleteSteps":
    if (UIControlsWizard.WizardSteps.Count >=0)
    {
         int activeIndex = UIControlsWizard.ActiveStepIndex;
         UIControlsWizard.WizardSteps.RemoveAt(activeIndex);
    }
    break;

 

Saif
Top achievements
Rank 1
 asked on 01 Apr 2019
1 answer
457 views

     Hi,I have a problem with RadDataForm and HiddenField. I have a scenario like this:

 

 <telerik:RadDataForm runat="server" ID="radDataForm" DataSourceID="myDataSource">

   <InsertItemTemplate>

        <asp:HiddenField ID="hiddenField" runat="server" Value='<%# Bind("MyProperty") %>' />

         <telerik:RadComboBox ID="myCombo" runat="server" SelectedValue='<%# Bind("MyProperty2") %>' />

   </InsertItemTemplate>

</telerik:RadDataForm>

I Just semplify my code. The problem is that radComboBox (as other telerik controls) works fine and i bind my object passed in data source, while the property bounded throught asp:HiddenField doesn't work, even the value is not null.

Any suggestions?

 

Thanks

 

 

Vessy
Telerik team
 answered on 01 Apr 2019
1 answer
250 views
Hi,
    In my RadGrid, I have a Custom RadToolbar for implement my actions. Inside this toolbar I have a RadButton
<telerik:RadToolBarButton   Text="<%$ Resources:AdminLoc, btnAddDailyEquipment %>"
ImageUrl="~/Web/Images/Icons/ress_equipement.gif"
Group="DailyEquipment" CommandName="AddDailyResource" CommandArgument="DailyEquipment"
Value="DailyEquipment" Visible="<%# KeyValueTools.GetActivitekRepentignyDev %>">


My  Toolbar implement the OnClientButtonClicked attribute who calling a JS function with this code
case "AddDailyResource":<br> $find('<%= RgPanelSummary.ClientID%>').get_masterTableView().fireCommand(args.get_item().get_commandName(), argument);<br>        break;


If I have more than one element in my grid. The server-side ItemCommand is fired

But my problem occuring when I have no data in my RadGrid. The server-side called the ItemDataBound (RadGrid), the PageLoad, PageRender, etc. But the ItemCommand is never called. I have this problem for each custom action "Print, DailyEquipement". But If I using a default Radgrid action (DeletedSelected, InitInsert) the ItemCommand is called.

Can I resolve my problem? And If Yes how ?
Thank you and have a good day



Eyup
Telerik team
 answered on 01 Apr 2019
7 answers
289 views
Hi,

Why isn't there a check/uncheck all event for the combo box?

If I need to have a second related form element I can't do it from this as there is no JS event for when items are checked.  Yes you can get individual checks but there is no event raised when all are done. 

From looking at the forums this is appears to have been going on for a while.  Please advise on a way to get notified on the client when the check all box is checked.  

Thanks,

Jon
Akun
Top achievements
Rank 1
 answered on 31 Mar 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?