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

So i have a textbox field that needs a few alerts and a confirm when a value is entered and the button in the grid is clicked to save the value of the textbox to the database.  How would this be achieved?

<telerik:GridTemplateColumn HeaderText="New Price" UniqueName="newprice">
<ItemTemplate> <asp:TextBox ID="txtNewPrice" runat="server" ></asp:TextBox> </ItemTemplate
</telerik:GridTemplateColumn
 <telerik:GridTemplateColumn HeaderText="Action" UniqueName="Action"> <ItemTemplate> <asp:Button ID="btnOverride" Text="Override" runat="server" OnClientClick="return Validate();" OnClick="Override_Click"></asp:Button> </ItemTemplate>  </telerik:GridTemplateColumn>
Eyup
Telerik team
 answered on 24 Dec 2020
3 answers
406 views

Hi,

 

When I try to use client side validation on RadMaskedTextbox as follows, the validation still takes place after a postback. is this a bug?

I try to follow your demo https://demos.telerik.com/aspnet-ajax/textbox/functionality/validation/defaultvb.aspx

 

    <asp:TextBox ID="batch" runat="server" Width="60%"></asp:TextBox>
     <asp:RequiredFieldValidator ErrorMessage="Mandatory" ValidationGroup="Contact" Enabled="True" id="batchReq" ControlToValidate="batch" CssClass="text-danger small" display="dynamic" runat=server />
    <br />



      <telerik:RadMaskedTextBox RenderMode="Lightweight" EnableEmbeddedSkins="false" Skin="MetroTouchNeutral" ValidationGroup="Contact" ID="rmt_tijd" visible="true" runat="server" Mask="<0..24>:<0..59>" Width="30%"></telerik:RadMaskedTextBox>




                            <asp:RequiredFieldValidator EnableClientScript="true" ErrorMessage="Mandatory" ValidationGroup="Contact" Enabled="true" InitialValue="00:00"  id="RequiredFieldValidator3" ControlToValidate="rmt_tijd" CssClass="text-danger small" display="dynamic" runat=server />

    <br />
    <asp:Button ID="Button1" runat="server" Text="Button" ValidationGroup="Contact"  />

 

 

Thanks for your help, stay safe

Marc

Peter Milchev
Telerik team
 answered on 24 Dec 2020
2 answers
125 views
Hi,

I'm using  the following AccessDataSource

<asp:AccessDataSource ID="AccessDataSource2" runat="server" 
       EnableCaching="true"
       CacheDuration="300"
       DataFile="\\servername\myfile.mdb" 
       SelectCommand="SELECT `CustomerNo`, `Company`, `Attention`, `City`, `State` FROM `Customers`" >       
   </asp:AccessDataSource>

for
<telerik:RadComboBox ID="ddlCustomers" runat="server" 
                    Width="150px" Height="150px"
                    Skin="Vista"
                    DataSourceID = "AccessDataSource2"
                    DataTextField = "CustomerNo"                   
                    DataValueField = "CustomerNo"
                    DropDownWidth="410px"
                    EmptyMessage="Select a Customer"
                    EnableItemCaching="true"
                    EnableLoadOnDemand="true"
                    EnableVirtualScrolling="true"
                    HighlightTemplatedItems="true"
                    SelectedValue='<%# DataBinder.Eval(Container, "DataItem.CustomerName") %>'
                    AllowCustomText="true" 
                    OnSelectedIndexChanged="ddlCustomers_OnSelectedIndexChanged" AutoPostBack="True"
                    >
                      
                    <HeaderTemplate>
                        <table style="width: 400px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 100px;"> Customer No</td>
                                        <td style="width: 150px;">Company Name</td>
                                        <td style="width: 150px;">City</td>
                                    </tr>
                                    <tr>
                                        <td style="width: 100px;"></td>
                                        <td style="width: 150px;">Attention</td>
                                        <td style="width: 150px;">State</td>
                                    </tr>
                                </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table style="width: 400px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 100px;"><%# DataBinder.Eval(Container.DataItem, "CustomerNo")%></td>
                                        <td style="width: 150px;"><%# DataBinder.Eval(Container.DataItem, "Company")%></td>
                                        <td style="width: 150px;"><%# DataBinder.Eval(Container.DataItem, "City")%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 100px;"></td>
                                        <td style="width: 150px;"><%# DataBinder.Eval(Container.DataItem, "Attention")%></td>
                                        <td style="width: 150px;"><%# DataBinder.Eval(Container.DataItem, "State")%></td>
                                    </tr>
                                </table>
                    </ItemTemplate>
                </telerik:RadComboBox>

and if that Access file not open, then its fine otherwise I can received this error  "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Could not use ''; file already in use."  I can open this Access file fine without any error when other is opening it.

Thanks

Vinh Vu
Edward
Top achievements
Rank 1
Veteran
Iron
Iron
 answered on 24 Dec 2020
12 answers
192 views

I have data in English/French/Chinese in my database and I want to bind that data in RadComboBox. But I am getting Script error on postback in RadComboBox. 

.aspx page:

<telerik:RadComboBox ID="rcbCourses" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" EmptyMessage="       --Select Course--       "
                                Width="150" Localization-AllItemsCheckedString="All Courses selected" DropDownAutoWidth="Enabled" Filter="Contains" MarkFirstMatch="true" AutoCompleteSeparator="," AutoPostBack="false" >
                            </telerik:RadComboBox>

 

