Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
163 views
I'm trying to great a megamenu, using the online demo "Mega-menu" dropdown as a guide. That is, my template is a per-item template, not a global one. 

I've created a throwaway project and copied the demo code pretty closely. But it doesn't work like the demo. The RadSiteMap control is rendered immediately, and the parent "Products" menu item is not visible. In the online demo, the template and RadSiteMap doesn't show until the user hovers over the parent menu item.

I'm a Telerik newbie so I'm sure this is some bone-headed move on my part. Can anyone help?

-BillyB

Billy
Top achievements
Rank 1
 answered on 22 Jun 2012
0 answers
58 views

describe below the steps to reproduce the error

1. Add an RadRibbonBar with handlerEvent in Control Click and add a button
2. Add an RadTextBox control with MultiLine property = 10, ID = "txtTetst"
3. in the Load event Add the following code
if (!IsPostBack)     txtTetst.Text = "Hello!."
4. Run
5. Enter a new value txtTest without leaving the focus of control, click the button of RadRibbonBar added

The value is not updated, this happens to me in Chrome and Opera I think Fatal Error

regards

Giancarlo
Top achievements
Rank 1
 asked on 22 Jun 2012
5 answers
413 views
Is there a way to highlight the current date for the user, regardless of Day, Week, or Month view? I saw a previous thread on how to do this for the Month view by overriding the style of rsTodayCell but that doesn't do anything for Day or Week view.

My initial thought was that highlighting of current date was a pretty standard requirement for a schedule/calendar control, so I am assuming there is a simple way to do this.

Thanks for the help!
Seth
Stephan
Top achievements
Rank 1
 answered on 21 Jun 2012
2 answers
151 views
I had been receiving the above error after upgrading a project from 2.0 to 4.0

I modified these portions of my web.config file and the controls worked properly again.
<system.web>
<assemblies>
        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <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="Telerik.ReportViewer.WebForms, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
        <add assembly="Telerik.Reporting, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
      </assemblies>
    </compilation>
    <httpHandlers>
      <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"/>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
      <add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true" />
    </httpHandlers>
 </system.web>
  

 <system.webServer>
    <handlers>
      <remove name="ChartImage_axd"/>
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_DialogHandler_aspx"/>
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_RadUploadProgressHandler_ashx"/>
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_WebResource_axd"/>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
      <add name="Telerik.ReportViewer.axd_*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" preCondition="integratedMode" />
    </handlers>
  
 </system.webServer>

now the above is not the totality of the web config,  I modified the assemblies and httphandlers under system.web and the handlers under system.webserver.

I wanted to post this here in case someone else experianced the same issue.
Yeroon
Top achievements
Rank 2
 answered on 21 Jun 2012
3 answers
239 views
Ok, so I have a radajaxloading panel showing over a grid, however when I resize the browser window, then radajaxloading panel stays the same size and bleeds over into other parts of the page as shown in the attached image.  Is there any way to make it stay the width of the object it is updating if the browser window is resized?

Thanks,
Nate
Pavlina
Telerik team
 answered on 21 Jun 2012
