Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
Hello,

I am writing an application in which I want to browse a default UNC path (and subdirectories) to select a file, at which point the file path and name would reside in the text box  (standard text box and button to browse for a file).  I want the allowed file extensions that may be viewed to be CSV,TXT and do not want the user to see any other extensions when browsing for a file.

I do not need to actually upload the file, as my process would be to take the contents of the text box containing the file path and name and store that info into a table (there is a back-end process that will pick up the file and load it).

I am not sure which control to use (asyncupload, upload, or filelocation) since I only need to select the file.

Is there an example of something like what I am attempting to do and a recommendation for the type of control?

Thanks,
Peter Filipov
Telerik team
 answered on 15 Apr 2011
1 answer
97 views
Hi ALL,

         I have to implement headercontextmenu to radgrid header, for that i had set property of RadGrid HeaderContextMenu as true.

        
Now, i want to make some customized modification on same.

         I want to show/hide GroupBy and Ungroup menu item as per user selection, that i did, but problem is when GroupBy  and UnGroup menu item get hide seperator still there, now i want to hide that separator also.

         Second for "Column" menu item i got all my database fields in submenu list, like Id,FirstName,LastName,DOB now what i want i want to display only such type of fields not all, like i dont want to display ID field in submenu of Column menu item.

         Please help me on same.
Mira
Telerik team
 answered on 15 Apr 2011
10 answers
222 views
I seem to be having issues with the advanced form on the radscheduler causing the page to freeze when the save or cancel buttons are clicked.  The advanced form does not close, and the ajax loading panel displays the updating graphic, but the scheduler does not update.

This issue seems to occur consistently with all attempts to use the scheduler.  I first tried to adapt the Outlook scheduler example, and then tried again this morning with a basic scheduler scenario and encountered the same issue.

The examples work fine when run on my local machine, so could it be some server configuration issue with our production server that might be causing this?

The production server is a Windows 2003 / IIS 6 setup.
Veronica
Telerik team
 answered on 15 Apr 2011
1 answer
88 views
in the Editor, click on the Image Manager tool, then click "Upload",
uncheck "Overwrite if file exists?".
If I upload three existing files, I get an alert dialog with three times of "A file with a name same as the target already exists!".

Is there a way to only display one error message "A file with a name same as the target already exists!"?

I found a post and it seems like the solution doesn't work for me or maybe I miss something.
http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/alert-on-file-exists-is-multiplied-with-the-number-of-uploads.aspx

I'm using custom control which inherited from RadEditor.
I tried to add the following code in the custom control, but rfe is always null.

protected override void EnsureChildControls()
......
Telerik.Web.UI.RadFileExplorer rfe =
                (Telerik.Web.UI.RadFileExplorer)this.FindRadControl(this.Page);
            if (rfe != null)
            {
                rfe.ItemCommand += new RadFileExplorerEventHandler(radFileExplorer_ItemCommand);
            }
}

private Control FindRadControl(Control parent)
        {
            foreach (Control c in parent.Controls)
            {
                if (c is Telerik.Web.UI.RadFileExplorer) return c;
                if (c.Controls.Count > 0)
                {
                    Control sub = FindRadControl(c);
                    if (sub != null) return sub;
                }
            }
            return null;
        }

protected void radFileExplorer_ItemCommand(object sender, RadFileExplorerEventArgs e)
        {
            switch (e.Command)
            { 
                case "UploadFile":
                    //should I check the existence here?
                    break;
                default:
                    break;
            }
        }
Rumen
Telerik team
 answered on 15 Apr 2011
1 answer
165 views

Hi,

I have an autocomplete combobox within a radgrid. The combobox is fed directly from a Web service. When I move this combobox outside the grid it works fine. Is there some issue with having AJAX fed controls inside a grid?

function OnClientItemsRequesting(sender, eventArgs)
   {
       var context = eventArgs.get_context();
       context["FilterString"] = eventArgs.get_text();       
   }
