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

I've got a regex control attached to a text box validating  a list of email addresses. When the set of email addresses is invalid a water mark appears in the textbox with a message 'Invalid email' displaying in black font.  It should be red font, but it looks like the radInput_error_default event is not being triggered and associated with the css that displays red font.  The css that is being used is the '.RadInputMgr_Default' with a color = black.  Below is the code for a sample application that does work.  Note the ajax toolkit script manager is being used.  

Can you shed any insight into this problem?

Peter

Not working application(abbreviated)
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Masters/FullMaster.master"
    CodeBehind="Edit.aspx.cs" Inherits="main.Prospect.Edit" Title="Edit Prospect"
    Buffer="true" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">    
    <ajax:ToolkitScriptManager runat="server" ID="ScriptManager" OnAsyncPostBackError="ScriptManagerAsyncPostBackError"
        AllowCustomErrorsRedirect="true">
    </ajax:ToolkitScriptManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server">
        <TargetControls>
            <telerik:TargetControl ControlsToApplySkin="RadGrid" Skin="Metrolist" />
        </TargetControls>
    </telerik:RadSkinManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" EnableEmbeddedSkins="false" runat="server"
        DecoratedControls="CheckBoxes" Skin="Metrolist" />
    <div id="prospectContainer">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="700px">                
            <table class="prospect">                            
                <tr class="LineTop">
                    <td class="controls">
                        <table>
                            <tr>
                                <td>
                                    <asp:TextBox ID="EmailTextbox" runat="server" Width="300px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                                                   
            </table> 
            <telerik:RadInputManager ID="RadInputManager1" runat="server" OnValidating="RadInputManagerValidating"
                EnableViewState="false"  >
                <telerik:RegExpTextBoxSetting BehaviorID="EditEmailTextBoxBehavior" IsRequiredFields="true" 
                    ValidationExpression="^([\w+-.%]+@[\w-.]+\.[A-Za-z]{2,4},? ?)+$" ErrorMessage="Incorrect email format">
                    <TargetControls>
                        <telerik:TargetInput ControlID="EmailTextbox" />
                    </TargetControls>
                    <Validation IsRequired="true" ValidationGroup="EditProspectInfoValidationGroup" ValidateOnEvent="Submit" />
                </telerik:RegExpTextBoxSetting>               
            </telerik:RadInputManager>
        </telerik:RadAjaxPanel>
    </div>   
</asp:Content>


Working application:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Test.WebForm1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>


</head>
<body>
    <form id="form1" runat="server">
    <ajax:ToolkitScriptManager runat="server" ID="ScriptManager"         AllowCustomErrorsRedirect="true">
    </ajax:ToolkitScriptManager>
    <div>
        <asp:TextBox ID="EmailTextbox" runat="server" Width="300px"></asp:TextBox>
    </div>
      <%--<telerik:RadScriptManager runat="server" ID="RadScriptManager1">        
        <CdnSettings TelerikCdn="Enabled" />
        <Scripts>
            <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                Name="MicrosoftAjax.js" Path="http://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js" />
        </Scripts>
    </telerik:RadScriptManager>--%>
    <telerik:RadInputManager ID="RadInputManager1" runat="server" EnableViewState="false"  >
           <telerik:RegExpTextBoxSetting BehaviorID="EditEmailTextBoxBehavior" IsRequiredFields="true" 
                    ValidationExpression="^([\w+-.%]+@[\w-.]+\.[A-Za-z]{2,4},? ?)+$" ErrorMessage="Incorrect email format">
                    <TargetControls>
                        <telerik:TargetInput ControlID="EmailTextbox" />
                    </TargetControls>
                    <Validation IsRequired="true" ValidationGroup="EditProspectInfoValidationGroup" ValidateOnEvent="Submit" />
                </telerik:RegExpTextBoxSetting>
    </telerik:RadInputManager>
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
    </form>
</body>
</html>
Vasil
Telerik team
 answered on 14 Nov 2011
3 answers
88 views
Greetings

I'm part of a project that has up until now worked with the July release of RadControls.
I've always had issues with seeing the RadDesigner components in design view but since
I've always been part of the backend I've paid it no mind.