3 answers
199 views
I have a grid that does everything I need it to (Thanks guys!); except that the active row doesn't highlight... Would someone please look at the grid and let me know what I did wrong please?
<telerik:RadPageView ID="pvLoans" runat="server" Selected="true" Width="100%" >
    <telerik:RadGrid ID="gridLoans" runat="server" AllowAutomaticDeletes="True" Width="100%" 
        AllowSorting="True" AllowMultiRowSelection="True" CellSpacing="0" CellPadding="0"
        PageSize="500" AllowCustomPaging="True" 
        EnableLinqExpressions="false" GridLines="Both" HeaderStyle-Wrap="false"
        AutoGenerateColumns="false" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
         
        ActiveItemStyle-CssClass="Row2"
        ItemStyle-CssClass="Row0"
        AlternatingItemStyle-CssClass="Row1"
         
        OnItemDataBound="grid_ItemDataBound" OnPageIndexChanged="grid_PageIndexChanged"
        OnPageSizeChanged="grid_PageSizeChanged" OnNeedDataSource="grid_NeedDataSource"
        OnInsertCommand="gridLoans_InsertCommmand" OnUpdateCommand="gridLoans_UpdateCommand"
        OnDeleteCommand="gridLoans_DeleteCommand" OnPreRender="gridLoans_PreRender"
        OnGridExporting="gridLoans_GridExporting"
        >
        <ClientSettings allowautoscrollondragdrop="false" allowexpandcollapse="false" allowgroupexpandcollapse="false">
            <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" />
            <Scrolling AllowScroll="false" UseStaticHeaders="true" FrozenColumnsCount="12" ScrollHeight="" />
            <ClientEvents OnGridCreated="grid_GridCreated" OnRowDblClick="RowDblClick" />
            <Resizing AllowResizeToFit="True" EnableRealTimeResize="True" AllowColumnResize="True" AllowRowResize="True" ClipCellContentOnResize="False" ResizeGridOnColumnResize="True" />
        </ClientSettings>
        <ExportSettings IgnorePaging="true" ExportOnlyData="true" Excel-Format="ExcelML" />
        <MasterTableView EditMode="EditForms" CommandItemDisplay="None" DataKeyNames="LoanID" ClientDataKeyNames="LoanID" GridLines="Both">
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1" />
            </EditFormSettings>
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <Columns>
                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" DataType="System.Boolean" Visible="true" Display="true" DataTextField="LoanSelected" />
                 
                <telerik:GridButtonColumn ConfirmText="Are you certian you want to hide this Loan?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Hide" ButtonType="ImageButton" ImageUrl="~/Images/remove_16.png"
                    CommandArgument="LoanID" CommandName="gridLoans_DeleteCommand"
                    Text="Hide" UniqueName="HideColumn" ItemStyle-HorizontalAlign="Center">
                </telerik:GridButtonColumn>
                 
                <telerik:GridNumericColumn DataField="LoanNumber" FilterControlAltText="Filter LoanNumber column"
                    HeaderStyle-Wrap="true" HeaderText="LOAN NUMBER" SortExpression="LoanNumber"
                    UniqueName="LoanNumber" Visible="false" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
 
                <telerik:GridNumericColumn DataField="NCLPercentage" FilterControlAltText="Filter NCLPercentage column"
                        HeaderStyle-Wrap="true" HeaderText="NCL%" SortExpression="NCLPercentage" NumericType="Percent"
                        UniqueName="NCLPercentage" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="RECPercentage" FilterControlAltText="Filter RECPercentage column"
                        HeaderStyle-Wrap="true" HeaderText="REC%" SortExpression="RECPercentage" NumericType="Percent"
                        UniqueName="RECPercentage" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="DefaultProbability" FilterControlAltText="Filter DefaultProbability column"
                        HeaderStyle-Wrap="true" HeaderText="DEFALT PROB" SortExpression="DefaultProbability"
                        UniqueName="DefaultProbability" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="DiscountPercentage" FilterControlAltText="Filter DiscountPercentage column"
                        HeaderStyle-Wrap="true" HeaderText="DISC%" SortExpression="DiscountPercentage" NumericType="Percent"
                        UniqueName="DiscountPercentage" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="PurchasePrice" NumericType="Currency" FilterControlAltText="Filter PurchasePrice column"
                    HeaderText="PURCHASE PRICE" SortExpression="PurchasePrice"
                    UniqueName="PurchasePrice">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="ReservePayments" FilterControlAltText="Filter ReservePayments column"
                        HeaderStyle-Wrap="true" HeaderText="RES PMTS" SortExpression="DiscountPercentage" NumericType="Number"
                        UniqueName="ReservePayments" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="ReservePercentage" FilterControlAltText="Filter ReservePercentage column"
                        HeaderStyle-Wrap="true" HeaderText="RES%" SortExpression="ReservePercentage" NumericType="Percent"
                        UniqueName="ReservePercentage" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="NumberOfPaidPayments" FilterControlAltText="Filter NumberOfPaidPayments column"
                        HeaderStyle-Wrap="true" HeaderText="#PD PMTS" SortExpression="NumberOfPaidPayments" NumericType="Number"
                        UniqueName="NumberOfPaidPayments" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="Recourse" FilterControlAltText="Filter Recourse column"
                        HeaderStyle-Wrap="true" HeaderText="RECOURSE" SortExpression="Recourse"
                        UniqueName="Recourse" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridBoundColumn DataField="PS_Acct_No" MaxLength="250" FilterControlAltText="Filter PS_Acct_No column"
                        HeaderStyle-Wrap="true" HeaderText="PS ACCT" SortExpression="PS_Acct_No"
                        UniqueName="PS_ACCT_NO" HeaderStyle-Font-Bold="true" Visible="true" ReadOnly="true">
                        <HeaderStyle Font-Bold="true" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ShortName" MaxLength="250" FilterControlAltText="Filter ShortName column"
                        HeaderStyle-Wrap="true" HeaderText="SHORT NAME" SortExpression="ShortName"
                        UniqueName="ShortName" HeaderStyle-Font-Bold="true" Visible="true" ReadOnly="true">
                        <HeaderStyle Font-Bold="true" />
                        <ItemStyle HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LoanType" FilterControlAltText="Filter LoanType column"
                        HeaderStyle-Wrap="true" HeaderText="LN TYPE" SortExpression="LoanType" UniqueName="LoanType"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="OriginationDate" DataFormatString="{0:MM/dd/yyyy}"
                        FilterControlAltText="Filter OriginationDate column" HeaderStyle-Wrap="true"
                        HeaderText="ORIGIN DTE" SortExpression="OriginationDate" UniqueName="OriginationDate"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridDateTimeColumn>
                <telerik:GridNumericColumn DataField="AmountFinanced" NumericType="Currency"
                        FilterControlAltText="Filter AmountFinanced column" HeaderStyle-Wrap="true"
                        HeaderText="AMT FIN" SortExpression="AmountFinanced" UniqueName="AmountFinanced"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="Apr" NumericType="Percent" FilterControlAltText="Filter Apr column"
                        HeaderStyle-Wrap="true" HeaderText="APR" SortExpression="Apr" UniqueName="Apr"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="Term" FilterControlAltText="Filter Term column"
                        HeaderStyle-Wrap="true" HeaderText="TERM" SortExpression="Term" UniqueName="Term"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="PaymentAmount" NumericType="Currency" FilterControlAltText="Filter PaymentAmount column"
                        HeaderStyle-Wrap="true" HeaderText="PMT AMT" SortExpression="PaymentAmount" UniqueName="PaymentAmount"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridDateTimeColumn DataField="FirstPrincipalPaymentDate" DataFormatString="{0:MM/dd/yyyy}"
                        FilterControlAltText="Filter FirstPrincipalPaymentDate column" HeaderStyle-Wrap="true"
                        HeaderText="FST PRN PMT DT" SortExpression="FirstPrincipalPaymentDate" UniqueName="FirstPrincipalPaymentDate"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                    <ItemStyle Font-Italic="False" />
                </telerik:GridDateTimeColumn>
                <telerik:GridDateTimeColumn DataField="NextPrincipalPaymentDate" DataFormatString="{0:MM/dd/yyyy}"
                        FilterControlAltText="Filter NextPrincipalPaymentDate column" HeaderStyle-Wrap="true"
                        HeaderText="NXT PRN PMT DT" SortExpression="NextPrincipalPaymentDate" UniqueName="NextPrincipalPaymentDate"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridDateTimeColumn>
                <telerik:GridNumericColumn DataField="DaysPastDue" NumericType="Number" DecimalDigits="0" FilterControlAltText="Filter DaysPastDue column"
                        HeaderStyle-Wrap="true" HeaderText="DYS PAST DUE" SortExpression="DaysPastDue"
                        UniqueName="DaysPastDue" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="PayOff" NumericType="Currency" FilterControlAltText="Filter PayOff column"
                        HeaderStyle-Wrap="true" HeaderText="PAY OFF AMT" SortExpression="PayOff"
                        UniqueName="PayOff" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="PrincipleBalance" NumericType="Currency" FilterControlAltText="Filter PrincipleBalance column"
                        HeaderStyle-Wrap="true" HeaderText="PRIN BAL" SortExpression="PrincipleBalance"
                        UniqueName="PrincipleBalance" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="AccruedInterestAmount" NumericType="Currency"
                        FilterControlAltText="Filter AccruedInterestAmount column" HeaderStyle-Wrap="true"
                        HeaderText="ACCRUED INT" SortExpression="AccruedInterestAmount" UniqueName="AccruedInterestAmount"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="LastPaymentAmount" NumericType="Currency" FilterControlAltText="Filter LastPaymentAmount column"
                        HeaderStyle-Wrap="true" HeaderText="LST PMT AMT" SortExpression="LastPaymentAmount"
                        UniqueName="LastPaymentAmount" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridDateTimeColumn DataField="LastPaymentDate" DataFormatString="{0:MM/dd/yyyy}"
                        FilterControlAltText="Filter LastPaymentDate column" HeaderStyle-Wrap="true"
                        HeaderText="LST PMT DT" SortExpression="LastPaymentDate" UniqueName="LastPaymentDate"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridDateTimeColumn>
                <telerik:GridNumericColumn DataField="TotalPaymentsCount" FilterControlAltText="Filter TotalPaymentsCount column"
                        HeaderStyle-Wrap="true" HeaderText="TTL PMTS CNT" SortExpression="TotalPaymentsCount" Visible = "false"
                        UniqueName="TotalPaymentsCount" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridNumericColumn DataField="TotalPaymentsCountCalc" NumericType="Number" DecimalDigits="0" FilterControlAltText="Filter TotalPaymentsCountCalc column"
                        HeaderStyle-Wrap="true" HeaderText="TTL PYMTS CNT CALC" SortExpression="TotalPaymentsCountCalc"
                        UniqueName="TotalPaymentsCountCalc" Visible="false" ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridNumericColumn>
                <telerik:GridCheckBoxColumn DataField="isPledegEligible" FilterControlAltText="isPledegEligible" Visible = "false"
                        HeaderStyle-Wrap="true" HeaderText="isPledegEligible" SortExpression="isPledegEligible" UniqueName="isPledegEligible"
                        ReadOnly="true">
                    <HeaderStyle Wrap="True" />
                </telerik:GridCheckBoxColumn>
            </Columns>
            <ItemStyle CssClass="Row0" />
            <AlternatingItemStyle CssClass="Row1" />
        </MasterTableView>
        <FilterMenu EnableImageSprites="false" />
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default" />
        <HeaderStyle Wrap="False" />
        <FilterMenu EnableImageSprites="false" />
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
</telerik:RadPageView>

