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

Hello,

 

Another Lightweight problem was found in Q1 401 here:

With the RadNumericTextBox, RadDatePicker, RadTimePicker and the RadDateTimePicker the spin / drop down buttons are over the input area. So, if you type, in the radNumericTextbox, the digits you type are behind the spinbuttons. I was not able to do this with a simple CSS adjustment, because they all use the same classes, not a class for each control (riNumeric for i.e. is not avaiable, it is allways riTextBox)

I've created a workaround:

CSS:

<style type="text/css">
    html body .RadInput input.riEmpty,
    html body .RadInput textarea.riEmpty,
    html body input.RadInput_Empty {
        color: #B8B8CB !important;
    }
    .riContSpinButtons input.riTextBox {
        padding-right: 28px;
    }
    .ppRadDatePicker input.riTextBox,
    .ppRadTimePicker input.riTextBox {
        padding-right: 35px;
    }
    .ppRadDateTimePicker input.riTextBox {
        padding-right: 64px;
    }
</style>
 

ASP.NET:

<telerik:RadTextBox ID="RadTextBox1" EmptyMessage="Empty Msg" runat="server" ></telerik:RadTextBox><br /><br />
<telerik:RadNumericTextBox ID="RadNumericTextBox1" ButtonsPosition="Right" ShowSpinButtons="true" EmptyMessage="Empty Msg" IncrementSettings-Step="2" FocusedStyle-HorizontalAlign="Left" EnabledStyle-HorizontalAlign="Right" EmptyMessageStyle-HorizontalAlign="Right" HoveredStyle-HorizontalAlign="Left" NumberFormat-DecimalDigits="2" runat="server"></telerik:RadNumericTextBox><br /><br />
<telerik:RadDatePicker ID="RadDatePicker1" DateInput-EmptyMessage="Empty Msg" CssClass="ppRadDatePicker" runat="server"></telerik:RadDatePicker><br /><br />
<telerik:RadTimePicker ID="RadTimePicker1" DateInput-EmptyMessage="Empty Msg" CssClass="ppRadTimePicker" runat="server"></telerik:RadTimePicker><br /><br />
<telerik:RadDateTimePicker ID="RadDateTimePicker1" DateInput-EmptyMessage="Empty Msg" CssClass="ppRadDateTimePicker" runat="server"></telerik:RadDateTimePicker><br /><br />

I want to have the EmptyMessageStyle to have a somewhat smaller font, but when I do this, the control re-sizes to a reduces height and the buttons do not. Look at the attachment image. This is a pretty weird behavior... It would be to great benefit to all if the individual controls have at least 1 css-class for themselves, like riNumericTextBox, riDatePicker, riTimePicker, etc. 

for now, I do not see how I can accomplish this (smaller font for EmptyMessage)

NB: skin=silk. 

Regards

 

Erik

Galin
Telerik team
 answered on 30 Apr 2015
1 answer
130 views

Hello,

We have a RadAsyncUpload control in our application that uploads an excel file into the 

~\App_Data\RadUploadTemp directory on our local machine (localhost) works great.

 and our TEST Server (shared box) which has been recently migrated from  IIS 6.0 to IIS 7.5.  (Which does not work).  The permissions should all be in place on the new server.  Our Web.config had to be converted due to the server migration.

When i check the log we get a 404 HTTP error.   File not Found, doesnt make sense to me, since i select the File i want to upload it looks like it picks it up and the progressbar starts to upload it.  Of Course it doesnt finish successfully, and we have another procedure that loads the data into an oracle table and that is unsuccessful.

Any ideas ??

 

 Here are the elements in the (old IIS6) Web.config page under   system.web and system.webServer

 <system.web>