Now however, I installed the latest version of radcontrols (Sept SP2 release I believe)
and I need to see the components in design view to do some fixes. However, I now get
a version error due to the fact (I assume) its trying to load version "2011.2.712.40"
while I just installed version "2011.2.915.40".

Since we do like to use the latest version of the third party components we use its in the
projects best interest to migrate as soon as possible to the latest version (also for me to
do my job).

The project is TFS based as usual with normal check in policies.

How do you suggest we go about solving this issue?

Thank you for your time,

Anders
Chavdar Dimitrov
Telerik team
 answered on 14 Nov 2011
5 answers
181 views
I get this error message:

 There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.

If I do:
Select sr => it works
Select sr, s.SessionNo => it does not work

If I use Anonymous types, it doesn't work at all

Link Query:
                           Dim query = From sr In db.SessionReps
                            From s In db.Sessions Where s.ID = sr.RepID And sr.RepID = repID
                            From g In db.Groups Where g.ID = s.GroupID
                            From p In db.Programs Where p.ID = g.ProgramID
                            Select New With {.ProgramName = p.Name, .GroupName = g.Name, sr.Active, sr.Attended, sr.DropOutDate, sr.ConfirmDate, sr.SessionID, s.Name, s.SessionNo, s.StartDate, s.EndDate}

                grdSessionReps.DataSource = query.ToList()  => datasource is correct.
                grdSessionReps.DataBind()    ***** ERROR here!!!


ASCX file:

        <Columns>
            <telerik:GridBoundColumn DataField="ProgramName" HeaderText="Program Name" UniqueName="ProgramName"
                ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="GroupName" HeaderText="Group Name" UniqueName="GroupName"
                ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="Active" HeaderText="Active" ItemStyle-Width="50"
                DefaultInsertValue="true" UniqueName="Active" ReadOnly="True">
                <ItemStyle Width="50px"></ItemStyle>
            </telerik:GridCheckBoxColumn>
            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="SessionNo" HeaderText="Session No" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn DataField="StartDate" HeaderText="Start Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" UniqueName="StartDate" ReadOnly="True">
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn DataField="EndDate" HeaderText="End Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" UniqueName="EndDate" ReadOnly="True">
            </telerik:GridDateTimeColumn>
            <telerik:GridCheckBoxColumn DataField="Attended" HeaderText="Attended" ItemStyle-Width="50"
                DefaultInsertValue="true" UniqueName="Active" ReadOnly="True">
                <ItemStyle Width="50px"></ItemStyle>
            </telerik:GridCheckBoxColumn>
            <telerik:GridDateTimeColumn DataField="DropOutDate" HeaderText="DropOut Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" ReadOnly="True" UniqueName="DropOutDate">
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn DataField="ConfirmDate" HeaderText="Confirm Date" ItemStyle-Width="150"
                PickerType="DateTimePicker" ReadOnly="True" UniqueName="ConfirmDate">
            </telerik:GridDateTimeColumn>
        </Columns>
Veli
Telerik team
 answered on 14 Nov 2011
1 answer
278 views
How do I change the max file size allowed by the image editor that is part of the RadEditor?
I tried setting ImageManager-MaxFileUploadSize attribute of the RadEditor itself.
I tried using the ImageManager inner node of the RadEditor:

<telerik:RadEditor ID="RadEditor1" Runat="server" Width="100px" Height="100px" 
EditModes="Design" EnableResize="False" EnableViewState="False" ImageManager-MaxUploadFileSize="1024000" 
ForeColor="Black" ContentAreaCssFile="~/Styles/RadEditor.css">
    <Tools>
     	...
    </Tools>
    <Content></Content>
    <MediaManager MaxUploadFileSize="10240000" />
    <ImageManager MaxUploadFileSize="10240000" />
</telerik:RadEditor>


Nothing I do seems to be working.  It always says max size is 200K.  Any ideas?
Rumen
Telerik team
 answered on 14 Nov 2011
7 answers
857 views
Hi,

I'm not sure why can but I can't seem to retrieve the value of my DateKey which I've specified on my Grid.

