Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
184 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
177 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
231 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
277 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
75 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
94 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
1 answer
63 views
Im using a RadMenu in an SSL site.  The menu does not render correctly.  It works fine on my developement computer and ive used the control successfully on non SSL sites.  Is there something special I need to do ?
Kate
Telerik team
 answered on 21 Jun 2012
1 answer
85 views
Hello,

I have a radgrid that a populate using the ItemDataBound event with my own Object (called 'ConfigurationValueObject'). Mapping its properties and displaying the grid is no problem, however I want to use the GroupByExpressions property to group all data using the property 'Category' in my object. When I add the code:

<GroupByExpressions>
    <telerik:GridGroupByExpression>
        <GroupByFields>
            <telerik:GridGroupByField FieldName="Category" />
        </GroupByFields>
    </telerik:GridGroupByExpression>                           
</GroupByExpressions>

I receive the following error:

No property or field 'Category' exists in type 'ConfigurationValueObject'


But I know this object does have this (public) property. What I am doing wrong?
Tim
Top achievements
Rank 1
 answered on 21 Jun 2012
5 answers
179 views
How to refresh page after manual close of RadToolTipManager ? We Created page that using radtooltipmanager .Inside RadToolTip ,we have to save data and want to refresh the page after saving the data. These RadTooltip is inside RadLisView.

Please anybody help me ? I really appreciate .Thanks for yours consideration.
Marin Bratanov
Telerik team
 answered on 21 Jun 2012
0 answers
119 views

Hello,

I have a web forms application, which has a page with a Telerik RadGrid. This grid is bound using the NeedDataSource event and I have changed most of the columns to CustomFilteringColumns. In one of them I am using a line like this one:

((GridFilteringItem) ((filterControl).Parent)).FireCommandEvent("Filter", new Pair("Custom", "Status"));

 

to filter the orders that this grid contains. Since there are quite a few of them /more than 1000/ I get an error

‘
Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.’

I understand that one possible way to fix that is to use a linq query with a where clause, which will serve as a filter.

My questions are: what is the best way to solve this problem? If it is using linq, how should I implement this filter?

Ivan
Top achievements
Rank 1
 asked on 21 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?