<radG:RadGrid runat="server" AutoGenerateColumns="false" ShowFooter="true"  CssClass="bodyCopy" ID="RadGrid1" AllowPaging="True" AllowSorting="True" EnableAJAX="true"
                              OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated"
                              OnItemCommand="RadGrid1_ItemCommand" Width="800px" EditItemStyle-VerticalAlign="Top">
                          <PagerStyle Mode="NumericPages" />
                          <MasterTableView DataKeyNames="J_ID" Width="800px" CommandItemDisplay="Top" PageSize="18"
                              EditMode="InPlace" >
                      <Columns>
                        
                          <radG:GridTemplateColumn UniqueName="Date" SortExpression="Date" HeaderText="Date">
                              <ItemTemplate>
                                  <asp:Label ID="lblDate" runat="Server"></asp:Label>
                              </ItemTemplate>
                              <EditItemTemplate>
                                  <asp:DropDownList ID="ddlDateEdit" runat="Server"></asp:DropDownList>
                              </EditItemTemplate>
                          </radG:GridTemplateColumn
                          <radG:GridTemplateColumn UniqueName="Description" SortExpression="Description" HeaderText="Description">
                              <ItemTemplate>
                                  <asp:Label ID="lblDescription" ForeColor="black" runat="Server"></asp:Label>
                              </ItemTemplate>
                              <EditItemTemplate>
                                  <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Rows="2" Width="180px"></asp:TextBox
                              </EditItemTemplate>
                          </radG:GridTemplateColumn
                           <radG:GridTemplateColumn UniqueName="Hours" SortExpression="Hours" HeaderText="Hours">
                              <ItemTemplate>
                                  <asp:Label ID="lblHours" runat="Server"></asp:Label>
                              </ItemTemplate>
                              <FooterTemplate><asp:Label runat="server" ID="lblTotals"></asp:Label></FooterTemplate>
                              <EditItemTemplate>
                                  <asp:TextBox ID="txtHours" runat="server" Width="30px"></asp:TextBox
                              </EditItemTemplate>
                          </radG:GridTemplateColumn
                          <radG:GridTemplateColumn UniqueName="J_JobCode" SortExpression="Hours" HeaderText="Job">
                              <ItemTemplate>
                                  <asp:Label ID="lblJobCode" runat="Server"></asp:Label>
                              </ItemTemplate>
                              <EditItemTemplate>
                                    <telerik:RadComboBox ID="radJCSearch" runat="server" DropDownWidth="300px" EnableLoadOnDemand="true"
                                                  Height="190px" OnClientItemsRequesting="OnClientItemsRequesting" Width="300px"
                                                  CausesValidation="False" ExpandDelay="500" HighlightTemplatedItems="True" OpenDropDownOnLoad="False"
                                                  DataValueField="JC_ID" EmptyMessage="Type code to start search"
                                                  EnableVirtualScrolling="True" ItemRequestTimeout="500" ShowDropDownOnTextboxClick="True"
                                                          ShowToggleImage="False" ShowWhileLoading="False" >
                                              <WebServiceSettings Method="GetJobCodes" Path="JobCodes.asmx" />
                                              <CollapseAnimation Duration="200" Type="OutQuint" />
                                  </telerik:RadComboBox>
                                   
                              </EditItemTemplate>
                          </radG:GridTemplateColumn
                           <radG:GridTemplateColumn UniqueName="Date" ItemStyle-Width="25px" SortExpression="Date" HeaderText="Delete">
                              <ItemTemplate>
                                  <asp:LinkButton ID="lnkNonEditDelete" ToolTip="Delete Job" runat="server" CausesValidation="false" ><img src="delete.gif" border="0" /></asp:LinkButton>
                              </ItemTemplate>
                              <EditItemTemplate>
                                    
                              </EditItemTemplate>
                          </radG:GridTemplateColumn
                          <radG:GridEditCommandColumn  ItemStyle-Width="30px" UniqueName="UpdateColumn" ><ItemStyle CssClass="edit" /></radG:GridEditCommandColumn>                                                        
                            
                      </Columns>                                                
                      </MasterTableView
                                                                       
                    </radG:RadGrid>
