Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
171 views
I need to begin the treelist with all nodes expanded, and then allow to expand/collapse as needed. I use NeedDataSource for the expand collapse, but the list starts off collapsed by default and I can't use ExpandAllItems() because I'm assuming it used a type of databind method that won't work with the NeedDataSource event. Is there a way to accomplish what I need?

Thanks, 

Derek
Derek
Top achievements
Rank 1
 answered on 06 Dec 2011
4 answers
276 views
I have the following Rad Grid.  There is a Critical Checkbox and a set of radio buttons.  If the user Checks the checkbox I would like it to change the radio button to Failed.  Is this possible?

    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
        GridLines="None">
<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
    <Columns>
        <telerik:GridTemplateColumn DataField="Step" HeaderText="Step"
            SortExpression="Step" UniqueName="Step">
            <EditItemTemplate>
                <asp:TextBox ID="StepTextBox" runat="server" Text='<%# Bind("Step") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="StepLabel" runat="server" Text='<%# SetStepLevel(Eval("Step"),Eval("StepLevel")) %>'></asp:Label>
                <asp:HiddenField ID="ARQADID" runat="server" Value='<%# Eval("ARQADID") %>' />
                <asp:HiddenField ID="iUserID" runat="server" Value='<%# Eval("iUserID") %>' />
                <asp:HiddenField ID="iIssueID" runat="server" Value='<%# Eval("iIssueID") %>' />
                <asp:HiddenField ID="DateEntered" runat="server" Value='<%# Eval("DateEntered") %>' />
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Critical" DataType="System.Int32"
            HeaderText="Critical" SortExpression="Critical" UniqueName="Critical">
            <EditItemTemplate>
                <asp:TextBox ID="CriticalTextBox" runat="server" Text='<%# Bind("Critical") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:CheckBox ID="CriticalCheckBox" runat="server" Checked='<%# Eval("Critical") %>' Visible='<%# Eval("Evaluate") %>' />
            </ItemTemplate>
            <FooterStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
            <HeaderStyle Width="50px" Font-Bold="False" Font-Italic="False"
                Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
                HorizontalAlign="Center" Wrap="True" />
            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Pass" DataType="System.Int32"
            HeaderText="Pass" SortExpression="Pass" UniqueName="Pass">
            <EditItemTemplate>
                <asp:TextBox ID="PassTextBox" runat="server" Text='<%# Bind("Pass") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:RadioButton ID="PassRadioButton" GroupName="PassFailNA" runat="server" Checked='<%# Eval("Pass") %>' Visible='<%# Eval("Evaluate") %>'/>
            </ItemTemplate>
            <FooterStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
            <HeaderStyle Width="50px" Font-Bold="False" Font-Italic="False"
                Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
                HorizontalAlign="Center" Wrap="True" />
            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Fail" DataType="System.Int32"
            HeaderText="Fail" SortExpression="Fail" UniqueName="Fail">
            <EditItemTemplate>
                <asp:TextBox ID="FailTextBox" runat="server" Text='<%# Bind("Fail") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:RadioButton ID="FailRadioButton" GroupName="PassFailNA" runat="server" Checked='<%# Eval("Fail") %>' Visible='<%# Eval("Evaluate") %>'/>
            </ItemTemplate>
            <FooterStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
            <HeaderStyle Width="50px" Font-Bold="False" Font-Italic="False"
                Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
                HorizontalAlign="Center" Wrap="True" />
            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="NA" DataType="System.Int32"
            HeaderText="NA" SortExpression="NA" UniqueName="NA">
            <EditItemTemplate>
                <asp:TextBox ID="NATextBox" runat="server" Text='<%# Bind("NA") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:RadioButton ID="NARadioButton" GroupName="PassFailNA" runat="server" Checked='<%# Eval("NA") %>' Visible='<%# Eval("Evaluate") %>'/>
            </ItemTemplate>
            <FooterStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
            <HeaderStyle Width="50px" Font-Bold="False" Font-Italic="False"
                Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
                HorizontalAlign="Center" Wrap="True" />
            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                Wrap="True" />
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Notes" HeaderText="Notes"
            SortExpression="Notes" UniqueName="Notes">
            <EditItemTemplate>
                <asp:TextBox ID="NotesTextBox" runat="server" Text='<%# Bind("Notes") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:TextBox ID="NotesTextBox" runat="server" TextMode="Multiline"  Rows="2" Columns="30" Text='<%# Bind("Notes") %>' Visible='<%# Eval("Evaluate") %>'></asp:TextBox>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