<compilation debug="false" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</buildProviders>
</compilation>
<pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID">
   <namespaces>
    <clear />
    <add namespace="System" />
    <add namespace="System.Collections" />
    <add namespace="System.Collections.Generic" />
    <add namespace="System.Collections.Specialized" />
    <add namespace="System.Configuration" />
    <add namespace="System.Text" />
    <add namespace="System.Text.RegularExpressions" />
    <add namespace="System.Linq" />
    <add namespace="System.Xml.Linq" />
    <add namespace="System.Web" />
    <add namespace="System.Web.Caching" />
    <add namespace="System.Web.SessionState" />
    <add namespace="System.Web.Security" />
    <add namespace="System.Web.Profile" />
    <add namespace="System.Web.UI" />
    <add namespace="System.Web.UI.WebControls" />
    <add namespace="System.Web.UI.WebControls.WebParts" />
    <add namespace="System.Web.UI.HtmlControls" />
   </namespaces>
   <controls>
    <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
     assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />  
  </controls>
  </pages>
<authentication mode="Windows"/>
<customErrors mode="Off"/>
<identity impersonate="true"/> 
 <sessionState timeout="20" mode="InProc"/>
<httpHandlers>
   <add path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=8.0.14.225, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" validate="true"/>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>     
   <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    validate="false" />
    <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    validate="false" /> 
   <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
   <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
   <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
   <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
  </httpHandlers>
  <httpRuntime maxRequestLength="4194304" />
</system.web>
<!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
<system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
  <handlers>
   <remove name="ChartImageHandler" />
   <remove name="ChartImage_axd" />
   <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
   <remove name="Telerik_Web_UI_DialogHandler_aspx" />
   <remove name="Telerik_RadUploadProgressHandler_ashx" />
   <remove name="Telerik_Web_UI_WebResource_axd" /><add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=8.0.14.225, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode" />
   <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
   <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
   <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
   <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
   <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
   <add name="ReportViewerWebControlHandler" preCondition="integratedMode"
    verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
    path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </handlers>
 </system.webServer>

 

 Here are the elements in the (New ) Web.config page under   system.web and system.webServer

 

<system.web>
    <globalization culture="en-CA" uiCulture="en-CA" />
    <!--<roleManager enabled="true" defaultProvider="WindowsProvider">
      <providers>
        <clear />
        <add name="WindowsProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
      </providers>
    </roleManager>-->
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler,Telerik.Web.UI" verb="*" validate="false" />
      <add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=8.1.14.618, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true" />
    </httpHandlers>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Telerik.ReportViewer.WebForms, Version=8.1.14.618, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
        <add assembly="Telerik.Reporting, Version=8.1.14.618, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
      </assemblies>
    </compilation>
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
      </controls>
    </pages>
    <httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>
    </httpModules>

  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <remove name="ChartImage_axd" />
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
      <remove name="Telerik_RadUploadProgressHandler_ashx" />
      <remove name="Telerik_Web_UI_WebResource_axd" />
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik.ReportViewer.axd_*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=8.1.14.618, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" preCondition="integratedMode" />
    </handlers>
    <modules runAllManagedModulesForAllRequests="true">
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler"/>
    </modules>

  </system.webServer>

Here is the control on our aspx page.

 <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" 
            AllowedFileExtensions="xls" OnFileUploaded="RadAsyncUpload1_FileUploaded"
            MaxFileInputsCount="1" MaxFileSize="10485760" 
            TargetFolder="~/App_Data/" OnClientFileUploaded="OnClientFileUpload1" 
            onclientvalidationfailed="OnClientValidationFailed" 
            EnableFileInputSkinning="False" Width="480px">
        </telerik:RadAsyncUpload>

 

Thanks in advance for any light you can shed on this issue.

 

 

 

Hristo Valyavicharski
Telerik team
 answered on 30 Apr 2015
2 answers
286 views

Hi there,

Can I represent three-dimensional (i.e. x, y and z axis) data or higher on a single RadGrid?

I see that RadGrid has a hierarchical binding facility (http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultvb.aspx) for tables of data in a parent-child relationship.  I don't have that, though.  I just have a set of three-dimensional coordinates and a single value for each one: e.g., f(x,y,z) = value where x, y and z can each take the values {1, 2, ..., 10}.  At the moment I am simply displaying 10 different f(x,y) grids for each value of z; as you can appreciate, this is not ideal, particularly when I need to go higher than three dimensions.

I could probably cannibalise the hierarchical binding demo somehow to show it on one grid; the hierarchical functionality clearly wasn't designed with this in mind, though.  Is there a better way?