The CSS is:
div.RadGrid .rgDataDiv
{
    font: normal 13px arial;
    /* height: auto !important; */
}
 
div.RadGrid .Row0 td
{
    padding-top: 0;
    padding-bottom: 0;
    height: 1px;
    vertical-align: middle;
    border: 1 solid black;
    font: normal 10px arial;
    color: Black;
    background: #FFFFFF;    /* White */
}
div.RadGrid .Row1 td
{
    padding-top: 0;
    padding-bottom: 0;
    height: 1px;
    vertical-align: middle;
    border: 1 solid black;
    font: normal 10px arial;
    color: Black;
    background: #DFC5DF;    /* Lite Grey */
}
div.RadGrid .Row2 td
{
    padding-top: 0;
    padding-bottom: 0;
    height: 1px;
    vertical-align: middle;
    border: 1 solid black;
    font: normal 10px arial;
    color: Black;
    background: #CCFF99;    /* Parchment */
}
 
div.RadGrid tr.Row0
{
    padding-top: 0;
    padding-bottom: 0;
    height: 1px;
    vertical-align: middle;
    border: 1 solid black;
    font: normal 10px arial;
    color: Black;
    background: #FFFFFF;    /* White */
}
div.RadGrid tr.Row1
{
    padding-top: 0;
    padding-bottom: 0;
    height: 1px;
    vertical-align: middle;
    border: 1 solid black;
    font: normal 10px arial;
    color: Black;
    background: #DFC5DF;    /* Lite Grey */
}
div.RadGrid tr.Row2 td
{
    padding-top: 0;
    padding-bottom: 0;
    height: 1px;
    vertical-align: middle;
    border: 1 solid black;
    font: normal 10px arial;
    color: Black;
    background: #CCFF99;    /* Parchment */
}