</MasterTableView>
    </telerik:RadGrid>
Ryan
Top achievements
Rank 1
 answered on 06 Dec 2011
3 answers
221 views
Hi,

I have a masked text box with mask '<0..3><0..3><0..3>' which displays as '000' when empty. Is it possible to have an empty text box or one which displays '___' instead?

For example:

Empty: '___'
Partially filled: '12_'
Filled: '123' 


Thanks
Vasil
Telerik team
 answered on 06 Dec 2011
3 answers
113 views
As in the topic - I have both events subscribed and I want to prevent NodeClick from happening when double click occurs, how can I do that?
Bozhidar
Telerik team
 answered on 06 Dec 2011
4 answers
195 views
Hello Everyone,
I have a Radgrid inside a panelbar. In the footer item of this grid we added a textbox in wich user can insert some text. It works fine with all browser less IE7. With this browser I cannot write anything. It is a very abnormal behaviour. Besides I have the same grid in another page and it works fine.
The usercontrol that contains radgrid is loaded when is clicked the radpanel container with a server request (ajax)
I attached the code, please help me

Thanks

<%@ Page Language="C#" MasterPageFile="~/MainPage.Master" AutoEventWireup="true"
    CodeBehind="ShoppingBasketPage.aspx.cs" Inherits="AstroWeb.WebForms.ShoppingBasketPage" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %>
<%@ Register Src="../UserControls/ShoppingBasketGrid.ascx" TagName="ShoppingBasketGrid"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/SparePartsBasket.ascx" TagName="SparePartsBasket"
    TagPrefix="uc2" %>
<%@ Register Src="~/UserControls/SpecialPartsBasket.ascx" TagName="SpecialPartsBasket"
    TagPrefix="uc3" %>
<%@ Register Src="~/UserControls/AlternativePartsBasket.ascx" TagName="AlternativePartsBasket"
    TagPrefix="uc4" %>
