Telerik RadEditor controls are disabled in inline editing mode - c#

I have some custom drop downs under EditorToolGroup in RadEditor. I wanted to enable a drop down when I am in inline html editing mode. How to do it?
<telerik:RadEditor Skin="Metro" ID="HTMLEditor"
OnClientLoad="OnClientLoad"
OnClientSelectionChange="OnClientSelectionChange"
OnClientCommandExecuting="OnClientCommandExecutingHTML"
NewLineMode="Br"
EditModes="Design,Html"
ContentAreaMode="Iframe"
OnClientModeChange="OnClientModeChange"
Height="680px" Width="100%"
runat="server" EnableResize="false" ExternalDialogsPath="~/EditorDialogs"
ContentFilters="IECleanAnchors,FixEnclosingP,FixUlBoldItalic,MottEmStrong,RemoveScripts,ConvertToXhtml,ConvertInlineStylesToAttributes"
DialogsCssFile="~/styles/Editor_LinkManagerMetro.css">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="SaveDesign" Text="Save" />
<telerik:EditorTool Name="SaveAs" Text="Save As My Template" ShowText="false" ShowIcon="true" />
<telerik:EditorTool Name="Undo" ShowIcon="true" />
<telerik:EditorTool Name="Redo" ShowIcon="true" />
<telerik:EditorSeparator Visible="true" />
<telerik:EditorDropDown Name="EnableThisDropdown" Width="125px" Text="Select" RenderMode="Lightweight" />

Related

Acumatica: add underline for command field

I have a text data field that should be an hyperlink.
That works fine:
But I cannot create it with underline as all other fields.
I can do it or as link or with underline:
The Form code looks like this:
<px:PXFormView runat="server" ID="PXFormView1" DataSourceID="ds" DataMember="TaxationSummaryForAU" RenderStyle="Simple">
<Template>
<px:PXGroupBox runat="server" ID="gbSummary"
RenderStyle="RoundBorder"
RenderSimple="False"
Caption="Tax Declaration Summary"
DataField="IsAUJurisdiction" Style="margin: 15px;">
<Template>
<px:PXLayoutRule ID="PXLayoutRule21" runat="server" StartColumn="True" ControlSize="L" LabelsWidth="180" />
<px:PXTextEdit ID="edSummaryTFN" runat="server" DataField="TFNDescription" />
<px:PXTextEdit ID="edSummaryAustralianResident" runat="server" DataField="AustralianResidentDescription" />
<px:PXTextEdit ID="edTFT" runat="server" DataField="TaxFreeThresholdDescription" />
<px:PXTextEdit ID="edTFNDStatus" runat="server" DataField="TFNDStatus" />
<px:PXTextEdit ID="edTFNDLastSubmittedDate" runat="server" DataField="TFNDLastSubmittedDate" />
<px:PXTextEdit runat="server" DataField="STPBatch" ID="STPBatchEdit" Enabled="False">
<LinkCommand Command="viewBatch" Target="ds"></LinkCommand>
</px:PXTextEdit>
<px:PXTextEdit ID="STPStatusEdit" runat="server" DataField="STPStatus" />
<px:PXLayoutRule ID="lrTFTCol" runat="server" StartColumn="True" ControlSize="L" LabelsWidth="M" />
<px:PXTextEdit ID="edOffsets" runat="server" DataField="OffsetsDescription" />
<px:PXTextEdit ID="edMediLevy" runat="server" DataField="MediLevyDescription" />
<px:PXTextEdit ID="edChildren" runat="server" DataField="ChildrenDescription" />
<px:PXTextEdit ID="edStudyDebt" runat="server" DataField="StudyDebtDescription" />
<px:PXTextEdit ID="edTaxScale" runat="server" DataField="TaxScaleDescription" />
<px:PXTextEdit ID="PXTextEdit2" runat="server" DataField="WitholdingVariation" />
<px:PXGroupBox runat="server" ID="PXGroupBox2" RenderStyle="Simple" RenderSimple="True" Caption="" DataField="ShowTFNDErrors" Style="margin-top: 25px; height: 200px;">
<Template>
<px:PXGrid runat="server" ID="grdEmployeeTFNDErrors" DataSourceID="ds" TabIndex="3100" SkinID="DetailsWithFilter" Width="100%"
SyncPosition="true" KeepPosition="true" AutoAdjustColumns="True">
<Levels>
<px:PXGridLevel DataMember="EmployeeTFNDErrors">
<RowTemplate>
<px:PXLabel ID="edErrorField" runat="server" DataField="Concept" AutoRefresh="True" AllowEdit="False" />
<px:PXLabel ID="edErrorMessage" runat="server" DataField="ErrorMessage" AutoRefresh="True" AllowEdit="False" />
</RowTemplate>
<Columns>
<px:PXGridColumn DataField="Concept" TextAlign="Left" Width="15px" />
<px:PXGridColumn DataField="ErrorMessage" TextAlign="Left">
<ValueItems MultiSelect="False" />
</px:PXGridColumn>
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Enabled="True" />
<Mode AllowAddNew="True" AllowSort="False"></Mode>
<ActionBar ActionsVisible="False" />
</px:PXGrid>
</Template>
</px:PXGroupBox>
</Template>
</px:PXGroupBox>
</Template>
</px:PXFormView>
My field is:
<px:PXTextEdit runat="server" DataField="STPBatch" ID="STPBatchEdit" Enabled="False">
<LinkCommand Command="viewBatch" Target="ds"></LinkCommand>
</px:PXTextEdit>
I will be grateful for any advice.
I think when you have Enable=false, you will not see the underline, but you can achieve this like below and make sure to unhide advanced properties to see these properties.
<px:PXTextEdit runat="server" DataField="STPBatch" ID="STPBatchEdit" Enabled="False">
<LinkCommand Command="viewBatch" Target="ds"></LinkCommand>
<Border>
<Bottom Color="#D2D4D7" Style="Solid" Width="1px" /></Border>
</px:PXTextEdit>
If you have access to the \App_Themes\Default directory on the web server machine, you can modify the style for all disabled links.
The lack of underline occurs because of this style in the \App_Themes\Default\00_Controls.css :
a.Disabled {
text-decoration: none;
}
Underline is a text decoration and this style removes it for disabled link. It's a deliberate design choice and you can comment out that style to get underline on disabled link editor controls:
a.Disabled {
/*text-decoration: none;*/
}
With the default style, disabled link editor control have no text decoration:
When commenting the style, disabled link editor control have the default text decoration:

