Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
70 views
I've got a control based on the RadTextbox.

My control has a IsMandatory property and I'm doing something like this in the control...
protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);
    if (isMandatory)
    {
        RadTextBox1.EnabledStyle.BackColor = System.Drawing.Color.Pink;
    }
}
This works a treat.

Except when the skin is Black. The black skin renders an image in the background of the textbox.

I need to supress this when my input control has IsMandatory = true

--
Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 19 Dec 2011
1 answer
165 views
In JavaScript, if I have a handler for the double click event of a row (for example), and that event fires on a row in a detail table, how would I access the client data key of the parent row?  So something like this:

function RowDoubleClick(sender, eventArgs) {
    var tableName = eventArgs.get_tableView().get_name();
    if (tableName == "Master") {
        var masterRowId = eventArgs.getDataKeyValue("Id");
    }
    else {
        var detailRowId = eventArgs.getDataKeyValue("Id");
        var parentRowId = // This needs to be the key associated with the detail table from the parent table.
    }
}
Doug
Top achievements
Rank 1
 answered on 19 Dec 2011
1 answer
150 views
Hi,

I have a scenario where I need to write a code behind for Radbutton clicks placed in a radgrid  for  inserting and updating data...

please let me know if you have any samples on this.i have the below link which is not at all working for me...

i have Telerik.Web.UI.dll..

I am getting error for not having telerik.webcontrols dll.. 

Please advise..

thanks

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/insert-update-server-side.aspx#1918160 
Sebastian
Telerik team
 answered on 19 Dec 2011
1 answer
45 views
Hi

I am having a nightmare with a combobox width in Firefox (all versions) but not in IE7/8/9, Chrome, or Opera.
Attached are 2 images showing the problems, here is the code:

<%

 

@ Control Language="C#" AutoEventWireup="true" CodeBehind="TelerikTradeSelectionControl.ascx.cs" Inherits="GalileoAdmin.Resources.Controls.Tradesman.TelerikTradeSelectionControl" %>

 

<%

 

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<%

 

--<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all" Skin="Web20"></telerik:RadFormDecorator>--%>

 

<

 

 

asp:UpdatePanel ID="pnlUpdate" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">

 

 

 

<ContentTemplate>

 

 

 

<label for="test">

 

 

 

<span class="redtext">*</span> Your MAIN trade</label>

 

 

 

<div class="info">

 

 

 

&nbsp;</div>

 

 

 

<telerik:RadComboBox ID="cmbMainTrade" Width="242px" runat="server" Filter="Contains" Skin="WebBlue" AutoPostBack="True" CssClass="qqdd"

 

 

 

OnSelectedIndexChanged="cmbMainTrade_SelectedIndexChanged" DropDownWidth="242px" style="padding-bottom:7px;" >

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

</telerik:RadComboBox>

 

 

 

<div style="clear: both;">

 

 

 

</div>

 

 

 

<label for="test">

 

Additional trade (if needed)

 

</label>

 

 

 

<div class="info">

 

 

 

&nbsp;</div>

 

 

 

<telerik:RadComboBox ID="cmbSecondaryTrade" Width="242px" AllowCustomText="true" EmptyMessage="Select a Trade" runat="server"

 

 

 

Filter="Contains" Skin="WebBlue" AutoPostBack="True" OnSelectedIndexChanged="cmbSecondaryTrade_SelectedIndexChanged">

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

</telerik:RadComboBox>

 

 

 

</ContentTemplate>

 

</

 

 

asp:UpdatePanel>
and

 

 

 

private void BindPrimaryTradeSelection()

 

{

 

 

//bind the combobox

 

 

 

 

 

cmbMainTrade.DataSource = GetTrades(

 

true);

 

cmbMainTrade.DataTextField =

 

"Name";

 

cmbMainTrade.DataValueField =

 

"Name";

 

cmbMainTrade.DataBind();

 

 

if (cmbMainTrade.Text == String.Empty)

 

{

 

 

RadComboBoxItem item = new RadComboBoxItem();

 

item.Text =

 

"Click to select a trade";

 

item.Value =

 

"";

 

item.Selected =

 

true;

 

item.Enabled =

 

false;

 

item.Visible =

 

false;

 

cmbMainTrade.Items.Add(item);

}

}

 

 

private void BindSecondaryTradeSelection()

 

{

 

 

//bind the combo box

 

 

 

 

 

cmbSecondaryTrade.DataSource = GetTrades(

 

false);

 

cmbSecondaryTrade.DataTextField =

 

"Name";

 

cmbSecondaryTrade.DataValueField =

 

"Name";

 

cmbSecondaryTrade.DataBind();

 

 

if (cmbSecondaryTrade.Text == String.Empty)

 

{

 

 

RadComboBoxItem item = new RadComboBoxItem();

 

item.Text =

 

"Click to select a trade";

 

item.Value =

 

"";

 

item.Selected =

 

true;

 

item.Enabled =

 

false;

 

item.Visible =

 

false;

 

cmbSecondaryTrade.Items.Add(item);

}

}

The other dropdowns on the page are standard HTML dropdowns.
Please point me in the right direction
Thanks
Dave

Dave
Top achievements
Rank 1
 answered on 19 Dec 2011
1 answer
374 views
Not sure what I'm doing wrong.  I have an operation (initiated from a GridButtonItem click) that occurs inside an async postback.  Depending on the results of the operation I need to update image and label controls hosted in a RadWindow, display the RadWindow, wait for the user to click a button, determine the button that was clicked and continue with the operation.

For the life of me I can't get the RadWindow to open with generating an exception.  I've stripped out the RadGrid and simplified the code to try to find the problem but alas, no joy.

My aspx looks like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZZRadWindow.aspx.cs" Inherits="SitefinityWebApp.ZZRadWindow" %>
 