Here is the markup where is specify the DataKeyNames="Id":
<telerik:RadGrid ID="grdCurrentNettpayDatails" runat="server" CellSpacing="0" GridLines="None"
                        AutoGenerateColumns="False" Skin="Windows7" AutoGenerateHierarchy="True" AllowPaging="True"
                        OnUpdateCommand="grdCurrentNettpayDetails_UpdateCommand" PageSize="15" OnNeedDataSource="grdDetails_NeedDataSource"
                        OnDetailTableDataBind="grdDetails_DetailTableDataBind">
                        <MasterTableView HierarchyDefaultExpanded="false" DataKeyNames="Id" NoDetailRecordsText="No payment records found.">

Not sure if this really matters, but I don't specify the DataSourceID on the grid. Instead I set the datasource and bind the grid as follows:
grdDatails.DataSource = myDataSet;
grdDatails.DataBind();

I also set up the detail table like this:
protected void grdDetails_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
        {
            var proxy = new MySDomainServicesoapClient();
 
            var list= new List<Record>();
 
            foreach (GridDataItem dataItem in grdCurrentNettpay.MasterTableView.Items)
            {
                var checkBox = (dataItem.FindControl("CheckBox1") as CheckBox);
 
                if (checkBox != null && checkBox.Checked)
                {
                    var recordId = new Guid(dataItem["Id"].Text);
 
                    var record = proxy.GetRecrordsById(recordId).RootResults.SingleOrDefault();
 
                    list.Add(record);
                }
            }
 
            proxy.Close();
 
            var xmlDoc =
                XmlHelper.GetStructuredXmlForRecords(
                    list);
 
            var myDataSet= XmlHelper.GetHierarchicalDsFromXml(xmlDoc);
 
            string parentItemId = e.DetailTableView.ParentItem["Id"].Text;
 
            ((RadGrid)sender).DataSource = myDataSet.Tables[1].Select("RecordId= " + "'" + parentItemId + "'");
        }

Finally, I try to access the DataKey value ("Id") from the edit form on Update:
protected void grdDetails_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            GridEditableItem gridEditFormItem = (GridEditableItem)e.Item;
 
            var id= new Guid(gridEditFormItem.GetDataKeyValue("Id").ToString()); // Give me null!
       }

Could it be due to how I bind the grid instread of specifying the DataSourceID on the grid? I'm not actually sure what else to try? I really appreciate your help.

Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Nov 2011
2 answers
94 views
I need to collect data from below webiste.  (date and closing price from table) .
their is execl option but i want to do it automatically. I have parser those run on daily basic and  collect data.
to collect data from that excel i need to save that excel  manually  on my local machine which is not the solution. :(

i right click on webpage and view source it but still it is not showing data which i want to collect.

How i will got it .. :(

http://www.nasdaqomxnordic.com/shares/Historical_prices/?Instrument=SSE4928

Is their any telerik control or something.. so i can read data from this lnk.
Mugdha Aditya
Top achievements
Rank 1
 answered on 14 Nov 2011
4 answers
212 views

I am using RadMenu & RadButton control in an application and I have customized the Radmenu with
www.stylebuilder.telerik.com
the problem is when radmenu child items are expand then another radmenu and radbutton is overlapped.

Please see the screenshot.

Md.Abdullah
Top achievements
Rank 1
 answered on 14 Nov 2011
2 answers
113 views
Hello

I am a Sharepoint developer working with Telerik 2010. I would like to know if there is any possibility to have space between the FilterMenu items such as EqualTo, EndsWith etc as Equal To, Ends With etc respectively.

Thanks in advance
Jiju John.
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Nov 2011
2 answers
82 views
Hello All,

My grid has skin windows7 and the grid has a lot of template columns. On selection of a row, the highlighted row has underline below the template column data due to Border-Bottom-Style: solid; I want to remove this style so that the underline disappears on selection of a row.


I applied the following style on the form with the grid to override the style but it doesn't work.. Can you please help me?

 .RadGrid_Windows7 .rgRow td, .RadGrid_Windows7 .rgAltRow td, .RadGrid_Windows7 .rgEditRow td, .RadGrid_Windows7 .rgFooter td
        {
            border-bottom-style: none;
            border-bottom-width:0px;
        }
Effat
Top achievements
Rank 1
 answered on 14 Nov 2011
5 answers
155 views
i have a RadEditor which contains text and image as its content,when exporting to word it displays onlt text but no image.suggest a solution for this issue
Rumen
Telerik team
 answered on 14 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?