All answers gratefully received!

Ed

Konstantin Dikov
Telerik team
 answered on 30 Apr 2015
5 answers
108 views

VS2013 2015.1.421.45

I added an empty item at the top so the user can set it to a blank entry but it's displaying a very thin line in the dropdown.  (see pic)

Behavior is the same in Chrome and IE11.

The current workaround is to use this but not desirable <telerik:RadComboBoxItem Text="(blank)" Value="" />

 Tried without Lightweight rendermode - no difference.

This is within LayoutRow/CompositeLayoutColumn/RadPageLayout  shouldn't have an impact just let to let you know.

<telerik:RadComboBox ID="cboCountry" runat="server" Width="250px" MaxHeight="250px" ForeColor ="blue" AllowCustomText="false" Autopostback="true" RenderMode="Lightweight" AppendDataBoundItems="true">

Magdalena
Telerik team
 answered on 30 Apr 2015
5 answers
124 views

Hello,

 I've been going through the AJAX forums to see why the export function on RadScheduler would only generate the Title. It works perfectly on a local machine during development, but when attempted remotely, the title is only visible. I've removed update panels and AJAX containers so it can be processed via a full post back and rebind.

  Exporting via ICS file does work.

 Thanks

Scott B


Hristo Valyavicharski
Telerik team
 answered on 29 Apr 2015
1 answer
106 views

Dear,

How to apply dynamic style attribute written by user (who is familiar with css) for dynamic Telerik controls?

Like:

RadTextBox1..Attributes.Add("style", "width:100%");

 

Thanking you,

Pavlina
Telerik team
 answered on 29 Apr 2015
3 answers
155 views

Hello

I have a radgrid with a NestedViewTemplate.  Inside this are 3 fieldsets with either lablels or LIs.  All are bound on the dataitembound event.  When I export to pdf, the labels & LIs (as text only) are present, but the fieldsets are not, so the horizontal organization of the data is lost... the labels export in a vertical stack.

I have tried replacing the fieldsets with spans to manage placement (I have seen a number of articles regarding div and width... so none of that).

 I also tried to various "manipulations" the grid_PreRender.  I note the fieldset is present as text of a LiteralControl and the actual Labels are Labels.  The LiteralControls have \r\n\ & up to 24 spaces (this matches the html layout in VS).  I have stripped all this out, tried creating new Panels and adding the Label controls to these, creating tables and adding the control text to the cells... and so on... but nothing seems to reformat this export.

here is my MasterTableView with NestedViewTemplate

  <telerik:RadGrid ID="gvServiceItems" runat="server" DataKeyNames="ID" OnNeedDataSource="gvServiceItems_NeedDataSource"
            OnItemCommand="gvServiceItems_OnItemCommand" OnItemDataBound="gvServiceItems_OnItemDataBound" OnPreRender="gvServiceItems_PreRender"
            ShowGroupPanel="true" EnableHierarchyExpandAll="true">
            <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true">
            </ExportSettings>
            <ClientSettings AllowDragToGroup="true">
            </ClientSettings>
            <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>

  <MasterTableView DataKeyNames="ID" Name="EstimateRequests">
                <NestedViewTemplate>
                    <span style="float: left; width: 30%; margin: 10px;">
                        <fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
                            <legend>
                                <asp:Label ID="lblInfo" runat="server" Text="lblInfo" SkinID="LabelSeperatorTitle"></asp:Label>
                            </legend>
                            <p>
                                <asp:Label ID="lblDescription" runat="server" Text="lblDescription" SkinID="LabelRadSilk"></asp:Label><br />
                                <asp:Label ID="lblDescriptionData" runat="server" Text="lblDescriptionData" SkinID="LabelData"></asp:Label>
                            </p>
                            <p>
                                <asp:Label ID="lblRequestNotes" runat="server" Text="lblRequestNotes" SkinID="LabelRadSilk"></asp:Label><br />
                                <asp:Label ID="lblRequestNotesData" runat="server" Text="lblRequestNotesData" SkinID="LabelData"></asp:Label>
                            </p>
                        </fieldset>
                    </span>
                    <span style="float: left; width: 30%; margin: 10px;">
                        <fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
                            <legend>
                                <asp:Label ID="lblEquipment" runat="server" Text="lblEquipment" SkinID="LabelSeperatorTitle"></asp:Label>
                            </legend>
                            <asp:Label ID="lblEquipmentData" runat="server" Text="lblEquipmentData"></asp:Label>
                        </fieldset>
                    </span>
                    <span style="float: left; width: 30%; margin: 10px;">
                        <fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
                            <legend>
                                <asp:Label ID="lblParts" runat="server" Text="lblParts" SkinID="LabelSeperatorTitle"></asp:Label>
                            </legend>
                            <asp:Label ID="lblPartsData" runat="server" Text="lblPartsData"></asp:Label>
                        </fieldset>
                    </span>
                </NestedViewTemplate>
                <Columns>

                </Columns>

 