<%@ Register Assembly="CustomControlsLibrary" Namespace="CustomControlsLibrary" TagPrefix="cc1" %>
<%@ Register Assembly="Astro_CustomControls" Namespace="Astro_CustomControls" TagPrefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <style type="text/css">
        .ChartContainer
        {
            width: 99%;
            position: relative; /* border: 1px solid black; */
            margin: 0 auto;
            text-align: center;
        }
         
        .ChartNormal
        {
            /* border: 1px solid black; */
            float: left;
            width: 700px;
            margin: auto 2em;
            margin-top: 2em;
        }
    </style>
    <script type="text/javascript">
        function OpenGridWeb() {
            var oWnd = window.radopen(null, "WebBlue");
            oWnd.set_visibleStatusbar(false);
            oWnd.setSize(300, 365);
            oWnd.center();
            oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
            oWnd.setUrl("GridWeb.aspx");
        }
        function OnExpand(sender, eventArgs) {
            eventArgs.get_item().click()
        }
    </script>
    <rad:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function requestStart(sender, eventArgs) {
                var loadingPanel = "#<%= RadAjaxLoadingPanel1.ClientID %>";
                $(loadingPanel).center();
            }
        </script>
    </rad:RadCodeBlock>
    <rad:RadScriptBlock runat="server" ID="radscript1">
        <asp:Literal runat="server" ID="lit"></asp:Literal>
    </rad:RadScriptBlock>
    <rad:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"
        OnAjaxRequest="RadAjaxPanel1_AjaxRequest">
        <rad:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" CssClass="underPopup" IsSticky="true"
            runat="server">
            <div id="divProgressTemplate" style="width: 100%; height: 100%; z-index: 9000; background-color: White;
                position: absolute; filter: alpha(opacity = 40); -moz-opacity: .40; opacity: .40;">
                <img alt="" src="../Images/0000_wait.gif" style="position: absolute; top: 50%; left: 50%;
                    z-index: 9999;" />
            </div>
        </rad:RadAjaxLoadingPanel>
        <rad:RadWindowManager VisibleStatusbar="true" ID="radWindowManagr" runat="server"
            Skin="WebBlue" ReloadOnShow="false">
            <Windows>
                <rad:RadWindow ReloadOnShow="true" ID="radWinBday" runat="server" Behavior="close"
                    EnableEmbeddedSkins="true" Modal="true" Skin="WebBlue">
                </rad:RadWindow>
            </Windows>
        </rad:RadWindowManager>
        <div style="width: 100%; height: 10px">
             </div>
        <div style="position: relative">
            <cc1:BaseRadPanel runat="server" ID="radpnlBasketGrid" Width="100%" ExpandMode="SingleExpandedItem"
                Skin="WebBlue" ExpandAnimation-Type="None">
                <Items>
                    <rad:RadPanelItem Expanded="true" Text="1100_ShoppingBasket" Selected="true">
                        <Items>
                            <rad:RadPanelItem>
                                <ContentTemplate>
                                    <asp:Panel runat="server" ID="pnlSB" ScrollBars="Auto">
                                        <uc1:ShoppingBasketGrid ID="ShoppingBasketGrid" runat="server" />
                                    </asp:Panel>
                                </ContentTemplate>
                            </rad:RadPanelItem>
                        </Items>
                    </rad:RadPanelItem>
                </Items>
            </cc1:BaseRadPanel>
        </div>
        <div style="position: relative">
            <cc1:BaseRadPanel runat="server" ID="radpnlSpareParts" Width="100%" ExpandMode="SingleExpandedItem"
                Skin="WebBlue" ExpandAnimation-Type="None" OnItemClick="PopulateSparePartsGrid"
                OnClientItemExpand="OnExpand">
                <Items>
                    <rad:RadPanelItem Expanded="false" Text="1560_Spares">
                        <Items>
                            <rad:RadPanelItem>
                                <ContentTemplate>
                                    <uc2:SparePartsBasket ID="SparePartsBasket" runat="server" />
                                </ContentTemplate>
                            </rad:RadPanelItem>
                        </Items>
                    </rad:RadPanelItem>
                </Items>
            </cc1:BaseRadPanel>
        </div>
        <div style="position: relative">
            <cc1:BaseRadPanel runat="server" ID="radpnlSpecialParts" Width="100%" ExpandMode="SingleExpandedItem"
                Skin="WebBlue" ExpandAnimation-Type="None" OnItemClick="PopulateSpecialPartsGrid"
                OnClientItemExpand="OnExpand">
                <Items>
                    <rad:RadPanelItem Expanded="false" Text="1101_SpecialParts">
                        <Items>
                            <rad:RadPanelItem>
                                <ContentTemplate>
                                    <uc3:SpecialPartsBasket ID="SpecialPartsBasket" runat="server" />
                                </ContentTemplate>
                            </rad:RadPanelItem>
                        </Items>
                    </rad:RadPanelItem>
                </Items>
            </cc1:BaseRadPanel>
        </div>
        <div style="position: relative">
            <cc1:BaseRadPanel runat="server" ID="radpnlAlternativeParts" Width="100%" ExpandMode="SingleExpandedItem"
                Skin="WebBlue" ExpandAnimation-Type="None">
                <Items>
                    <rad:RadPanelItem Expanded="false" Enabled="false" Text="1102_AlternativePart">
                        <Items>
                            <rad:RadPanelItem>
                                <ContentTemplate>
                                    <uc4:AlternativePartsBasket ID="AlternativePartsBasket" runat="server" />
                                    <div align="left">
                                        <cc2:BaseTelerikRadButtonSecurity ID="btnSendAlternatives" ToggleType="None" runat="server"
                                            ApplySecurityCode="false" ButtonType="StandardButton" Text="Add Selections" AutoPostBack="true"
                                            UseSubmitBehavior="true" OnClick="btnSendAlt_Click">
                                            <Image IsBackgroundImage="true" ImageUrl="~/images/button.png" />
                                        </cc2:BaseTelerikRadButtonSecurity>
                                    </div>
                                </ContentTemplate>
                            </rad:RadPanelItem>
                        </Items>
                    </rad:RadPanelItem>
                </Items>
            </cc1:BaseRadPanel>
        </div>
    </rad:RadAjaxPanel>
</asp:Content>
Tsvetina
Telerik team
 answered on 06 Dec 2011
17 answers
512 views
Hello,

         I have used Rad Scheduler in my application.
         Also, I am using the Recurrence Rule option for Scheduling the tasks.
         Now, I want in my application that, while adding new task in Scheduler,
               User can select Department from Combo Box, User Name from Another combo box.
               Also, user can select one value from radio button list.

         Same must go with the Advance Edit Form.
        
          I have already downloaded the examples given in the Telerik website, but they are using User Controls & are very complicated
          to be applied in my application.
          If anyone can provide me with the easier way, then it will be very useful to me.

         Please Reply,


Thanks & Regards
Kunal Patel



Shirani
Top achievements
Rank 1
 answered on 06 Dec 2011
