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

I have a user control that includes a button. When button is clicked, I want to show a radalert if some condition is satisfied. How can I  do this? I've tried the scenarios at the Calling radalert from codebehind (all versions of RadWindow knowledgebase http://www.telerik.com/support/kb/article/b454K-gtd-b454T-cec-b454c-cec.aspx ...But the radalert isnt displayed.

Thanks.
Aydın Kara
Top achievements
Rank 1
 answered on 09 Oct 2008
1 answer
130 views
Here is our environment info: 
.NET framework - 2.0
IDE: VS 2005
Server: Windows Server 2003
Browser: IE 7
Language: C#
Teleric Product: Rad Window 1.9.0

We have around 12 ASP.NET applications running in the web server and we have a requirement to insert a particular text in all the web pages, say for eg. 'Test Server' in red color in our test environment. Since it's not possible to add this manually in all the applications, we decided to write an http module that can insert the text right after the <form> tag. It did worked and we see the text, but we get multiple javascript errors. If we unregister the http module, we don't see any javascript errors. All that the http module does is insert the following html tag after the <form> tag.

<span id='testserver' style="position:absolute; top: 30px; left: 300px; color: red; font-weight: bold; font-size:12pt; z-index:2;">Test Server </span>

We also changed it to div and label tags, but it didn't work.

These are the following javascript errors that we see:

1. 'Sys' is undefined.
2. 'RadControlsNamespace' is undefined.
3. Object exected.

The Http Compression is not enabled in IIS and the 'Check that file exists' checkbox in IIS->VirtualDirectory->.axd edit is checked. 

Any help is appreciated.
Thanks.
Blaize
Top achievements
Rank 1
 answered on 09 Oct 2008
1 answer
125 views
hi,

can i enable full screen mode in the lite version of radeditor for moss?

thanks

kulo
Rumen
Telerik team
 answered on 09 Oct 2008
1 answer
328 views

Hi,

 I have one problem when validating controls in client side, Suppose i have four controls in formtemplate in radgrid control..
If anyone checked the checkbox that is also exist in the radgrid control i have to apply the validation on other controls that is also exist in the raddgrid control.

Please give me the solution how to validate the controls value at client side while one of control has favourable value, otherwise do not apply the validation.

In my form CheckBox like ::
<asp:CheckBox id="CheckBoxIsActive" TabIndex="21" runat="server" Width="150px" Text="Active User"></asp:CheckBox>
if this check box is checked
than i have to validate the following controls

 

asp

:TextBox id="TextBoxUser_Name" TabIndex="18" MaxLength ="256" runat="server" Width="150px"></asp:TextBox>

 

 

 

<

asp:RequiredFieldValidator ID="RequiredFieldValidatorUserName" Display="None" ValidationGroup="Check" runat="server" ControlToValidate="TextBoxUser_Name"

 

 

 

 

ErrorMessage="Please enter user name" ></asp:RequiredFieldValidator>

Kindly give me the solution how to validate the control if checkbox is valid.







 

<

telerik:RadGrid ID="rgStaffPersonDetails" GridLines="None" EnableAJAX="True" runat="server" Skin ="WebBlue" width="100%"

 

 

 

 

AutoGenerateDeleteColumn ="True" AutoGenerateEditColumn ="True" AutoGenerateColumns="false"

 

 

OnItemCommand="rgStaffPersonDetails_ItemCommand" OnItemDataBound="rgStaffPersonDetails_ItemDataBound" OnInit="rgStaffPersonDetails_Init"

 

 

OnInsertCommand="rgStaffPersonDetails_InsertCommand" OnUpdateCommand="rgStaffPersonDetails_UpdateCommand" OnItemCreated="rgStaffPersonDetails_ItemCreated" >

 

 

 

 

<PagerStyle Mode="NumericPages"></PagerStyle>

 

 

 

 

<MasterTableView CommandItemDisplay= "Top" DataKeyNames="Staff_Per_ID" >

 

<

Columns >

 

 

 

 