Obout grid coming empty

I have a obout grid in which right now i have included only one column.When I set the datasource and data bind it the grid shows as empty at runtime.I was doing it with the normal gridview(asp) earlier and it was working fine.I replaced the normal gridview with the obout - now its coming as empty.
<obout:Grid ID="gvReport" runat="server" Serialize="false" ShowTotalNumberOfPages="false" AllowPaging="true"
ShowLoadingMessage="false" FolderStyle="~/styles/premiere_blue" AllowPageSizeSelection="false" EnableRecordHover="true"
AllowGrouping="false" AutoGenerateColumns="false" AllowFiltering="false" FilterType="ProgrammaticOnly"
AllowAddingRecords="false" AllowColumnReordering="false" AllowRecordSelection="true" AllowMultiRecordSelection="true" ShowRecordsPerPage="false" AllowColumnResizing="true" ShowColumnsFooter="false" ShowHeader="true" ShowFooter="true" AllowSorting="true" GenerateRecordIds="True" ViewStateMode="Inherit" KeepSelectedRecords="true" CallbackMode="false"
EmbedFilterInSortExpression="true" Width="100%" PageSize="10" OnRowDataBound="GridView_RowDataBound" OnDataBound="GridView_DataBound" OnDataSourceNeeded="GridDataSourceNeededEvent">
<ScrollingSettings ScrollHeight="260" EnableVirtualScrolling="true" UsePagingForVirtualScrolling="true" /><Columns>
<obout:Column ID="colName" DataField="Name" Width="200px" Wrap="true" HeaderText="Content Name"
ShowFilterCriterias="false">
<TemplateSettings FilterTemplateId="tplNameFilter" />
<FilterOptions>
<obout:FilterOption IsDefault="true" Type="Contains" />
</FilterOptions>
</obout:Column>
</Columns>
<Templates>
<obout:GridTemplate runat="server" ID="tplNameFilter" ControlID="NameFilter">
<Template>
<obout:OboutTextBox runat="server" ID="NameFilter" Width="100%">
</obout:OboutTextBox>
</Template>
</obout:GridTemplate>
</Templates>
<TemplateSettings HeadingTemplateId="tplHeading" />
<PagingSettings PageSizeSelectorPosition="Bottom" Position="Bottom" ShowRecordsCount="True" />
<FilteringSettings InitialState="Hidden" FilterPosition="Top" FilterLinksPosition="Top" />
</obout:Grid>
Code:
gvReport.DataSource = reportData;
gvReport.DataBind();
While debugging the table has all the values but they are not getting assigned to the grid.Previously in place of obout I had normal gridview and it was working fine.
You must remove
OnDataSourceNeeded="GridDataSourceNeededEvent"
you can't have an OnDataSourceNeeded event togheter with gvReport.DataSource

Easy user interface change depending on selection