3 answers
99 views
Working in Higher Education, we regularly have users requesting that they be able to using hanging indents for their bibliographies. Is there a hanging indent button in RadEditor? Something that would render something like: style="margin: 0in 0in 0pt 0.5in; text-indent: -0.5in;" ?
Rumen
Telerik team
 answered on 06 Dec 2011
1 answer
145 views

hello,
I am using radScheduler. My requirement is that when user select a date from scheduler datepicker I save that date in session. On which event I will get the selected date of calender.
Peter
Telerik team
 answered on 06 Dec 2011
0 answers
163 views
Hi

We are using a RadEditor on one of our pages and within this page we have a RequiredFieldValidator that checks if this editor contains any text. If it does not a message is displayed to the user for them to enter text.

We are currently having a problem when a postback occurs. We have an add files link on the page, which popups a new dialog. Once the user has finished with this page we postback that file data to a grid on the page. This then causes a javascript error to appear:

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Tue, 6 Dec 2011 15:18:04 UTC

Message: Unable to set value of the property 'controltovalidate': object is null or undefined
Line: 197
Char: 1
Code: 0
URI: https://localhost/3G3/TasksAndDiscussions/Item/TaskOrDiscusionItemFormPage.aspx?HostWindow=POPUP&HostWindowContextContainerID=bc80ecd4-4957-43e5-8e7a-347480972599&HostWindowContextContainerType=TASKFOLDER&HostWindowContextContainerPath=SYSTEM+%2f+4p+Jonathan+Testing+%2f+Site+01+%2f+Project+01+%2f+Tasks&EditMode=NEW&LayoutMode=FILL&NextURL=&HeaderId=bc80ecd4-4957-43e5-8e7a-347480972599&HeaderType=TASK&SpecialAction=NONE&AttachmentsSessionID=00000000-0000-0000-0000-000000000000&mode=popup&openerid=

I believe this is relating to the RequiredFieldValidator checking if any text exists in the RadEditor and it is failing to find the RadEditor on the page.

Below is an example of the code:


<table border=0 width="100%">
	<tr>
		<td valign="top">
			<gen:Field id="cBodyText" runat="server" type="extended" name="Body Text" description="Thread body text" inputdescription="Thread body text"></gen:Field>
		</td>
	</tr>
	<tr>
		<td align="center">
			<radE:RadEditor id="cBodyTextRadEditor" Runat="server" 
				ToolsFile="~/Properties/Content/TasksAndDiscussions/Threaded/TextEditorToolsConfig.xml" 
				Editable="true" height="400px" width="500px" showsubmitcancelbuttons="false" 
				Scheme="~/RadControls/Editor/Schemes/Monochrome" OnClientLoad="OnClientLoad"
				EnableDocking="false" OnClientModeChange="OnClientModeChange"></radE:RadEditor>
		</td>
	</tr>
	<tr>
        <td align="center">
            <asp:label id="lblBodyTextValidation" runat="server" visible="false" style="colorred;" text="The message body is required, please complete your post before proceeding." />
		</td>
    </tr>
    <tr>
		<td align="center">
			<asp:RequiredFieldValidator id="ReqFieldValidator" runat="server" ErrorMessage="The message body is required, please complete your post before proceeding."></asp:RequiredFieldValidator>
		</td>
	</tr>
</table>

protected void Page_Load(object sender, System.EventArgs e)
		{
			if(!IsPostBack)
			{
				if(ReqFieldValidator!=null)ReqFieldValidator.ErrorMessage = resourceManager.GetString("themessagebodyi");
				if(cBodyText!=null)cBodyText.Description = resourceManager.GetString("threadbodytext");
				if(cBodyText!=null)cBodyText.InputDescription = resourceManager.GetString("threadbodytext");
				if(cBodyText!=null)cBodyText.Name = resourceManager.GetString("bodytext");
			}
 
			if (cBodyTextRadEditor.Text == "")
			{
				ReqFieldValidator.ControlToValidate = "cBodyTextRadEditor";
			}
}

Jonathan
Top achievements
Rank 1
 asked on 06 Dec 2011
1 answer
75 views
hello


i am using telerik version 2011.2.915.35 and the default skin for the editor.
when opening the image manager and selecting upload the textboxes of the file chose control have no borders.
i debugged with IE9 and when disabling one style attribute the boxes show up on the bottom, see attached screenshot.

it seems there is something wrong with the style, how can i fix this so the input boxes appear next to the select button as they are supposed to?

BR
Rumen
Telerik team
 answered on 06 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?