Thanks for your help!



Galin
Telerik team
 answered on 21 Jun 2012
3 answers
251 views
Hello
I have a problem to solve
please, refer to this test page
1. select the item from the combo
2. in the top grid, select the 3rd row (year 2007) for edit items
3. look at the first combo (access): if the user selects PUBLIC, then the other combos (So, the question is: how can I access the combos from client side?
Here is the aspx section for the radgrid:
<telerik:RadGrid ID="gridPolicy" runat="server"
        AutoGenerateColumns="False" CellSpacing="0" DataSourceID="sqlDataPol"
        GridLines="None" OnItemDataBound="gridPolicy_OnItemDataBound" OnEditCommand="gridPolicy_OnEditCommand" Skin="Windows7" AllowFilteringByColumn="false" AllowPaging="true" PageSize="7" AllowAutomaticUpdates="true">
<MasterTableView DataKeyNames="polID" AllowFilteringByColumn="false">
    <Columns>
       <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn DataField="year"
            FilterControlAltText="Filter column column" UniqueName="year" HeaderText="Year" ItemStyle-Width="20px" ReadOnly="true">
        </telerik:GridBoundColumn>
         
        <telerik:GridDropDownColumn DataField="access" UniqueName="access" ListTextField="acc" ListValueField="acc" DropDownControlType="RadComboBox" HeaderText="access" EmptyListItemText="Select" EmptyListItemValue="" DataSourceID="SqlDataSource5">
        </telerik:GridDropDownColumn>
        <telerik:GridDropDownColumn DataField="uso" UniqueName="uso" ListTextField="puse" ListValueField="puse" DropDownControlType="RadComboBox" HeaderText="Data use" EmptyListItemText="Select" EmptyListItemValue="" DataSourceID="SqlDataSource3">
        </telerik:GridDropDownColumn>
        <telerik:GridDropDownColumn DataField="pi1" UniqueName="pi1" ListTextField="prjname" ListValueField="prjname" DropDownControlType="RadComboBox" HeaderText="PI Access #1" EmptyListItemText="Select" EmptyListItemValue="" DataSourceID="SqlDataSource4">
        </telerik:GridDropDownColumn>
        <telerik:GridDropDownColumn DataField="pi2" UniqueName="pi2" ListTextField="prjname" ListValueField="prjname" DropDownControlType="RadComboBox" HeaderText="PI Access #2" EmptyListItemText="Select" EmptyListItemValue="" DataSourceID="SqlDataSource4">
        </telerik:GridDropDownColumn>
        <telerik:GridDropDownColumn DataField="pi3" UniqueName="pi3" ListTextField="prjname" ListValueField="prjname" DropDownControlType="RadComboBox" HeaderText="PI Access #3" EmptyListItemText="Select" EmptyListItemValue="" DataSourceID="SqlDataSource4">
        </telerik:GridDropDownColumn>
        <telerik:GridDropDownColumn DataField="Fluxnet" UniqueName="Fluxnet" ListTextField="FluxnetType" ListValueField="FluxnetType" DropDownControlType="RadComboBox" HeaderText="Fluxnet" EmptyListItemText="Select" EmptyListItemValue="" DataSourceID="SqlDataSource6">
        </telerik:GridDropDownColumn>
    </Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
<ClientSettings>
    <ClientEvents OnCommand="OnCommand" />
</ClientSettings>
    </telerik:RadGrid>
Here is the codebehind section (not optimized...):
protected void gridPolicy_OnItemDataBound(object sender, GridItemEventArgs e)
       {
           string[] pis = { "pi1", "pi2", "pi3" };
           if ((e.Item is GridEditFormItem))
           {
                
               GridEditFormItem edititem = (GridEditFormItem)e.Item;
               GridEditManager editMan = edititem.EditManager;
               if (e.Item.IsInEditMode)
               {
                   if (edititem.ParentItem["Fluxnet"].Text == "Free")
                   {
                       edititem["Fluxnet"].Enabled = false;
                   }
                   else
                   {
                       GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("Fluxnet"));
                       RadComboBox combo = editor.ComboBoxControl;
                       combo.OnClientSelectedIndexChanged = "setValue";
                   }
                   if (edititem.ParentItem["access"].Text == "Public")
                   {
                       edititem["access"].Enabled = false;
                   }
                   else
                   {
                       GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("access"));
                       RadComboBox combo = editor.ComboBoxControl;
                       combo.OnClientSelectedIndexChanged = "setValue";
                   }
                   if (edititem.ParentItem["uso"].Text == "Open")
                   {
                       edititem["uso"].Enabled = false;
 
                   }
                   else
                   {
                       GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("uso"));
                       RadComboBox combo = editor.ComboBoxControl;
                       combo.OnClientSelectedIndexChanged = "setValue";
                   }
                   for (int i = 0; i < pis.Length; i++)
                   {
                       if (edititem.ParentItem[pis[i]].Text == "xxxxxxxxxxxx")
                       {
                           edititem[pis[i]].Enabled = false;
                       }
                       else
                       {
                            
                           GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor(pis[i]));
                           RadComboBox combo = editor.ComboBoxControl;
                           combo.OnClientSelectedIndexChanged = "setValue";
                       }
                        
                   }
               }
               else
               {
                    
                   for (int i = 0; i < pis.Length; i++)
                   {
 
                       if (edititem[pis[i]].Text == "xxxxxxxxxxxx")
                       {
                           edititem[pis[i]].BorderColor = System.Drawing.Color.LightBlue;
                           //Response.Write(edititem["year"].Text + " PIS " + i + " xxx<br />");
                       }
                       else
                       {
                           //Response.Write(edititem["year"].Text + " PIS " + i + " " + (edititem[pis[i]].Text.Trim().Length) + "<br />");
                            
 
                       }
                       
                   }
               }
           }
            
       }