<telerik:GridBoundColumn DataField="Staff_Per_ID" Visible="False" DataType="System.Int32" HeaderText="Per_ID"

 

 

 

 

SortExpression="Per_ID" UniqueName="Per_ID">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Person Name" UniqueName="StaffName">

 

<

ItemTemplate>

 

 

 

 

<asp:Label ID="lblStaffName" runat="server" Text='<%# Eval("Staff_Per_IDSource.Per_FirstName")+" "+Eval("Staff_Per_IDSource.Per_MiddleName")+" "+Eval("Staff_Per_IDSource.Per_LastName")%>'></asp:Label>

 

 

 

 

 

 

</

ItemTemplate>

 

</

telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridTemplateColumn UniqueName="Per_HomePhone" HeaderText="Home Phone">

 

<

ItemTemplate>

 

 

<asp:Label ID="lblPer_CellPhone" runat="server" Text='<%# (Eval("Staff_Per_IDSource.Per_HomePhone") == "") ? "N/A" : String.Format("{0:(###) ###-####}", Eval("Staff_Per_IDSource.Per_HomePhone"))%>'></asp:Label>

 

</

ItemTemplate>

 

</

telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn UniqueName="Per_WorkPhone" HeaderText="Work Phone">

 

<

ItemTemplate>

 

 

<asp:Label ID="lblworkphone" runat="server" Text='<%# (Eval("Staff_Per_IDSource.Per_WorkPhone") == "") ? "N/A" : String.Format("{0:(###) ###-####}", Eval("Staff_Per_IDSource.Per_WorkPhone"))%>'></asp:Label>

 

</

ItemTemplate>

 

</

telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn UniqueName="Per_CellPhone" HeaderText="Cell Phone">

 

<

ItemTemplate>

 

 

<asp:Label ID="lblCellphone" runat="server" Text='<%# (Eval("Staff_Per_IDSource.Per_CellPhone") == "") ? "N/A" : String.Format("{0:(###) ###-####}", Eval("Staff_Per_IDSource.Per_CellPhone"))%>'></asp:Label>

 

 

 

 

 

 

</

ItemTemplate>

 

</

telerik:GridTemplateColumn>

 

 

<telerik:gridtemplatecolumn UniqueName="username" HeaderText="User Name">

 

<

itemtemplate>

 

 

 

 

<asp:label id="lblusername" runat="server" text='<%# Eval("Staff_User_IDSource.UserName") %>'></asp:label>

 

 

 

 

 

 

</

itemtemplate>

 

</

telerik:gridtemplatecolumn>

 

 

 

</

Columns>

 

 

 

 

 

<ExpandCollapseColumn Resizable="False" Visible="False">

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

</ExpandCollapseColumn>

 

 

 

 

<EditFormSettings EditFormType="Template">

 

 

 

 

<PopUpSettings ScrollBars="None" />

 

 

<FormTemplate >

 

 

 

 

<table id="Table2" cellspacing="2" cellpadding="1" width="70%" border="1" rules="none"

 

 

 

 

style="BORDER-COLLAPSE: collapse">

 

 

 

 

<tr class="EditFormHeader">

 

 

 

 

<td colspan="2"><b>Staff Person Detail</b></td>

 

 

 

 

</tr>

 

 

<tr>

 

 

 

 

<td>

 

 

 

 

<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">

 

 

 

 

<tr>

 

 

 

 

<td align ="right" style="width: 15%;">First Name:</td>

 

 

 

 

<td style=" width: 15%;"> <telerik:RadTextBox id="TextBoxFirst_Name" MaxLength ="40" TabIndex="1" Width="150px" runat="server" >

 

 

 

 

</telerik:RadTextBox><asp:RequiredFieldValidator ID="RequiredFieldValidatorFirst_Name" runat="server" Display="None" ValidationGroup="Check" ControlToValidate="TextBoxFirst_Name"

 

 

 

 

ErrorMessage="Please enter first name" ></asp:RequiredFieldValidator>

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

