Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
104 views

Hi,

It seems that something has changed on the PostbackUrl behavior of the RadButton. When we click, there is no navigation to the PostbackUrl.

This leads to big issues in running applications.

Marc

Jose-Miguel
Top achievements
Rank 2
Iron
 answered on 22 Jan 2025
1 answer
160 views

Hi Everyone,

I need to display something (as spinner?) to indicate the application is running, because I have a process that forces the user to wait for 30-60 seconds. I think a spinner would be helpful. What I'm not sure is, how to accomplish this. Ironically, when loading this page, this webpage displays two circles each rotating/spinning in different directions. Something like that would be perfect.

How can I duplicate this in my ASP.NET AJAX project?

Essentially, the user presses the RADButton. So, I'd like to pop the spinners when the long process begins, and then hide it when the process is over. Is there a way to launch the spinner from within my C# function?

 

Thanks,

Mike


 

Rumen
Telerik team
 answered on 09 Oct 2024
1 answer
101 views

I have a RadGrid that required two separate Edit Buttons used for InPlace EditMode. I have created two GridButtonColumns each with a unique CommandName. I am capturing these button presses in the RadGrid.ItemCommand method. What I need, however, is some way of displaying a Confirm and a Cancel button while in Edit Mode for each of these edit buttons.  How can I achieve this?

Thanks!

Vasko
Telerik team
 answered on 12 Jun 2024
2 answers
1.7K+ views
Hi,

I am using a RadButton in one of my aspx pages but on clicking the button, the click event is not firing.
Here is the Markup of my page.

<asp:Label ID="labelCard" runat="server" Text="Select Card Type"></asp:Label>
<asp:DropDownList ID="ddlType" runat="server" AutoPostBack="true" DataTextField='<%# Eval("Type") %>' Width="120px">
    <asp:ListItem>--Select--</asp:ListItem>
    <asp:ListItem>Type 1</asp:ListItem>  
    <asp:ListItem>Type 2</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredCardValidator1" runat="server" ErrorMessage="Please select card type" ControlToValidate="ddlType" InitialValue="--Select--" />
<asp:Label ID="labelCode" runat="server" Text="Enter Coupon Code"></asp:Label>
<asp:TextBox ID="textCode" runat="server" />
<asp:RequiredFieldValidator ID="RequiredNameValidator2" runat="server" ErrorMessage="Please enter coupon code" ControlToValidate="textCode" Display="Dynamic" />
<telerik:RadButton ID="btnCheck" runat="server" Text="Submit" OnClick="btnCheck_Click">
</telerik:RadButton>

Thanks,
Ben
David
Top achievements
Rank 1
Iron
 answered on 18 Jan 2024
1 answer
225 views

Injection vulnerability in RadButton

Our company is using HCL AppScan to expose possible security vulnerabilities. Recently, the scans have started returning issues of high severity related to Blind LDAP Injection because the parameters of the hidden ClientState for RadButtons, such as buttonAbort_ClientState, can be appended to affect the response.

The test uses the following logic:
Four requests are sent.
The last is logically equal to the originalThe next-to-last is different. Any others are for control purposes.A comparison of the last two responses with the first (the last is similar to it, and the next-to-last is different) indicates that the application is vulnerable.

These are not LDAP issues since LDAP is not implemented on the server but our security team in concerned this is a vulnerability because the parameter can be appended without sanitization.

Is there legitimate reason for concern? If so do you have any suggestions for remediation. We are using version 2023.1.323.45.

 Regards, Joel

Attila Antal
Telerik team
 answered on 14 Dec 2023
1 answer
186 views
I have a simple grid running in Batch Edit mode. Need to disable column "Division" and change its color by clicking an outside button. My code gets executed but nothing changes. This column's color gets set by applying custom CSS using 
background-color: white !important;. My code assigns a different CSS with another color.

ASPX:
<telerik:GridBoundColumn DataField="Division" HeaderText="Division" UniqueName="Division"></telerik:GridBoundColumn>

VB cb:
    Protected Sub btnApprove_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnApprove.Click
        Dim Item As GridDataItem
        For Each Item In RadGrid1.MasterTableView.Items
            If (Item.IsDataBound) Then
                Dim col As GridBoundColumn = CType(RadGrid1.MasterTableView.GetColumn("Division"), GridBoundColumn)
                col.ItemStyle.CssClass = "customGriglinesGray"
                col.ReadOnly = True
            End If
        Next
    End Sub
Attila Antal
Telerik team
 answered on 13 Dec 2022
6 answers
832 views
Hello,

I have tried to set the text property in code-behind to "\n", Environment.Newline, Server.HtmlDecode("Carriage&#13;&#10;return");
and "<br />" but nothing has created multiline text on RadButton. My searching for answers has also found the aspx
templating : 
<
ContentTemplate>
        <span>RadButton Content</span><br />
<span>RadButton Content2</span>
 </ContentTemplate>
but even this is not giving me multiple lines.
Is there any other workaround for this ?

Martin

Doncho
Telerik team
 updated answer on 13 Oct 2022
1 answer
125 views

Hi,

 