So I have a dropdownlist with 2 items : Path and Queue
If the item selected is a Path, then the next thing displayed in the next div is a textBox (txtLocation), and if it is a Queue, then I have to show a DropDownList(cmbLocation) which items are part of a xml file.
Type:
<dx:ASPxComboBox ID="cmbPathType" runat="server" Width="150px" TextField="TypeName"
ValueField="QueueMonitorConfigTypesID">
<DisabledStyle BackColor="LightGray" ForeColor="Black" />
<Items>
<dx:ListEditItem Text="Path" Value="Path" />
<dx:ListEditItem Text="Queue" Value="Queue" />
</Items>
<ValidationSettings ValidateOnLeave="false" RequiredField-IsRequired="true">
<RequiredField IsRequired="True" />
</ValidationSettings>
</dx:ASPxComboBox>
Location:
<dx:ASPxTextBox ID="txtLocation" runat="server" Width="150px">
<DisabledStyle BackColor="LightGray" ForeColor="Black" />
<ValidationSettings ValidateOnLeave="false" RequiredField-IsRequired="true">
<RequiredField IsRequired="True"></RequiredField>
</ValidationSettings>
</dx:ASPxTextBox>
<dx:ASPxComboBox ID="cmbLocation" runat="server" Width="150px" DataSourceID="queuesXML">
</dx:ASPxComboBox>
<asp:XmlDataSource ID="queuesXML" runat="server" DataFile="~/Config/Config.xml" XPath="queue/name" ></asp:XmlDataSource>
I know I'm using dev express, but that should not matter for this
you need to work on change event of combobox. And Use the selection values as condition.

accordion control in asp.net

I have accordion control and having set of link button controls inside accordion control. I use the following code.
<asp:Accordion ID="Accordion1" Class="accordion" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent" runat="server" Width="248px">
<Panes>
<asp:AccordionPane ID="AccordionPane1" runat="server">
<Header>Registration</Header>
<Content>
<asp:LinkButton ID="CandidateRegistration" CssClass="linkButton"
runat="server" ForeColor="Black"
OnClick="candidatesRegistration_Click"
Text="Candidates Registered"></asp:LinkButton><br />
<asp:LinkButton ID="registrationByRqp" runat="server"
ForeColor="Black" OnClick="registrationByRqp_Click"
Text="Registered Through RQP"></asp:LinkButton><br />
<asp:LinkButton ID="registrationByUi" runat="server"
ForeColor="Black" OnClick="registrationByUi_Click"
Text="Registered Through UI"></asp:LinkButton><br />
<asp:LinkButton ID="avgRegistration" runat="server"
ForeColor="Black" OnClick="avgRegistration_Click"
Text="Average Registration"></asp:LinkButton><br />
<asp:LinkButton ID="jobsRegistered" runat="server"
ForeColor="Black" OnClick="jobsRegistered_Click"
Text="Jobs registered"></asp:LinkButton><br />
<asp:LinkButton ID="unregistered" ForeColor="Black"
runat="server" Text="Unregistered Candidate"
OnClick="unregistered_Click"></asp:LinkButton>
</Content>
</asp:AccordionPane>
<asp:AccordionPane ID="AccordionPane2" runat="server">
<Header>Job Alerts</Header>
<Content>
<asp:LinkButton ID="jobAlert" runat="server" ForeColor="Black"
OnClick="jobAlert_Click">Job Alert</asp:LinkButton><br />
<asp:LinkButton ID="minScoreAlerts" runat="server"
ForeColor="Black" OnClick="minScoreAlerts_Click">
Minimum score of job alerts</asp:LinkButton><br />
<asp:LinkButton ID="maxScoreAlerts" runat="server"
ForeColor="Black" OnClick="maxScoreAlerts_Click">
Maximum score of job alerts</asp:LinkButton><br />
<asp:LinkButton ID="avgScoreJobAlerts" runat="server"
ForeColor="Black" OnClick="avgScoreJobAlerts_Click">
Average score of daily alerts</asp:LinkButton><br />
</Content>
</asp:AccordionPane>
<asp:AccordionPane ID="AccordionPane4" runat="server">
<Header>Analysis</Header>
<Content>
<asp:LinkButton ID="searchpeakTime" runat="server"
ForeColor="Black" OnClick="searchpeakTime_Click">
Search peak time</asp:LinkButton><br />
<asp:LinkButton ID="userActivityReport" runat="server"
ForeColor="Black" OnClick="userActivityReport_Click">
User Activity Report</asp:LinkButton><br />
<asp:LinkButton ID="operationalusage" runat="server"
ForeColor="Black" OnClick="operationalusage_Click">
Operational Usage</asp:LinkButton>
</Content>
</asp:AccordionPane>
<asp:AccordionPane ID="AccordionPane3" runat="server">
<Header>Overview</Header>
<Content>
<asp:LinkButton ID="Overview" ForeColor="Black" runat="server"
OnClick="Overview_Click" >Overview</asp:LinkButton><br />
</Content>
</asp:AccordionPane>
</Panes>
</asp:Accordion> <br />
.Its works properly . But when i click the the link button in the second or third accordion pane the page will be redirected but the visibility return to accordionpane1. I want which link button i click meaks the corresponded accordion pane will be visible and not the first . Can anyone able help for that?
Thankx in advance......
I think you can use "AutoSize="Fill"" property to achieve that. Have look at this question, it will solve your problem.