<!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>
    <script>
 
        function OpenWindow()
        {
            var wndMgr = GetRadWindowManager();
            wndMgr.open("", "ConfirmPlaybackWindow");
            return false;
        }
         
    </script>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager runat="server" ID="ScriptMgr" />
        <asp:UpdatePanel ID="WindowUpdatePnl" runat="server">
            <ContentTemplate>
            <asp:Label ID="msgLbl" runat="server" />
                <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server" Skin="Forest" EnableShadow="true" Font-Bold="False" Modal="True">
                    <Windows>
                        <telerik:RadWindow ID="ConfirmPlaybackWindow" runat="server" DestroyOnClose="False" Skin="Forest" Modal="True">
                            <ContentTemplate>
                                <div class="confirmationDlgWrp">
                                    <div class="alertWrp">
                                        <asp:Image ID="AlertImg" runat="server" CssClass="dlgIcon" />
                                        <asp:Label ID="AlertLbl" runat="server" CssClass="dlgLabel" Text="Hello World" />
                                    </div>
                                    <div class="confirmationDlgBtnWrp">
                                        <asp:Button ID="YesBtn" runat="server" CssClass="dlgYesBtn" Text="Yes" />
                                        <asp:Button ID="NoBtn" runat="server" CssClass="dlgNoBtn" Text="No" />
                                    </div>
                                </div>
                            </ContentTemplate>
                        </telerik:RadWindow>
                    </Windows>
                </telerik:RadWindowManager>
                <asp:Button ID="PostBackButton" runat="server" Text="Do Postback" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <p />
        <asp:Button ID="Button1" runat="server" OnClientClick="return OpenWindow()" Text="Open RadWindow" />
    </div>
    </form>
</body>
</html>

And my codebehind looks like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace SitefinityWebApp
{
    public partial class ZZRadWindow : System.Web.UI.Page
    {
        private static int PostBackCount = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                msgLbl.Text = string.Format("{0}<p/>PostBackCount: {1}", msgLbl.Text, ++PostBackCount);
                string script2 = "<script type=\"text/javascript\">OpenWindow();</script>";
                ScriptManager.RegisterStartupScript(WindowUpdatePnl, typeof(string), "OpenWindow", script2, false);
            }
        }
    }
}


Clicking the button located outside the UpdatePanel result in the RadWindow displaying without error.  Clicking the postback button located inside the UpdatePanel results in the following exception:

Microsoft JScript runtime error: Sys.InvalidOperationException: Can't be called after dispose

Any idea what I'm doing wrong here?

Thanks -- Steve 
Marin Bratanov
Telerik team
 answered on 19 Dec 2011
8 answers
231 views
Alright...every time I drag an "old" telerik control that uses version 2009.3.1314.20 of the .dll, it overwrites the newer version of 2009.3.1314.35. As a result, it gives me the following error:

"Could not load file or assembly "Telerik.Web.UI, Version=2009.3.1314.35...or one of its dependencies.  The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

 I have tried for two days to figure out how to fix this, or to stop this incessant overwriting, but I have been unable to do so.  Worse still, I am now at least 2 days behind on my project, and my supervisors are wondering if we shouldn't just go back to the 'old' tools we had instead of using Telerik, because this looks like (at least, it does to them) that Telerik has some serious stability issues to address.  I can't say I disagree....

The second problem is an error that says:

"Cannot create an object of type 'System.String[]' from its string representation 'KeyField' for the 'DataKeyNames' property."

This error is especially infuriating because I have the EXACT SAME CODE on another page....and it WORKS!  I have no idea what the problem is, or how to fix this.  Attached is a screenshot (cropped) of the errors in question.  I really need some help here before I throw my monitor out the nearest window!
Lini
Telerik team
 answered on 19 Dec 2011
4 answers
141 views

I am using the RadProgressArea;  the cancel button displays but does not work on Safari. Also the TotalProgressPercent indicator does not dispay.

I have the newest version of Rad. I am using Safari 3.0.3 on a Vista Box.

<telerik:RadProgressManager ID="RadProgressManager1" runat="server" /> 
<telerik:RadProgressArea ID="RadProgressArea2" runat="server" DisplayCancelButton="True" ProgressIndicators="TotalProgressBar, TotalProgressPercent, TimeElapsed, TimeEstimated" Skin="Black">  
    <Localization Uploaded="Uploaded" /> 
</telerik:RadProgressArea> 
 
Dimitar Terziev
Telerik team
 answered on 19 Dec 2011
1 answer
539 views
I just tried creating a skin with the Style Builder and it is not including the SPELL.xxx.css file needed. Can we get the Spelling component added?   

The DIALOG css contains an import for the Spell.xxx.css
Bozhidar
Telerik team
 answered on 19 Dec 2011
1 answer
260 views
There is a known problem with maxJsonLength property:

http://support.microsoft.com/kb/981884

However, this hotfix did not work. Maybe because it is for the MS UpdatePanel?

If so, how can this be resolved? This error comes up when grid tries to pull too many rows.

-Stan

Veli
Telerik team
 answered on 19 Dec 2011
1 answer
171 views
I am having problem to display the contents within the form template. I have the following in my rad grid :-

<EditFormSettings EditFormType="Template">
                <FormTemplate>
                    <table id="1" width="100%" border="0" cellpadding="0" cellspacing="10">
                        <tr>
                            <td colspan="3">
                                <span class="des"><asp:Label ID="lblDestination" runat="server" Text='<%# Eval("Destination") %>' /></span>
                            </td>
                        </tr>
..

and I would like to hide the table row based on the DataTable binding. May I know is there any good way of doing this?
Shinu
Top achievements
Rank 2
 answered on 19 Dec 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?