Kalina
Telerik team
 answered on 15 Apr 2011
6 answers
220 views
I am using the the RadDataPager with the ListView. To do some validation before they change pages I need to know when the user clicks to change the page. I saw in the documentation there is the event OnPageIndexChanging. However, it never seems to fire when clicked. Here is what I have. Note I am using ajax manager with the outlying panel. Thanks in advance.

<asp:Panel ID="pForecastCardView_Panel" runat="server">
<telerik:RadListView ID="rlvForecastCardView_Item" runat="server" Width="100%" 
    AllowPaging="true" ItemPlaceholderID="ItemHolder" 
    DataKeyNames="ForecastID,CustomerId,MaterialGroup.MaterialGroupNo,Region.Id,AccountManagerUserName,TradingPartner.TradingPartnerNo,AccountName"
    PageSize="1"
    ValidationSettings-ValidationGroup="vgMainForm"
    onneeddatasource="rlvForecastCardView_Item_NeedDataSource" 
    onitemdatabound="rlvForecastCardView_Item_ItemDataBound" 
    onitemcommand="rlvForecastCardView_Item_ItemCommand" 
        ondatabound="rlvForecastCardView_Item_DataBound" 
        onpageindexchanged="rlvForecastCardView_Item_PageIndexChanged">
    <LayoutTemplate>
         <asp:Panel ID="ItemHolder" runat="server" />
        <telerik:RadDataPager ID="rdpForecastCardView_ItemPager" runat="server" PagedControlID="rlvForecastCardView_Item" Font-Size="9pt" 
            PageSize="1" Visible='<%# (!_pdfRender) %>' >
            <ClientEvents OnPageIndexChanging="rdpForecastCardView_ItemPager_OnPageIndexChanging" />
            <Fields>
                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                <telerik:RadDataPagerButtonField FieldType="Numeric" />
                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                <telerik:RadDataPagerTemplatePageField>
                    <PagerTemplate>
                        <table width="100%" cellpadding="0" cellspacing="0" class="TableFullWidth">
                            <tr>
                                <td>
                                    <telerik:RadButton ID="btnSaveNext" runat="server" Text="Save & Next" CommandName="SaveNext" Icon-PrimaryIconUrl="../images/icons/save16x16.gif"></telerik:RadButton>
                                </td>
                                <td align="right">
                                <b>
                                <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" /></b>
                                of
                                <b>
                                <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                </b>
                                items
                                </td>
                            </tr>
                        </table>
                    </PagerTemplate>
                </telerik:RadDataPagerTemplatePageField>
            </Fields>
        </telerik:RadDataPager>
    </LayoutTemplate>
    <ItemTemplate>
        <table class="ContentTableBordered TableFullWidth" cellspacing="0" cellpadding="4">
            <tr>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lRegionLabel" runat="server" Text="Region" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lTradingPartnerLabel" runat="server" Text="Trading Partner" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lAccountNameLabel" runat="server" Text="Account Name" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lMasterShipToIdLabel" runat="server" Text="Master Ship No" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lCityLabel" runat="server" Text="City" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lStateLabel" runat="server" Text="State" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lAccountManagerLabel" runat="server" Text="Account Manager" ViewStateMode="Disabled"></asp:Literal></td>
            </tr>
            <tr>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("Region.Description") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("TradingPartner.Name") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("AccountName") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# (Eval("MasterShipToId") != null ? Eval("MasterShipToId").ToString().RemoveLeadingZerosFromSAPID() : "") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("City") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("State.UpperStateId") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("AccountManagerName") %> </td>
            </tr>
            <tr>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lMaterialGroupLabel" runat="server" Text="Material Group" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lMaterialNoLabel" runat="server" Text="Material No" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lMaterialLabel" runat="server" Text="Material" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lDefaultShippingModeLabel" runat="server" Text="Default Mode" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lDefaultPlantLabel" runat="server" Text="Default Plant" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lDefaultPlantNoLabel" runat="server" Text="Default Plant No" ViewStateMode="Disabled"></asp:Literal></td>
                <td class="tableSectionLabelCell" nowrap="nowrap"><asp:Literal ID="lIsProspect" runat="server" Text="Is Prospect" ViewStateMode="Disabled"></asp:Literal></td>
            </tr>
            <tr>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("MaterialGroup.Description") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# (Eval("DefaultMaterial.MaterialNo") != null ? Eval("DefaultMaterial.MaterialNo").ToString().RemoveLeadingZerosFromSAPID() : "") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("DefaultMaterial.Description") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("DefaultShipMode.Description")%> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("DefaultPlant.Id") %> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# Eval("DefaultPlant.Description")%> </td>
                <td class="tableSectionDataCell" nowrap="nowrap"><%# (Convert.ToBoolean(Eval("IsProspect")) ? "Yes" : "No") %> </td>
            </tr>
        </table>                
        <br />
        <% if (!_pdfRender)
           { %>
        <div class="RadGrid RadGrid_Default" style="border-bottom: 0px none transparent">
        <table cellspacing="0" class="rgMasterTable" border="0" style="width:100%;table-layout:auto;empty-cells:show;">
            <tr>
                <th class="rgHeader" style="text-align:left;">
                    <telerik:RadButton ID="btnSaveValues" runat="server" CommandName="Save" Icon-PrimaryIconUrl="../images/icons/save16x16.gif" Text="Save Values"></telerik:RadButton
                </th>
                <th class="rgHeader" style="text-align:right;">
                     <telerik:RadButton ID="btnPDF" runat="server" CommandArgument='<%# (Eval("ForecastID").ToString() + "~" +  Eval("CustomerId").ToString() + "~" + Eval("MaterialGroup.MaterialGroupNo").ToString() + "~" + Eval("AccountName").ToString() + "~" + Eval("MaterialGroup.Description").ToString()) %>'  Text="PDF/Print" OnClientClicked="OnClientPDF_Clicking" ValidationGroup="vgMainForm" Icon-PrimaryIconUrl="../images/icons/acrobat.gif" AutoPostBack="false">
                    </telerik:RadButton>
                     <telerik:RadButton ID="btnRefresh" runat="server" CommandName="RebindListView" Text="Refresh" ValidationGroup="vgMainForm">
                        <Icon PrimaryIconCssClass="rbRefresh" />
                    </telerik:RadButton>
                </th>
            </tr>
        </table>
        </div>
        <% } %>
        <% if (_pdfRender)
           { %>
        <table class="TableFullWidth" style="border-top: 1px solid #828282;border-bottom: 1px solid #828282;border-left: 1px solid #828282;border-right: 1px solid #828282;" cellspacing="0" cellpadding="4">
        <% }
           else
           
             %>
        <table class="TableFullWidth" style="border-top: 0px none transparent;border-bottom: 0px none transparent;border-left: 1px solid #828282;border-right: 1px solid #828282;" cellspacing="0" cellpadding="4">
        <% } %>
            <tr>
                <td align="center">
                    <asp:Label ID="lblPriorActualVolumeLabel" runat="server" CssClass="LabelMedium LabelBold" Text="Prior Periods Actual Volume" ViewStateMode="Disabled"></asp:Label>                            
                </td>
                <td align="center">
                    <asp:Label ID="lblAccountRepForecastLabel" runat="server" CssClass="LabelMedium LabelBold" Text="Account Rep Forecast" ViewStateMode="Disabled"></asp:Label>                            
                </td>
                <td align="center">
                    <asp:Label ID="lblManagementForecast" runat="server" CssClass="LabelMedium LabelBold" Text="Management Forecast" ViewStateMode="Disabled"></asp:Label>                            
                </td>
            </tr>
            <tr>
                <td width="34%" nowrap="nowrap">
                    <telerik:RadGrid ID="rgPriorActualVolumeValues" runat="server" 
                        AllowFilteringByColumn="False" 
                        AllowPaging="False" 
                        AllowSorting="false"
                        ClientSettings-AllowColumnHide="false" 
                        AutoGenerateColumns="False" 
                        ShowGroupPanel="false"
                        ShowFooter="true"
                        EnableHeaderContextMenu="false">
                    <MasterTableView
                        CommandItemDisplay="None">
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="PeriodDate" UniqueName="PeriodDate" DataField="PeriodDate" FooterStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" HeaderStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                            <%# FormatPeriodDisplay(Convert.ToDateTime(Eval("PeriodDate"))) %>
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:Literal ID="lTotal" runat="server" EnableViewState="false" Text="Total:"  ViewStateMode="Disabled"></asp:Literal>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="ActualValue" UniqueName="ActualValue" DataField="ActualValue" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="rntxtActualValue" runat="server" Text='<%# Eval("ActualValue") %>' Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" ReadOnly="true" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent"  Width="100px" ViewStateMode="Disabled"></telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                <telerik:RadNumericTextBox ID="rntxtActualValueFooter" runat="server" Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" ReadOnly="true" ReadOnlyStyle-HorizontalAlign="Right" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent" Width="100px" ViewStateMode="Disabled"></telerik:RadNumericTextBox>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="QuarterlyValue" Groupable="false" HeaderText="Quarterly" UniqueName="QuarterlyValue" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" DataType="System.Int32" DataFormatString="{0:#,###,###,##0}">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="OutageDays" UniqueName="OutageDays" DataField="OutageDays" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="rntxtOutageDays" runat="server" Text='<%# Eval("OutageDays") %>' Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" ReadOnly="true" ReadOnlyStyle-HorizontalAlign="Right" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent" Width="100px" ViewStateMode="Disabled"></telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                <telerik:RadNumericTextBox ID="rntxtOutageDaysFooter" runat="server" Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" ReadOnly="true" ReadOnlyStyle-HorizontalAlign="Right" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent" Width="100px" ViewStateMode="Disabled"></telerik:RadNumericTextBox>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <NoRecordsTemplate>
                    <asp:Label ID="lblNoTotalsRecords" runat="server" CssClass="LabelBold" Text="No records for the filtering selections you have chosen." ViewStateMode="Disabled"></asp:Label>
                    </NoRecordsTemplate>
                    </MasterTableView>
                    </telerik:RadGrid>
                </td>
                <td width="34%" nowrap="nowrap">
                    <telerik:RadGrid ID="rgAccountManagerValues" runat="server" 
                        AllowFilteringByColumn="False" 
                        AllowPaging="False" 
                        AllowSorting="false"
                        ClientSettings-AllowColumnHide="false" 
                        AutoGenerateColumns="False" 
                        ShowGroupPanel="false"
                        ShowFooter="true"
                        EnableHeaderContextMenu="false"
                        OnItemDataBound="rgAccountManagerValues_ItemDataBound">
                    <MasterTableView
                        CommandItemDisplay="None"
                        DataKeyNames="ForecastValueId,PeriodDate,AccountManagerValue,OutageDays,IsPrevYearActual">
                    <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="PeriodDate" UniqueName="PeriodDate" DataField="PeriodDate" FooterStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" HeaderStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                            <%# FormatPeriodDisplay(Convert.ToDateTime(Eval("PeriodDate"))) %>
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:Literal ID="lTotal" runat="server" EnableViewState="false" Text="Total:"  ViewStateMode="Disabled"></asp:Literal>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="AccountManagerValue" UniqueName="AccountManagerValue" DataField="AccountManagerValue" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"  FooterStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="rntxtAcctRepForecast" runat="server" Text='<%# Eval("AccountManagerValue") %>' Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right"  Width="100px" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent"></telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                <telerik:RadNumericTextBox ID="rntxtAcctRepForecastFooter" runat="server" Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" ReadOnly="true" ReadOnlyStyle-HorizontalAlign="Right" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent" Width="100px"></telerik:RadNumericTextBox>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="QuarterlyValue" HeaderText="Quarterly" UniqueName="QuarterlyValue" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" DataType="System.Int32" DataFormatString="{0:#,###,###,##0}">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="OutageDays" UniqueName="OutageDays" DataField="OutageDays" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="rntxtOutageDays" runat="server" Text='<%# Eval("OutageDays") %>' Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right"  Width="100px" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent"></telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                <telerik:RadNumericTextBox ID="rntxtOutageDaysFooter" runat="server" Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" ReadOnly="true" ReadOnlyStyle-HorizontalAlign="Right" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent" Width="100px"></telerik:RadNumericTextBox>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <NoRecordsTemplate>
                    <asp:Label ID="lblNoTotalsRecords" runat="server" CssClass="LabelBold" Text="No records for the filtering selections you have chosen." ViewStateMode="Disabled"></asp:Label>
                    </NoRecordsTemplate>
                    </MasterTableView>
                    </telerik:RadGrid>                            
                </td>
                <td width="34%" nowrap="nowrap">
                    <telerik:RadGrid ID="rgManagementAllocationValues" runat="server" 
                        AllowFilteringByColumn="False" 
                        AllowPaging="False" 
                        AllowSorting="false"
                        ClientSettings-AllowColumnHide="false" 
                        AutoGenerateColumns="False" 
                        ShowGroupPanel="false"
                        ShowFooter="true"
                        EnableHeaderContextMenu="false"
                        OnItemDataBound="rgManagementAllocationValues_ItemDataBound">
                    <MasterTableView
                        CommandItemDisplay="None"
                        DataKeyNames="ForecastValueId,PeriodDate,ManagementAllocationValue">
                    <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="PeriodDate" UniqueName="PeriodDate" DataField="PeriodDate" FooterStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" HeaderStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                            <%# FormatPeriodDisplay(Convert.ToDateTime(Eval("PeriodDate"))) %>
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:Literal ID="lTotal" runat="server" EnableViewState="false" Text="Total:"></asp:Literal>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>                                  
                        <telerik:GridTemplateColumn HeaderText="ManagementAllocationValue" UniqueName="ManagementAllocationValue" DataField="ManagementAllocationValue" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="rntxtMgmtAllocation" runat="server" Text='<%# Eval("ManagementAllocationValue") %>' Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" Width="100px" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent"></telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                <telerik:RadNumericTextBox ID="rntxtMgmtAllocationFooter" runat="server" Type="Number" DataType="System.Int32" NumberFormat-DecimalDigits="0" NumberFormat-GroupSizes="3" NumberFormat-GroupSeparator="," EnabledStyle-HorizontalAlign="Right" ReadOnly="true" ReadOnlyStyle-HorizontalAlign="Right" ReadOnlyStyle-BorderColor="Transparent" ReadOnlyStyle-ForeColor="Black" ReadOnlyStyle-BackColor="Transparent" Width="100px"></telerik:RadNumericTextBox>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="QuarterlyValue" HeaderText="Quarterly" UniqueName="QuarterlyValue" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" DataType="System.Int32" DataFormatString="{0:#,###,###,##0}">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <NoRecordsTemplate>
                    <asp:Label ID="lblNoTotalsRecords" runat="server" CssClass="LabelBold" Text="No records for the filtering selections you have chosen."></asp:Label>
                    </NoRecordsTemplate>
                    </MasterTableView>
                    </telerik:RadGrid>                              
                  
                </td>
            </tr>
        </table>
    </ItemTemplate>
    <EmptyDataTemplate>
        <div class="RadGrid RadGrid_Default" style="border-bottom: 0px none transparent">
        <table cellspacing="0" class="rgMasterTable" border="0" style="width:100%;table-layout:auto;empty-cells:show;">
            <tr>
                <th class="rgHeader" style="text-align:left;">
                       
                </th>
            </tr>
            <tr  class="rgNoRecords">
                <td>
                    <asp:Label ID="lblNoTotalsRecords" runat="server" CssClass="LabelBold" Text="No records for the filtering selections you have chosen." ViewStateMode="Disabled"></asp:Label>
                    <br />
                       
                </td>
            </tr>
        </table>
        </div>
        <telerik:RadGrid ID="dummyGrid" runat="server" ViewStateMode="Disabled"></telerik:RadGrid>
    </EmptyDataTemplate>
</telerik:RadListView>
</asp:Panel>

Client-side function

function rdpForecastCardView_ItemPager_OnPageIndexChanging(sender, eventArgs) {
    alert('here');
    eventArgs.set_cancel((!Page_ClientValidate('vgMainForm')));
}

Tsvetoslav
Telerik team
 answered on 15 Apr 2011
11 answers
478 views
Hi,

I have a gridview which uses the following row databound event
 protected void gvSubJobs_RowDataBound(object sender, GridViewRowEventArgs e)  
    {  
 
        if (e.Row.RowType == DataControlRowType.DataRow)  
        {  
            e.Row.Attributes["onmouseover"] = "this.style.backgroundColor='lightblue';";  
            e.Row.Attributes["onmouseout"] = "this.style.backgroundColor='transparent';";  
            e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(gvSubJobs, "Select$" + e.Row.RowIndex);  
        }  
          
    } 

After the user clicks on the row the selected_index_changed event redirects the user to another page by passing the parameter value of the gridview.

What I want to do now is when the user clicks on the row it displays a rad tooltip with two options:
1. View (redirect to another page using the selected value of the gridview)
2. Remove (remove the record from the gridview)

I cannot just simply put the show event (on click) on the gridview as this then also appears if you click on the headings.

How can achieve this context sensitive menu with the use of tooltips?

Summary
I need a tooltip to appear to give the user a list of options when they click on a specific row on the gridview. The options provided on the tooltip relate to the specific row the user has selected.  This operation needs to work on the entire row not just a button.  I am looking for a means to "show" the tooltip and cannot see the option anywhere...
Marin Bratanov
Telerik team
 answered on 15 Apr 2011
2 answers
68 views
I tend to initiate the datasource controls in the codebehind without depending on the markup.  Mostly because you cannot debug it efficiently. 

My question is what is the best event handler or place to do this?  I am currently using the ItemDataBound event which I know is increasing redundancy considerably, doing it for each of the paged items.  That handler has event args that hooks into the EditForm so that the FindControl works. This is not only relevant for the generic fields of the model object in question but also for lookup controls, (states, countries etc.).

Thanks!
Reid
Reid
Top achievements
Rank 2
 answered on 15 Apr 2011
3 answers
80 views
Hello good afternoon,

I'm developing a website and I added a Telerik.Web.Ui.RadScheduler. It all works fine but now that I'm about to publish it I saw that if I run the website thru Google Chrome the Scheduler appears without the normal display. Should I add something to the App_Browser folder?

Best regards.

Hope to ear from you soon,

João Machado
Veronica
Telerik team
 answered on 15 Apr 2011
1 answer
156 views
Hi,

    I just wanted to know if there is a time limit for the progress bar? I am using ProgressArea control (without progress actually, just elapsed time is displayed as I dont have progress of the work being done) for a very heavy work. I see that elapsed time stopped at 9:57 and stop updating itself. 

    Is that the maximum time it can hold a webpage or there must be something wrong elsewhere?

    Thanks,
Genady Sergeev
Telerik team
 answered on 15 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?