<td align ="right" style="width: 15%;" valign="middle">UserName:

 

 

</td>

 

 

 

 

<td style="width: 15%;" valign="middle"><asp:TextBox id="TextBoxUser_Name" TabIndex="18" MaxLength ="256" runat="server" Width="150px"

 

 

 

 

></asp:TextBox>

 

 

 

 

</td>

 

 

 

 

<td align ="right" style="width: 15%;" valign="middle">Password:

 

 

</td>

 

 

 

 

<td style="width: 20%;" valign="middle"><opp:PasswordTextBox id="TextBoxPassword" runat="server" TabIndex="19" />&nbsp;

 

 

 

 

</td>

 

 

 

 

<td align ="right" style="width: 20%;" valign="middle">

 

 

 

Re-Enter:

&nbsp;

 

 

 

 

</td>

 

 

 

 

<td style="width: 20%;" valign="middle"><opp:PasswordTextBox id="TextBoxRePassword" runat="server" TabIndex="20" />&nbsp; &nbsp;

 

 

 

 

</td>

 

 

 

 

</tr>

 

 

 

 

<tr>

 

 

 

 

<td align="right" style="width: 15%; height: 25px;" valign="top">

 

 

 

 

</td>

 

 

 

 

<td style="width: 15%; height: 25px;" valign="top">

 

 

 

 

<asp:CheckBox id="CheckBoxIsActive" TabIndex="21" runat="server" Width="150px" Text="Active User"></asp:CheckBox></td>

 

 

 

 

<td align="right" style="width: 15%; height: 25px;" valign="top">

 

 

 

 

</td>

 

 

 

 

<td style="width: 20%; height: 25px;" valign="top">

 

 

 

 

</td>

 

 

 

 

<td align="right" style="width: 20%; height: 25px;" valign="top">

 

 

 

 

</td>

 

 

 

 

<td style="width: 20%; height: 25px;" valign="top">

 

 

 

 

<asp:RequiredFieldValidator ID="ReqTextBoxRePassword" runat="server" ControlToValidate="TextBoxRePassword" ValidationGroup="Check" Display="None" ErrorMessage="Please Re-Enter Password"></asp:RequiredFieldValidator></td>

 

 

 

 

</tr>

 

 

 

 

<tr>

 

 

 

 

<td align ="right" style="width: 15%;">

 

 

 

 

</td>

 

 

 

 

<td style="width: 15%;">

 

 

 

 

 

<asp:RequiredFieldValidator ID="RequiredFieldValidatorUserName" Display="None" ValidationGroup="Check" runat="server" ControlToValidate="TextBoxUser_Name"

 

 

 

 

ErrorMessage="Please enter user name" ></asp:RequiredFieldValidator></td>

 

 

<td align="left" colspan="2"><asp:ValidationSummary ID="ValidationSummary2" runat="server" ValidationGroup="Check" DisplayMode ="BulletList" Width="100%" />

 

 

<asp:CompareValidator ID="CompareValidatorPassword" runat="server"

 

 

 

 

ErrorMessage="Please enter same password" ValidationGroup="Check" ControlToCompare="TextBoxPassword" ControlToValidate="TextBoxRePassword" Display="None"></asp:CompareValidator>

 

 

 

 

<asp:RequiredFieldValidator ID="ReqTextBoxPassword" ControlToValidate="TextBoxPassword" ValidationGroup="Check" runat="server" Display="None" ErrorMessage="Please enter Password"></asp:RequiredFieldValidator></td>

 

 

 

 

</tr>

 

 

 

 

</table>

 

 

 

 

</td>

 

 

 

 

</tr>

 

 

<tr>

 

 

 

 

<td align="right" colspan="2"><asp:Button id="cmdButton" ValidationGroup="Check" runat="server" Text='Update' TabIndex="23" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'>

 

 

 

 

</asp:Button></td><td><asp:Button id="btnCancel" runat="server" Text="Cancel" TabIndex="24" CausesValidation="False" CommandName="Cancel">

 

 

 

 