.aspx.cs page:

obj.BGetAllDetails(objBEAdmin);
{
                if (objBEAdmin.DtResult.Rows.Count > 0)
                {
                    rcbCourses.DataSource = objBEAdmin.DtResult;
                    rcbCourses.DataTextField = "CourseName";
                    rcbCourses.DataValueField = "CourseID";
                    rcbCourses.DataBind();
                }
                gvReports.DataSource = new object[] { };
                gvReports.DataBind();

}

 

I am getting below error:

Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3abc17b1ef-7a1b-49cb-a795-5f1c64597a53%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2013.1.403.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a128ef0a7-4d36-4e4e-8195-e785e5239856%3a16e4e7cd%3a874f8ea2%3af7645509%3a24ee1bba%3af46195d3%3a19620875%3a490a9d4e%3a2003d0b8%3a1e771326%3aaa288e2d%3a7165f74%3a58366029:6 Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: A generic error occurred in GDI+.

 

Please help. Thank You In Advance.

Peter Milchev
Telerik team
 answered on 24 Dec 2020
1 answer
233 views

How remove bottom border in Material skin? Or set all borders in RadDropDownTree using Material skin?

And how set RadDropDownTree Height (the combobox...)?

Doncho
Telerik team
 answered on 23 Dec 2020
10 answers
516 views
Hoping someone's got the answer to this.  It should be a one liner,but havent figured out how to do it or anywhere where it explains.

I'm creating raddock's programatically, having stored their states in the database.  When i load them, the ContentTemplate is also set in code and is a User Control (ascx).

I've set 

EnableEmbeddedSkins

="false"

I thought that might help me ovverride, but still missing the mark.

all I want is the horz and vert scrollbars to go away.  Doesnt seem to matter if my zone is wider or smaller.  with the same ascx it still always shows the scrollbars.

thanks!

n/a
Top achievements
Rank 1
Veteran
 answered on 22 Dec 2020
8 answers
452 views
I'm trying to update all items in a listview from a single place outside the listview. I've put my simplified code underneath, notice that clicking the button will update only the first item, even though the FireCommandEvent is called for both items in the list.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListViewIssue.aspx.cs"
    Inherits="RadGridSave.ListViewIssue" %>
 
<%@ Register Assembly="Telerik.Web.UI, Version=2011.1.413.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadListView ID="RadListView1" runat="server" AllowMultiItemEdit="true"
            onprerender="RadListView1_PreRender">
            <ItemTemplate>
                Readonly</ItemTemplate>
            <EditItemTemplate>
                Edit</EditItemTemplate>
        </telerik:RadListView>
    </div>
    <telerik:RadButton ID="RadButton1" runat="server" onclick="RadButton1_Click"
        Text="RadButton">
    </telerik:RadButton>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using Telerik.Web.UI;
 
namespace RadGridSave
{
    public partial class ListViewIssue : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RadListView1.DataSource = new List<int>() { 1, 2 };
        }
 
        protected void RadListView1_PreRender(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                foreach (RadListViewDataItem item in RadListView1.Items)
                {
                    item.Edit = true;
                }
                RadListView1.Rebind();
            }
        }
 
        protected void RadButton1_Click(object sender, EventArgs e)
        {
            foreach (var item in RadListView1.EditItems)
            {          
                item.FireCommandEvent(RadListView.UpdateCommandName, string.Empty);
            }
        }
    }
}
Allen
Top achievements
Rank 2
Iron
Veteran
 answered on 22 Dec 2020
1 answer
162 views
Would like check if it is possible to not allow user from selecting items from the list when it has already being selected?
Peter Milchev
Telerik team
 answered on 22 Dec 2020
0 answers
124 views

 

I have a Radmenu in my application and when I click the item I want to close the menu. Currently when I click the menu item stays open until I remove my mouse. But I want to close the menu when I click on the item. How can I achieve this? Below are some sample code I am trying to achieve but it is not working.

 

<telerik:RadMenu ID="Radtopmenu" runat="server" Width="100%" Height="32px" CssClass="radmenucss"
                        Duration="1" ClickToOpen="False" EnableRoundedCorners="true" EnableShadows="true"
                        OnClientItemClicked="hidechildmenuonclick">
</telerik:RadMenu>

 

<script type="text/javascript">
 
        function hidechildmenuonclick(sender, args) {
            //debugger;
            //return;
            if (args._item._children._array.length > 0) {
 
            } else {
                sender.close();
            }
        }
</script>

 

Syed
Top achievements
Rank 1
 asked on 22 Dec 2020
4 answers
223 views

Hi,

My wizard has 7 steps but after step 2, all other steps are optional.  Rather than having the user click Next 6 more times, I'd like to show the Finish button on Step2.  How do I go about this and How do you go about making tabs for optional steps (clickable) but not for the first 2 steps?  The closest thread I found is this: 

https://www.telerik.com/forums/display-next-previous-and-finish-button-in-all-radwizard-steps#SprpJ3GYo0Oy1IJxI8e_nw

but does not quite answer the question above.

Anoosh
Top achievements
Rank 1
 answered on 19 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?