and finally the javascript code:
<script type="text/javascript">
        var unique = new Array("access", "uso", "pi1", "pi2", "pi3", "Fluxnet");
        var oldVal = new Array("", "", "", "", "", "");
        var grid;
        var mtable;
        var index;
 
        function setValue(sender, args) {
            
            grid = $find("<%=gridPolicy.ClientID %>");
            mtable = grid.get_masterTableView();
 
            var _sender = sender.get_id();
            var value=args.get_item().get_value();
            if (_sender.indexOf("access") >= 0) {
                if (value == "Public") {
                    alert("PI a XXXX");
                     
                }
                else {
                    alert("Libera PI");
                }
            }
            else if (_sender.indexOf("uso") >= 0) {
                if (value == "Open") {
                    alert("FLUX FREE");
                }
                else {
                    alert("reset flux");
                }
            }
        }
 
        function OnCommand(sender, eventArgs) {
            index = eventArgs.get_commandArgument();
            grid = $find("<%=gridPolicy.ClientID %>");
            mtable = grid.get_masterTableView();
            var cmd = eventArgs.get_commandName();
            if (cmd == "Edit") {
                 
                var row = mtable.get_dataItems()[index];
                for (i = 2; i < mtable.get_columns().length; i++) {
                    var cell = mtable.getCellByColumnUniqueName(row, unique[i-2]);
                    var val=cell.innerHTML.toString();
                    if (val.indexOf("&") >= 0) {
                        val="";
                    }
                    oldVal[i - 2] = cell.innerHTML;
                }
 
            }
        }
    </script>

 thanks in advance