</asp:Button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

 

 

 

 

</tr>

 

</

table>

 

 

</FormTemplate>

 

 

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

 

 

</EditColumn>

 

 

 

 

</EditFormSettings>

 

 

 

 

<RowIndicatorColumn Visible="False">

 

 

 

 

<HeaderStyle Width="20px" />

 

 

 

 

</RowIndicatorColumn>

 

</

MasterTableView>

 

 

</telerik:RadGrid>

 

 


Please give me the solutuion either javascript ofr any other way, Actually i am using this grid in the usercontrol that's what i am unable to get the control's Id at runtime as matched.
 

Sebastian
Telerik team
 answered on 09 Oct 2008
1 answer
86 views
Hello all,

I have been working on this for a day or so now and can't seem to resolve the problem.  So I am coming to the experts. :)  I have just recently purchased the Rad controls and I am loving them.  But as I was trying to use the RadGrid from the ASP.NET, I have run into a snag.  I wanted to use the Client-Side select to update another grid from the server side.  So I did what I thought was right and used some javascript and did a __doPostBack(), but kept getting an error.  So I searched and searched and finally found a knowledge base article that explains how to do it (see PostBackFromClientEventsCS.zip at bottom of http://www.telerik.com/support/kb/article/b454K-kGj-b454T-cfD.aspx).  I had to massage this a little to work with the 3.5 frame work and the new namespaces, but the everything else should be the same.  Anyway, when I run this, I get the same error as I do on my website:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Configuration:
VS2008
telerik.web.ui.dll version 2008.2.826.35
.NET 3.5

I will gladly fwd an updated version of the sample website if someone could please look into this.

Thanks in advance,
Lee
Daniel
Telerik team
 answered on 09 Oct 2008
1 answer
215 views

Hi!

I'll get right to the point. I'm having problems with the ToolTip Manager. I have a RadGrid and to every label in one of the rows of the grid I add a tooltip (which loads on demand). What happens is I move the cursor over a label and the tooltip shows as expected. I click on whatever button on my page which generates a postback. Once again I move the cursor over a tooltip which again opens with no problem...and then.. my problem starts. In the next step if I click on whatever button or move the cursor over another label in order to show the tooltip, I get the following asp.net error:

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  (...)

here is the code of the relevant methods:

 protected void Page_Load(object sender, EventArgs e) 
    { 
            (...) 
 
            RadToolTipManager1.TargetControls.Clear(); 
            if (!IsPostBack) 
            { 
                LoadData(Convert.ToString(ViewState["type"]), !IsPostBack); 
            } 
 
            (...) 
    } 
 
    private void LoadData(string type, bool withBind) 
    { 
        gridObjects.DataSource = mmObject.getDTObjectList(xxx, yyy); 
        if (withBind) 
        { 
            gridObjects.DataBind(); 
        } 
    } 
 
    protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) 
    { 
        string value = Convert.ToString(args.Value); 
        this.UpdateToolTip(value, args.UpdatePanel); 
    } 
 
    private void UpdateToolTip(string filename, UpdatePanel panel) 
    { 
        Control ctrl = Page.LoadControl("~/controls/Community/ComDisplayImage.ascx"); 
        panel.ContentTemplateContainer.Controls.Add(ctrl); 
        panel.Visible = true
 
        ComDisplayImage options = (ComDisplayImage)ctrl; 
        options.Filename = filename; 
    } 
 
    protected void gridObjects_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            DataRowView row = (DataRowView)e.Item.DataItem; 
            string text = row["file_path"].ToString(); 
 
            System.Web.UI.WebControls.Label label = (System.Web.UI.WebControls.Label)e.Item.FindControl("lblTitleItem"); 
 
            RadToolTipManager1.TargetControls.Add(label.ClientID, text, true); 
        } 
    } 
 
 
 
 

Svetlina Anati
Telerik team
 answered on 09 Oct 2008