My grid_PreRender

 

  protected void gvServiceItems_PreRender(object sender, EventArgs e)
        {
            if (IsExport)
            {
                foreach (GridHeaderItem header in gvServiceItems.MasterTableView.GetItems(GridItemType.Header))
                {
                    foreach (TableCell cell in header.Cells)
                    {
                        cell.Style["font-family"] = "Arial Unicode MS";
                        cell.Style["font-size"] = "11px";
                        cell.Style["color"] = "black";
                        cell.Style["font-weight"] = "bold";
                        cell.Style["padding"] = "10px 0 4px 0";
                        cell.Style["margin"] = "0 4px";
                        cell.Style["text-align"] = "left";
                        cell.Style["background-color"] = "#ebf0f6";
                    }
                }

                int rowNumber = 0;

                foreach (GridDataItem item in gvServiceItems.MasterTableView.Items)
                {
                    foreach (TableCell cell in item.Cells)
                    {
                        cell.Style["font-family"] = "Arial Unicode MS";
                        cell.Style["font-size"] = "9px";
                        cell.Style["color"] = "black";
                        if (rowNumber.IsEven())
                            cell.Style["background-color"] = "#fff";
                        else
                            cell.Style["background-color"] = "#f3f6f9";

                    }
                    rowNumber++;

                    item.Expanded = true;

 

if (item.HasChildItems)

​

 

 

Any direction would be appreciated.

​

 

Daniel
Top achievements
Rank 1
 answered on 29 Apr 2015
2 answers
135 views

I have the fileexplorer on a screen but when I right click and the context menu pops up Open is missing from the context list.  Double click does work and I have EnableOpenFile="true"  but I would like Open to show in the context menu.

 

Also is there a way to add an open file button to the menu on the top.  There are people who are tring to use the site on tablets amd the double click does not work and a press hold does not seem to provide the right click menu.

Vessy
Telerik team
 answered on 29 Apr 2015
0 answers
97 views

The width of StandardButtons (ButtonType="StandardButton"), SkinnedButtons (ButtonType="SkinnedButton") and LinkButtons (ButtonType="LinkButton") in the Classic render mode of RadButton is unified in the Q2 2015 release of UI for ASP.NET AJAX. As a result, the following changes in the width of the button control will be observed:

  • If you configured a button control with icons, the space between the primary icon and the button text, as well as the space between the button text and the secondary icon could be different and this difference depends on the built-in skin you are currently using.

    For example, the space between the primary icon and the text of a LinkButton in Default skin is 10 pixels smaller than before, resulting in a distance of 9 pixels.

    If this change results in a button width that does not match the desired appearance, you can set an exact button width via the Width property of the control or you can override the built-in CSS rules.

  • The StandardButton now uses border box box sizing (box-sizing: border-box;), which means that any borders you set to the button either via its BorderWidth property or via CSS styles will be included in the total width and height of the control.

    For example, if you have a StandardButton with Width property set to 100px and BorderWidth property set to 1, the total width of the button will now be 100 pixels, instead of 102 pixels.


Telerik Admin
Top achievements
Rank 1
Iron
 asked on 29 Apr 2015
14 answers
1.0K+ views

I have a combination of RadDropDownLists and RadComboBox's on a page, the last RadComboBox is losing it's selection(s) on PostBack. All other RadDropDownLists and RadComboBox's keep their selections on PostBack. What do I need to do to ensure the selections are not lost. I have tried enabling ViewState and several other suggestions found online, but none resolve the issue. Please advise.

ASPX:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CobraStatusTemplate1.aspx.cs" Inherits="CobraStatus.aspx.CobraStatusTemplate1" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <telerik:RadDropDownList ID="rdlProject" runat="server" DefaultMessage="Select Project"
        OnSelectedIndexChanged="rdlProject_SelectedIndexChanged" AutoPostBack="true" Skin="Office2010Black" Enabled="true">
    </telerik:RadDropDownList>
 
    <telerik:RadDropDownList ID="rdlAnalyst" runat="server" DefaultMessage="Select Analyst"
        OnSelectedIndexChanged="rdlAnalyst_SelectedIndexChanged" AutoPostBack="true" Skin="Office2010Black" Enabled="false">
    </telerik:RadDropDownList>
 
    <telerik:RadComboBox ID="rcbControlAccount" runat="server" Text="Select Control Account" CheckBoxes="true"
        EnableCheckAllItemsCheckBox="true" OnSelectedIndexChanged="rcbControlAccount_SelectedIndexChanged" AutoPostBack="true" Skin="Office2010Black"
        Enabled="false">
    </telerik:RadComboBox>
 
    <telerik:RadComboBox ID="rcbEVT" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" AutoPostBack="true" Skin="Office2010Black"
        Enabled="false" OnSelectedIndexChanged="rcbEVT_SelectedIndexChanged">
    </telerik:RadComboBox>
 
    <br />
    <br />
 
    <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" GroupPanelPosition="Top" OnItemDataBound="RadGrid1_ItemDataBound"
        OnPreRender="RadGrid1_PreRender" OnBatchEditCommand="RadGrid1_BatchEditCommand" Width="100%" Skin="Office2010Black">
        <MasterTableView AutoGenerateColumns="False" EditMode="Batch" CommandItemDisplay="Top" Width="100%">
            <CommandItemSettings ShowAddNewRecordButton="False" ShowSaveChangesButton="True" ShowCancelChangesButton="True"></CommandItemSettings>
            <Columns>
                <telerik:GridBoundColumn DataField="Project" HeaderText="Project" SortExpression="Project" UniqueName="Project"
                    FilterControlAltText="Filter Project column" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Ca1" HeaderText="Control Account" SortExpression="Ca1" UniqueName="Ca1"
                    FilterControlAltText="Filter Ca1 column" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Wp" HeaderText="Work Package" SortExpression="Wp" UniqueName="Wp" FilterControlAltText="Filter Wp column"
                    ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Descrip" HeaderText="Description" SortExpression="Descrip" UniqueName="Descrip"
                    FilterControlAltText="Filter Descrip column" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Description" HeaderText="EV Technique" SortExpression="Pmt" UniqueName="Pmt"
                    FilterControlAltText="Filter Pmt column" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FullName" HeaderText="Analyst" SortExpression="C5" UniqueName="C5" FilterControlAltText="Filter C5 column"
                    ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PcComp" HeaderText="% Complete" SortExpression="PcComp" UniqueName="PcComp" DataType="System.Decimal"
                    FilterControlAltText="Filter PcComp column" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Ssd" HeaderText="Baseline Start Date" SortExpression="Ssd" UniqueName="Ssd" DataType="System.DateTime"
                    FilterControlAltText="Filter Ssd column" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Sfd" HeaderText="Baseline Finish Date" SortExpression="Sfd" UniqueName="Sfd" DataType="System.DateTime"
                    FilterControlAltText="Filter Sfd column" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="Asd" HeaderText="Actual Start Date" SortExpression="Asd" UniqueName="Asd" DataType="System.DateTime"
                    FilterControlAltText="Filter Asd column" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="false" HeaderStyle-Width="165px" HeaderStyle-ForeColor="#0000cc">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Afd" HeaderText="Actual Finish Date" SortExpression="Afd" UniqueName="Afd" DataType="System.DateTime"
                    FilterControlAltText="Filter Afd column" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true">
                </telerik:GridBoundColumn>              
                <telerik:GridBoundColumn DataField="UpdPcComp" HeaderText="Updated % Comp" SortExpression="UpdPcComp" UniqueName="UpdPcComp" DataType="System.Decimal"
                    FilterControlAltText="Filter UpdPcComp column" ReadOnly="false" HeaderStyle-ForeColor="#0000cc">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="UpdBy" HeaderText="Updated By" SortExpression="UpdBy" UniqueName="UpdBy"
                    FilterControlAltText="Filter UpdBy column" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="UpdDate" HeaderText="Last Updated" SortExpression="UpdDate" UniqueName="UpdDate" DataType="System.DateTime"
                    FilterControlAltText="Filter UpdDate column" DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
</asp:Content>

C#: 

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace CobraStatus.aspx
{
    public partial class CobraStatusTemplate1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            projects();         
        }
        
        private void projects()
        {
            DataTable dt = new DataTable();
 
            using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["FinanceSystemsApplicationsConnectionString"].ConnectionString))
            {
                con.Open();
 
                SqlCommand cmd = new SqlCommand("SELECT ProgramId FROM csProgram ORDER BY ProgramId", con);
                SqlDataAdapter adapter = new SqlDataAdapter(cmd);
                adapter.Fill(dt);
            }
            rdlProject.DataSource = dt;
            rdlProject.DataTextField = "ProgramId";
            rdlProject.DataValueField = "ProgramId";
            rdlProject.DataBind();
        }
 
        private void analysts()
        {
            string project = rdlProject.SelectedValue;
 
            DataTable dt = new DataTable();
 
            using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["FinanceSystemsApplicationsConnectionString"].ConnectionString))
            {
                con.Open();
 
                SqlCommand cmd = new SqlCommand("SELECT DISTINCT csCawp.C5, csAnalysts.EmployeeId, csAnalysts.FullName FROM csCawp INNER JOIN " +
                         "csAnalysts ON csCawp.C5 = csAnalysts.EmployeeId WHERE Project = '" + project + "'", con);
                SqlDataAdapter adapter = new SqlDataAdapter(cmd);
                adapter.Fill(dt);
            }
            rdlAnalyst.DataSource = dt;
            rdlAnalyst.DataTextField = "FullName";
            rdlAnalyst.DataValueField = "EmployeeId";
            rdlAnalyst.DataBind();
 
        }
 
        private void controlAccount()
        {
            string project = rdlProject.SelectedValue;
            string analyst = rdlAnalyst.SelectedValue;
 
            DataTable dt = new DataTable();
 
            using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["FinanceSystemsApplicationsConnectionString"].ConnectionString))
            {
                con.Open();
 
                SqlCommand cmd = new SqlCommand("SELECT DISTINCT Ca1 FROM CsCAWP WHERE Project = '" + project + "' AND C5 = " + analyst + "", con);
                SqlDataAdapter adapter = new SqlDataAdapter(cmd);
                adapter.Fill(dt);
            }
            rcbControlAccount.DataSource = dt;
            rcbControlAccount.DataTextField = "Ca1";
            rcbControlAccount.DataValueField = "Ca1";
            rcbControlAccount.DataBind();         
        }
 
        private void evt()
        {
            string project = rdlProject.SelectedValue;
            string analyst = rdlAnalyst.SelectedValue;          
 
            DataTable dt = new DataTable();
 
            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["FinanceSystemsApplicationsConnectionString"].ConnectionString))
            {
                string controlAccount = string.Empty;
                for (int i = 0; i < rcbControlAccount.CheckedItems.Count; i++)
                {
                    if (i < rcbControlAccount.CheckedItems.Count - 1)
                    {
                        controlAccount += rcbControlAccount.CheckedItems[i].Value;
                        controlAccount += "'";
                        controlAccount += ",";
                        controlAccount += "'";
                    }
                    else
                    {
                        controlAccount += rcbControlAccount.CheckedItems[i].Value;
                    }
                }
 
                conn.Open();
                
                SqlCommand cmnd = new SqlCommand("SELECT DISTINCT csEVT.Code, csEVT.Description FROM csCawp INNER JOIN csEVT ON csCawp.Pmt = csEVT.Code " +
                    "WHERE csCawp.Project = '" + project + "' AND csCawp.C5 = '" + analyst + "' AND csCawp.Ca1 IN ('" + controlAccount + "')", conn);
                SqlDataAdapter adp = new SqlDataAdapter(cmnd);
                adp.Fill(dt);
            }
            rcbEVT.DataSource = dt;
            rcbEVT.DataTextField = "Description";
            rcbEVT.DataValueField = "Code";
            rcbEVT.DataBind();        
        }
 
 
        protected void rdlProject_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
        {
            analysts();
            rdlAnalyst.Enabled = true;
        }
 
        protected void rdlAnalyst_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
        {
            controlAccount();
            rcbControlAccount.Enabled = true;         
        }
 
        protected void rcbControlAccount_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {     
            evt();
            rcbEVT.Enabled = true;
        }
 
        protected void rcbEVT_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            RadGrid1.Rebind();
        }
 
        public DataTable GetDataTable(string query)
        {
 
            String ConnString = ConfigurationManager.ConnectionStrings["FinanceSystemsApplicationsConnectionString"].ConnectionString;
 
            SqlConnection conn = new SqlConnection(ConnString);
 
            SqlDataAdapter adapter = new SqlDataAdapter();
 
            adapter.SelectCommand = new SqlCommand(query, conn);
 
            DataTable myDataTable = new DataTable();
 
            conn.Open();
 
            try
            {
 
                adapter.Fill(myDataTable);
 
            }
 
            finally
            {
 
                conn.Close();
 
            }
 
            return myDataTable;
 
        }
 
        protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
 
            int rcbCA = rcbControlAccount.CheckedItems.Count;
            int rcbEvt = rcbEVT.CheckedItems.Count;
            if (rdlProject.SelectedValue != "" && rdlAnalyst.SelectedValue != "" && rcbCA > 0 && rcbEvt > 0)          
            {             
                string project = rdlProject.SelectedValue;
                string analyst = rdlAnalyst.SelectedValue;
                string controlAccount = string.Empty;
                for (int i = 0; i < rcbControlAccount.CheckedItems.Count; i++)
                {
                    if (i < rcbControlAccount.CheckedItems.Count - 1)
                    {
                        controlAccount += rcbControlAccount.CheckedItems[i].Value;
                        controlAccount += "'";
                        controlAccount += ",";
                        controlAccount += "'";
                    }
                    else
                    {
                        controlAccount += rcbControlAccount.CheckedItems[i].Value;
                    }
                }
 
                string evt = string.Empty;
                for (int i = 0; i < rcbEVT.CheckedItems.Count; i++)
                {
                    if (i < rcbEVT.CheckedItems.Count - 1)
                    {
                        evt += rcbEVT.CheckedItems[i].Value;
                        evt += "'";
                        evt += ",";
                        evt += "'";
                    }
                    else
                    {
                        evt += rcbEVT.CheckedItems[i].Value;
                    }
                }
               
                RadGrid1.DataSource = GetDataTable("SELECT csCawp.Project, csCawp.Ca1, csCawp.Wp, csCawp.Descrip, csEVT.Description, csAnalysts.FullName, csCawp.PcComp," +
                    "csCawp.Ssd, csCawp.Sfd, csCawp.Asd, csCawp.Afd, csCawp.UpdPcComp, csCawp.UpdDate, csCawp.UpdBy FROM csCawp INNER JOIN csEVT ON csCawp.Pmt = csEVT.Code INNER JOIN " +
                    "csAnalysts ON CsCawp.C5 = csAnalysts.EmployeeId  " +
                   " WHERE PROJECT = '" + project + "' AND Ca1 IN ('" + controlAccount + "') AND Pmt IN ('" + evt + "')");              
            }
        }
 
        protected void Button1_Click(object sender, EventArgs e)
        {
 
        }
 
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                if (item["PcComp"].Text == "0.000000")
                    item.ForeColor = Color.Red;
            }
        }
 
        protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
            
        }
 
        protected void RadGrid1_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
        {
 
        }
        
 
    }
}

 

Thanks in advance,

Josh 

 

Ivan Danchev
Telerik team
 answered on 29 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?