diego
diego
Top achievements
Rank 1
 answered on 21 Jun 2012
2 answers
301 views
Hello,

I have a couple of issues with my new message notification.  First, calling the code-behind .show() method in the CallBackUpdate event does not seem to do anything.  I had to use the javascript method shown in the Notification / Update on interval demo, and that works.

Secondly and more importantly, when the notification is displayed, normally it disappears after the AutoCloseDelay (7 secs) has elapsed.  This is fine, unless the user mouses over the notification if they want to read it longer.  The notification itself remains, but after the UpdateInterval (10 secs) elapses, the .Text value of the LinkButton control in the ContentTemplate is wiped out.  Does it not persist in the viewstate?  Not sure how to work around this.  Once the notification is shown, the data is flagged as such so that it does not show again.

Thanks,
Dan

<script type="text/javascript">
function OnClientUpdated(sender, args) {
    var newMsgs = sender.get_value();
    if (newMsgs != 0) {
        sender.show();
    }
}
     
</script>

<telerik:RadNotification ID="RadNotification1" runat="server" Width="330px" Height="75px" OnClientUpdated="OnClientUpdated" ContentIcon="" TitleIcon="~/App_Themes/MainTheme/images/message_16.png" Title="New Message(s)" LoadContentOn="TimeInterval" UpdateInterval="10000" Animation="Fade" AutoCloseDelay="7000" OffsetX="-10" OffsetY="-35">
<ContentTemplate>
<asp:LinkButton ID="lbNotification" runat="server" PostBackUrl="~/Messages.aspx" CssClass="msg"></asp:LinkButton>
</ContentTemplate>
</telerik:RadNotification>