3 answers
152 views
I have a need to use Upload in an environment that has Medium trust.  I've fixed a number of "Security Exception" errors for the other tools by inheriting Telerik.Web.UI.RadAjaxPage...but can't find anything to fix the Upload

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

Exception Details: System.Security.SecurityException: Request failed.
Erjan Gavalji
Telerik team
 answered on 09 Oct 2008
1 answer
94 views
I need to display what should be a pretty basic Pie Chart, but am having trouble with the Labels.

The data is all coming from a SQL database, and it's only two columns.  The "Chart Label" is a pre-calculated Label that I'd like to use on each slice of the pie chart.  Occurences are, the values that the chart will be.... charting....

--------------------------------------
Occurrences     |    Chart Label
--------------------------------------
2                      |   Item Label 1 (2)
5                      |   Item Label 2 (5)
6                      |   Item Label 3 (6)
2                      |   Item Label 4 (2)
3                      |   Item Label 5 (3)

So in my ASPX code, I have the following:
<telerik:RadChart ID="RadChart1" runat="server" DataSourceID="SqlDataSource1" DefaultType="Pie" Skin="WebBlue" IntelligentLabelsEnabled="True" AutoTextWrap="True" AutoLayout="True" SeriesOrientation="Horizontal"
        <Series> 
            <telerik:ChartSeries DataLabelsColumn="ChartLabel" DataYColumn="Occurrences" Name="Occurrences" Type="Pie"
                <Appearance> 
                    <LabelAppearance Distance="15"
                    </LabelAppearance> 
                    <Border Color="73, 86, 101" /> 
                    <TextAppearance TextProperties-Color="140, 140, 140"
                    </TextAppearance> 
                    <FillStyle FillType="ComplexGradient" MainColor="94, 117, 142"
                        <FillSettings> 
                            <ComplexGradient> 
                                <telerik:GradientElement Color="94, 117, 142" /> 
                                <telerik:GradientElement Color="116, 138, 162" Position="0.5" /> 
                                <telerik:GradientElement Color="139, 160, 183" Position="1" /> 
                            </ComplexGradient> 
                        </FillSettings> 
                    </FillStyle> 
                </Appearance> 
            </telerik:ChartSeries> 
        </Series> 
... 
</telerik:RadChart> 
 
... 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT COUNT(*) AS [Occurrences], incidentCode + ' (' + CAST(COUNT(*) AS nvarchar) + ')' AS [ChartLabel] FROM Incidents GROUP BY incidentCode"
</asp:SqlDataSource> 
... 
 

Note that I'm trying to bind the label text to the "Chart Label" field.  Am I going about this in the wrong way, because it is not working... instead, the label is displaying the value in the "Occurrences" field. 

Even if I go into the Chart Wizard to set the Label field to "Chart Label" - nothing happens and the value is not saved.

Thanks!

Nick
Ves
Telerik team
 answered on 09 Oct 2008
23 answers
312 views
I'm pretty new to Telerik, so I'm sure I've done something wrong here, but...

I can get the grid to work in my app. Examples of client side failure include no response when I mouse over a row and No postback on a row click. Strange thing is that paging seems to be working.

I've tried and failed at reproducing this behavior in a sample app. Could it be that I've added the script manager to the master page & not the child page? Does it need to be added to both? Is this a scripting failure or am I unable to figure out how to set the "react to a mouse over" setting?

My goal is pretty simple: Display a list of names & do an Ajax update in response to clicking on a row. I've reproduced this goal in the sample app, but can't get the real app to react to client side actions. Without the mouise over feedback the client will not know they can click on the row.
Pavel
Telerik team
 answered on 09 Oct 2008
7 answers
224 views
Hello,

I've been looking a simple way of obtain something similar to this http://www.extjs.com/deploy/dev/examples/grid/array-grid.html and get a column menu to select which columns to display and the column ordering.

Will Telerik WebGrid support this in the next future? is any way to implement it in a simple way with the actual webgrid control?

Thanks a lot for your answer!
Pavel
Telerik team
 answered on 09 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?