Modal Popup Extender animation in ASP.net

I am currently developing an ASP.net c# application. I have a grid view which has bound link buttons inside. When the link button is pressed I want to display the modal popup using a fade in animation and a fade out animation when a button inside the modal popup is clicked.
I have added the animation extender into the code and set the TargetControlID to the ID of the link button, however, when I try to run the website it displays the error System.InvalidOperationException the TargetControID of ModalPopupExtender is not valid. A control with ID 'sofLink' could not be found. sofLink is the ID of the LinkButton.
Below is the code for the grid view
<asp:GridView ID="tblSoftware" runat="server" Width="100%"
EnableModelValidation="True" AutoGenerateColumns="False"
onselectedindexchanged="tblSoftware_SelectedIndexChanged"
CellPadding="2">
<Columns>
<asp:TemplateField HeaderText="Software Name">
<ItemTemplate>
<asp:LinkButton ID="sofLink" Text='<%# Bind("sof_softwareName") %>'
CommandName="sofID" OnCommand="GetSoftwareModal" CommandArgument='<%# Eval("sof_id") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="sof_platform" HeaderText="Platform" ReadOnly="True" SortExpression="sof_platform" />
</Columns>
<HeaderStyle CssClass="gridHeader" />
<PagerSettings Position="Bottom" />
<PagerStyle HorizontalAlign="Right" VerticalAlign="Middle" CssClass="gridPage" />
<AlternatingRowStyle BackColor="White"></AlternatingRowStyle>
</asp:GridView>
And below is the code for the ModalPopupExtender
<ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" TargetControlID="sofLink"
PopupControlID="ModalPanel" DropShadow="true" Drag="true" OkControlID="OKButton" />
<asp:Panel ID="ModalPanel" runat="server" Width="500px" style="width: auto; height: auto;" CssClass="modalPopup">
<asp:Label ID="softwareTitle" Font-Bold="true" Font-Size="Medium" runat="server" Width="100%" style="text-align: center;" /><br /><br />
<asp:Literal ID="litSoftware" runat="server"></asp:Literal>
<asp:Button id="OKButton" runat="server" Text="Close" style="position: relative; right: 0px; width: 100px;" />
</asp:Panel>
<asp:ScriptManager ID="asm" runat="server" />
And below is the code for the animation
<ajaxToolkit:AnimationExtender ID="popupAnimation" runat="server"
TargetControlID="sofLink">
<Animations>
<OnClick>
<Parallel AnimationTarget="ModalPanel"
Duration="0.3" Fps="25">
<FadeIn />
</Parallel>
</OnClick>
</Animations>
</ajaxToolkit:AnimationExtender>
Thanks for any help you can provide.
The TargetControlID (as far as I am aware) should be a control in the popup panel itself, not in the grid control. When I use the ModalPopupExtender I usually use an asp:Button with 'display:none' as the TargetControlID. Eg,
<ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" TargetControlID="btnPopup"
PopupControlID="ModalPanel" DropShadow="true" Drag="true" OkControlID="OKButton" />
<asp:Panel ID="ModalPanel" runat="server" Width="500px" style="width: auto; height: auto;" CssClass="modalPopup">
<asp:Button id="btnPopup" runat="server" style="display:none" />
In the code-behind you have to control the showing and hiding of the control base on an event, eg, GetSoftwareModal. You will also also to bind what you need if applicable.
Hope that helps.
You could use a hidden button and use it's ID as TargetControlID of the ModalPopupExtender.
<asp:Button id="btnShowPopup" runat="server" style="display:none" />
Then you can call the button's click clientside if you want to show the popup immediately without postback in the follwoing way:
<asp:LinkButton ID="sofLink" runat="server" OnClientClick="javascript:document.getElementById('btnShowPopup').click();return false;">LinkButton</asp:LinkButton>
I tried however my animation doesn't display.
I add databind into LinkButton:
<asp:LinkButton ID="sofLink" runat="server" OnClientClick="javascript:document.getElementById('DetailView1').databind();document.getElementById('btnShowPopup').click();return false;">LinkButton</asp:LinkButton>
I think because of databind of DetailView1, it need get data from database. If DetailView1 doesn't bind, the animation display normal.

Categories