Protected Sub RadNotification1_CallbackUpdate(sender As Object, e As Telerik.Web.UI.RadNotificationEventArgs) Handles RadNotification1.CallbackUpdate
 
    Dim MsgFrom As String = ""
    Dim Regarding As String = ""
    Dim Message As String = ""
 
    If CheckForMessages(MsgFrom, Regarding, Message) Then
        Message = Replace(Message, "<br>", " ")
        Message = IIf(Len(Message) > 60, Left(Message, 60) & "...", Message)
 
        lbNotification.Text = "<b>" & MsgFrom & "</b><br>" & _
                              Regarding & "<br>" & _
                              Message
        RadNotification1.Value = 1
    Else
        RadNotification1.Value = 0
    End If
 
End Sub

Dan
Top achievements
Rank 1
 answered on 21 Jun 2012
1 answer
96 views
Hi,
i have style out buttons using the below css classes.  They seem to work well across all browsers in standards mode; except for when click on in internet explorer 9 (unsure if its all IE or just 9).  The hover all works find and dandy no problems but as soon as the button is clicked the background disappears?

a.Button.RadButton,
a.rbSkinnedButton.Button:hover, /*  0 3 1   */
a.RadButton_Outlook.rbSkinnedButton, /*  0 2 1    */
a.RadButton_Outlook.rbVerticalButton, /*   0 2 1   */
a.RadButton_Outlook .rbSplitRight, /*  0 2 1     */
a.RadButton_Outlook .rbSplitLeft /*   0 2 1   */
{
    background-image: url('/Common/Images/buttonSprite.png');
    background-position: 100% -25px;
    height: 21px;
    display: inline-block;
    padding-right: 4px;
}
.rbSkinnedButton:hover .rbDecorated, /* 0 3 0 */
.RadButton_Outlook.rbVerticalButton .rbDecorated, /* 0 3 0 */
.RadButton_Outlook.rbSkinnedButton, /*  0 2 0    */
.RadButton_Outlook .rbDecorated, /*  0 2 0    */
.RadButton_Outlook.rbVerticalButton, /*  0 2 0    */
.RadButton_Outlook .rbSplitRight, /* 0 2 0     */
.RadButton_Outlook .rbSplitLeft /*  0 2 0    */
 {
        background-image: url('/Common/Images/buttonSprite.png');
        background-position: 0% 0%;
        padding-right: 2px;
        height: 21px;
        margin-right: 0px;
        box-sizing: border-box;
        color: white;
}

Please help,
Thanks,
Michael
Slav
Telerik team
 answered on 21 Jun 2012
1 answer
101 views
I have an issue with the combo boxes when either the app pool is recycled or a new build is deployed. If a user is on a page with a combobox and while working on it back at the server the app pool recycles or a new build is deployed when they then post back to the server the SelectedItem is null in the server code. The Text property still has its value however. I have spent a large amount of time trying to figure out why it does this. So my question is this by design? Does the combobox use either session or such behind the scenes and when the app recycles it is lost?

I am not posting code, but if you take a page with a combox box, a button and put it in a IIS web site you can then reproduce it. Simply got to the page and while on it recycle the app pool and then submit the form. Try then to access the selected item and you will see its null while the Text has a value.

Short of never doing recycles I am not sure what to do to prevent this. Thanks.
James Daresta
Top achievements
Rank 1
 answered on 21 Jun 2012
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?