I have a RadCombobox like this:

 

        <telerik:RadComboBox CheckBoxes="true" ID="rcb_team" DataSourceID="sds_team" DataValueField="id" DataTextField="naam" runat="server">
            <HeaderTemplate>
                <label class="mr-3">&nbsp;</label>
                 <div class="row">
                        <div class="col-6">Naam</div>
                     <div class="col-6">Functie</div>
                </div>
            </HeaderTemplate>
            <ItemTemplate>
                 <div class="row">
                        <div class="col-6"><%# Eval("naam") %></div>
                  <div class="col-2">
                      <telerik:RadButton ID="rb_teamleider" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" GroupName="Radios" runat="server">
                            <ToggleStates>
                    <telerik:RadButtonToggleState Text="Checked"></telerik:RadButtonToggleState>
                    <telerik:RadButtonToggleState Text="UnChecked"></telerik:RadButtonToggleState>
                </ToggleStates>
            </telerik:RadButton>
                </div>
            </ItemTemplate>
        </telerik:RadComboBox>

 

In this scenario the radio buttons are not toggling...can you please reproduce and see what is happening?

 

Thanks,

Marc

Attila Antal
Telerik team
 answered on 06 Oct 2022
1 answer
369 views
We have a need for a clear button (a small X icon) in the text input area of an editable RadComboBox. This needs to be in place for all RadComboBoxes used across the project. I've been digging around trying to see how this could be done. I found this post, which showed how to add a button that would clear the input, but the button is in the wrong spot (inside the dropdown list), and would have to be manually copied into each RadComboBox somehow. I found that the RadTextBox component has a clear button, but the RadComboBox seems to use only a regular input element. If I could edit or override the entire template for the component I think it would be possible, but I haven't found any way to do that. Is what I'm trying to accomplish doable with the built-in Telerik functionality?
Valentin Dragnev
Telerik team
 answered on 27 Sep 2022
1 answer
418 views

Hello!

As you can see in the image that I attached, my radgrid has 2 buttons at the bottom (Valider & Annuler) which stands for Validate and Cancel in english. These buttons are added as the following:


<EditFormSettings>
     <EditColumn FilterControlAltText="Filter EditCommandColumn column" ButtonType="PushButton" InsertText="Valider" CancelText="Annuler" EditText="Modif" UpdateText="Valider">
     </EditColumn>
</EditFormSettings>

I would like to change their design and apply a skin.  I have applied the Material skin to the whole RadGrid however these buttons seem to not be affected by that. Would that be possible to style them, just like we style any radbutton using Skins? Would changing the ButtonType from pushbutton to another type help with this matter?

 

Here's the full code of the radgrid shown in the attached image:


<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" Culture="French (France)"
            DataSourceID="SDS_Notes" GridLines="None" Width="775px" Skin="Material" 
            AllowAutomaticInserts="True" AutoGenerateEditColumn="True">
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
            <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataSourceID="SDS_Notes"
                NoMasterRecordsText="Aucune note" DataKeyNames="NumNote" 
                AllowAutomaticUpdates="True"
                Font-Size="13px">
                <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Ajouter une note"
                    RefreshText="Rafraichir"></CommandItemSettings>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridDropDownColumn DataField="AgenceAction" FilterControlAltText="Filter AgenceAction column"
                        HeaderText="Agence" SortExpression="AgenceAction" UniqueName="AgenceAction" HeaderStyle-Width="61px" DataSourceID="SDSAgence" ListTextField="AgenceAction" ListValueField="AgenceAction" ItemStyle-Width="130px">
                        <HeaderStyle Font-Size="15px" Width="80px"></HeaderStyle>
                        </telerik:GridDropDownColumn>
                    <telerik:GridDateTimeColumn DataField="DateAction" DataType="System.DateTime" FilterControlAltText="Filter DateAction column"
                        HeaderText="Date Action" SortExpression="DateAction" UniqueName="DateAction"
                        DataFormatString="{0:dd/MM/yyyy}" HeaderStyle-Width="110px">
                        <HeaderStyle Font-Size="15px" Width="130px"></HeaderStyle>
                    </telerik:GridDateTimeColumn>
                    <telerik:GridDateTimeColumn DataField="HeureAction" DataType="System.DateTime" FilterControlAltText="Filter HeureAction column"
                        HeaderText="Heure" SortExpression="HeureAction" UniqueName="HeureAction" PickerType="TimePicker" 
                        DataFormatString="{0:HH:mm}" HeaderStyle-Width="70px">
                        <HeaderStyle Font-Size="15px" Width="60px"></HeaderStyle>
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn DataField="Observations" FilterControlAltText="Filter Observations column"
                        HeaderText="Observations" SortExpression="Observations" UniqueName="Observations"
                        HeaderStyle-Width="500px" MaxLength="105">
                        <HeaderStyle Font-Size="15px" Width="500px"></HeaderStyle>
                        <ItemStyle CssClass="form-control" />
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column" ButtonType="PushButton" InsertText="Valider" CancelText="Annuler" EditText="Modif" UpdateText="Valider">
                    </EditColumn>
                </EditFormSettings>
                <HeaderStyle BackColor="#757575" Font-Bold="false" ForeColor="White"/>

            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>

I have tried setting the SkinID from codebehind in the itemcreated property however I am receiving the following error:

"The 'SkinId' property can only be set in or before the Page_PreInit event for static controls. For dynamic controls, set the property before adding it to the Controls collection."


    Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
    If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
        If Not e.Item.OwnerTableView.IsItemInserted Then
            '[......]
        Else
            '[......]
        End If
        Dim cancelButton As Button = CType(e.Item.FindControl("CancelButton"), Button)
            cancelButton.SkinID = "Material"
    End If
End Sub

Thanks a lot!
Valentin Dragnev
Telerik team
 answered on 25 Aug 2022
Narrow your results
Selected tags
Tags
+123 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?