Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
139 views

Hi...

I have problem.

TimeFormat am / pm is not showing up.

Correto seria 12:00 pm

Anderson
Top achievements
Rank 1
 asked on 16 Jul 2018
4 answers
174 views
I have a RadCombobox on my page as follows:

  <telerik:RadComboBox ID="cboBenchmarkCompanies" runat="server" 
                                                     CheckBoxes="true" 
                                                     DataTextField="Value"
                                                     DataValueField="Key"
                                                     EnableLoadOnDemand="False"
                                                     OnClientItemChecking="CheckMaxBenchmarkCompanies"
                                                     meta:resourcekey="cboBenchmarkCompanies" />

I load the list in the onload with:
            if (!this.IsPostBack) {
                var allCompanies = _applicationUserRepository.GetAllSurveyUsers();
                cboBenchmarkCompanies.DataSource = allCompanies;
                cboBenchmarkCompanies.DataBind(); }

If i then try to retrieve the checked items after pressing a save button, i always get back an empty collection instead of my checked items:
foreach (var checkedItem in cboBenchmarkCompanies.CheckedItems ){

What am I doing wrong?

Gauri
Top achievements
Rank 1
 answered on 16 Jul 2018
0 answers
71 views

I know I can move / re-order a column around on a grid.  I have a requirement where I need to be able to move a GridColumnGroup as well.  I don't see this is possible out of the box.  Has anybody had any luck with a work-around to allow a GridColumnGroup to be moved / re-ordered?

 

Thanks!

Andrew
Top achievements
Rank 1
 asked on 16 Jul 2018
2 answers
263 views

I have a RadGrid bound to a ClientDataSource, but when no records are returned, the grid's NoRecordsTemplate does not display (it's just an empty grid).  I've tried various workarounds without any success.  I've tried setting the grid's datasource to an empty array in the RadClientDataSource OnDataParse event.  I've tried explicitly setting EnableNoRecordsTemplate = "true", and I've tried setting NoMasterRecordsText in the MasterTableView, but nothing seems to work.

Any idea what I could be missing?

Eric
Top achievements
Rank 1
 answered on 16 Jul 2018
5 answers
251 views

Hi, I have a problem with links in a navigation menu.
The simple link works, it is translated properly into the tag <a></a>.

A NodeTemplate doesn't work: link does not appear and obviously does not work.

This is MasterPage.Master:

 

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage.master.cs" Inherits="SimTasse.MasterPage" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
 
<head runat="server">
    <title><%: Page.Title %></title>
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1, maximum-scale=1.0, user-scalable=no" />
    <link href="styles/base.css" rel="stylesheet" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
    <link href="~/styles/material_upo/Navigation.material_upo.css" rel="stylesheet" runat="server"/>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
        <div id="wrapper">
        <telerik:RadPageLayout runat="server" ID="MasterLayout" GridType="Fluid">
            <Rows>
                <%--Header--%>
                <telerik:LayoutRow CssClass="header">
                    <Columns>
                        <%--Logo--%>
 
                        <%--Main Nav--%>
                        <telerik:LayoutColumn Span="12" SpanMd="12" SpanSm="12" SpanXs="12">
                            <telerik:RadNavigation ID="RadNavigationPrincipale" runat="server" EnableEmbeddedSkins="False" Skin="material_upo">
                                <Nodes>
                                    <telerik:NavigationNode ID="nn_logo" NavigateUrl="Default.aspx">
                                        <NodeTemplate>
                                            <div>
                                                <div style="display: table-cell; vertical-align: middle;">
                                                    <img src="images/logo_quadrato_su_rosso_24.png" alt=""/>
                                                </div>
                                                <div style="display: table-cell; vertical-align: middle;" id="divVoceMenu1">
                                                      UPO -
                                                </div>
                                            </div>
                                        </NodeTemplate>
                                    </telerik:NavigationNode>
                                    <telerik:NavigationNode Text="Informazioni" ID="nn_info" NavigateUrl="Informazioni.aspx">
 
                                    </telerik:NavigationNode>
                                    <telerik:NavigationNode Text="Accedi" ID="nn_accedi">
 
                                    </telerik:NavigationNode>
                                </Nodes>
                            </telerik:RadNavigation>
                        </telerik:LayoutColumn>
                    </Columns>
                </telerik:LayoutRow>
 
                <%--Main--%>
                <telerik:LayoutRow>
                    <Columns>
                        <%--Sidebar--%>
                        <%--Content--%>
                        <telerik:CompositeLayoutColumn Span="12" SpanMd="12" SpanSm="12" SpanXs="12">
                            <Content>
                                <asp:ContentPlaceHolder ID="cph1" runat="server">
                                </asp:ContentPlaceHolder>
                            </Content>
                        </telerik:CompositeLayoutColumn>
                    </Columns>
                </telerik:LayoutRow>
 
                <%--Footer--%>
                <telerik:LayoutRow>
                    <Columns>
                        <telerik:LayoutColumn CssClass="footer">
                            <hr />
                            Simulatore tasse: © <%: DateTime.Now.Year %>  Università del Piemonte Orientale,  v. <%: appVersione %>
                        </telerik:LayoutColumn>
                    </Columns>
                </telerik:LayoutRow>
            </Rows>
        </telerik:RadPageLayout>
       </div>
        <script type="text/javascript">
            //imposta il testo corretto della prima voce di menu
            var nodo = document.getElementById("divVoceMenu1");
            nodo.innerHTML = "  UPO - " + "<%: appTitolo %>";
 
            //var waitC = false;
 
            function WaitCursor(sender, args) {
            }
        </script>
    </form>
</body>
</html>

 

Marin Bratanov
Telerik team
 answered on 16 Jul 2018
17 answers
403 views

Hi..

Again .. I have a custom skinned window. But the CLOSE button does not appear on the 'title'. If I remove the skin. It shows the close.

Any ideas?  thx again!!

 


            <telerik:RadWindow  Skin="Flom" EnableEmbeddedSkins="false" rendermode="Lightweight" runat="server" ID="RadWindow_NavigateUrl" NavigateUrl="About.aspx" Height="300" Width="350" EnableShadow="true"  IconUrl="images/GlobeSmall.png"  
                  Modal="true" Behaviors="Close" ShowContentDuringLoad="true" RestrictionZoneID="NavigateUrlZone"  Animation="FlyIn" VisibleStatusbar="False">
            </telerik:RadWindow>

 

          

 

    if (e.CommandName == "btnPrint")
            {
                GridEditableItem editedItem = (GridEditableItem)e.Item;

                Session["PO_NO"] = editedItem.GetDataKeyValue("po_no").ToString();
       
                RadWindow_NavigateUrl.NavigateUrl = "ReportViewer.aspx";

                string _title = String.Concat("Flom PO ", " - ", editedItem.GetDataKeyValue("po_no").ToString());

                RadAjaxManager1.ResponseScripts.Add(String.Format("var wnd = $find('{0}'); wnd.show(); wnd.set_title('{1}')", RadWindow_NavigateUrl.ClientID, _title));

            }

     

 


Jonathan
Top achievements
Rank 1
Iron
Veteran
 answered on 16 Jul 2018
3 answers
148 views

What I would like to do is when a user clicks on a GridHyperLinkColumn within the radGrid, the default behavior is to be prompted with the "Save As" dialog.  Thus far I have been unsuccessful in doing this.  Attempted to use the HTML5 download option but GridHyperLinkColumn doesn't understand that.  This is my current code but it doesn't work on every file as some open up.  The file types may be varied (PDF, XLS, XLSX, DOC, DOCX, TXT, ZIP).  Would it be possible to display a RadContextMenu when clicking on the link with "Save As" the only option?

 

<telerik:GridHyperLinkColumn SortExpression="FileName" DataTextFormatString="{0}"
    DataNavigateUrlFields="file_name" UniqueName="file_name" DataNavigateUrlFormatString="/Repository/FTPCloud/{0}"
    HeaderText="File" DataTextField="file_name">
</telerik:GridHyperLinkColumn>

 

Private Sub grdCloudFiles_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles grdCloudFiles.ItemDataBound
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim link As HyperLink = DirectCast(item("file_name").Controls(0), HyperLink)
        link.Attributes.Add("onclick", String.Format("javascript:document.execCommand('SaveAs','true','{0}');", MapPath(".") & link.NavigateUrl))
    End If
 
End Sub

 

Kurt Kluth
Top achievements
Rank 1
 answered on 16 Jul 2018
1 answer
85 views

I have a grid with many columns in it. The first two have display="false". They're IDs used to create links for other columns in the Grid_ItemDataBound event. Anyway, The report shows correctly when created with the browser maximized, but if I restore and then maximize again, the hidden columns show up. When they work, the TH has style="display:none" and after restoring and maximizing the style is gone. This is happening in 2 out of maybe 50 reports and most of them have hidden fields, so it's probably related to the layout of these particular grids.

Any ideas?

 

Eyup
Telerik team
 answered on 16 Jul 2018
1 answer
227 views

Hi there,

my web application worked for years fine but after my computer crashes and I installed and set up a new computer, now I try to publish my web application again on IIS, there are some difficulties and UI does not work as expected. For example some menu items can not  be selected or double click on a control that must be open a dialog has no action and so on and there are no error during rebuild or publish. The important thing is that the web application works fine in debugging mode and problems exist only after publishing the application. I'm using  Visual Studio 2017 and the application uses .NET framework 4 and windows 10 as OS and Telerik UI for ASP.NET AJAX R2 2018 is now installed. 

Can anyone tell me, is it possible that some incompatibility between telerik UI version and  windows 10 probably caused these problems?

Any other Idea? Thanks in advanced

Alireza

Rumen
Telerik team
 answered on 16 Jul 2018
2 answers
235 views
Hello Sir/Madam,
How to delete row from RadGrid  using C# code.
I dont want to used ObjectDataSource because i want to manage in code using 5 or more delete or update sql query according to time and condition. This can more flexible. I see delete row using ObjectDataSource in Terelik Advertise but this is not work in my condition.
please help me without using ObjectDataSource control.

And
please check below

in .ASPX code
<telerik:RadGrid ID="gvDetails" Skin="Outlook" BorderWidth="0" AllowFilteringByColumn="True"
                                 runat="server" AutoGenerateColumns="False" ShowStatusBar="true" EnableLinqExpressions="false"      
                                OnSortCommand="gvDetails_SortCommand"  onupdatecommand="gvDetails_UpdateCommand" oneditcommand="gvDetails_EditCommand"
                                 OnItemDeleted="gvDetails_ItemDeleted" OnSelectedIndexChanged="gvDetails_SelectCommand"  oncancelcommand="gvDetails_CancelCommand"   onprerender="gvDetails_PreRender"  >
                                
                                <MasterTableView AllowFilteringByColumn="true" DataKeyNames="ID" TableLayout="Fixed">
                                    <NoRecordsTemplate>
                                        <div style="font-weight: bold; color: Red;">
                                            No Record Found.</div>
                                    </NoRecordsTemplate>
                                    <Columns>
                                        <telerik:GridTemplateColumn UniqueName="Description" DefaultInsertValue="" HeaderText="Description"
                                           DataField="Description"  SortExpression="Description" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                                            ShowFilterIcon="false"
                                            AllowFiltering="true" FilterControlWidth="99%" HeaderStyle-Width="70%">                                
                                            <ItemTemplate>
                                                <asp:Label ID="lbltasktype" runat="server" Text='<%# Eval("Description")%>'> </asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>                                   
                                                <asp:TextBox ID="txtstatusname1" runat="server" SkinID="textbox" Text='<%# Eval("Description")%>'
                                                    MaxLength="100"></asp:TextBox>
                                            </EditItemTemplate>                                
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"  />
                                        <telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton"
                                        CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                        <HeaderStyle Width="20px" />
                                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                                    </telerik:GridButtonColumn>
                                    </Columns>
                                </MasterTableView>
                           <%--     <ClientSettings AllowColumnsReorder="True">
                                    <Resizing AllowColumnResize="true" />
                                </ClientSettings>--%>
                                </telerik:RadGrid>

in ASPX.CS  Code
protected void gvDetails_ItemDeleted(object source, Telerik.Web.UI.GridDeletedEventArgs e)
    {
        GridDataItem editedItem = (GridDataItem)e.Item;
        String id = editedItem.GetDataKeyValue("ID").ToString();
        lblMsg.Text = "";
        DAL.DAL obj = new DAL.DAL(DAL.DAL.DBType.SqlServer, sConString);
        if (Request.QueryString["prbls"] == "Severity")
        {
            String strdel = "UPDATE EMRProblemsSeverity SET Active=0 WHERE Id=" + id;
            obj.ExecuteNonQuery(CommandType.Text, strdel);
            BindSeverity();

        }
        else if (Request.QueryString["prbls"] == "Context")
        {
            String strdel = "UPDATE EMRProblemsContext SET Active=0 WHERE Id=" + id;
            obj.ExecuteNonQuery(CommandType.Text, strdel);
            BindContext();
        }
        else if (Request.QueryString["prbls"] == "Quality")
        {
            String strdel = "UPDATE EMRProblemsQuality SET Active=0 WHERE Id=" + id;
            obj.ExecuteNonQuery(CommandType.Text, strdel);
            BindQuality();
        }
        else if (Request.QueryString["prbls"] == "Duration")
        {
            String strdel = "UPDATE EMRProblemsDuration SET Active=0 WHERE Id=" + id;
            obj.ExecuteNonQuery(CommandType.Text, strdel);
            BindDuration();
        }
        else if (Request.QueryString["prbls"] == "Location")
        {
            String strdel = "UPDATE EMRProblemsLocation SET Active=0 WHERE Id=" + id;
            obj.ExecuteNonQuery(CommandType.Text, strdel);
            BindLocation();
        }
        else if (Request.QueryString["prbls"] == "Condition")
        {
            String strdel = "UPDATE EMRProblemsCondition SET Active=0 WHERE Id=" + id;
            obj.ExecuteNonQuery(CommandType.Text, strdel);
            BindCondition();
        }
    }
but delete event not fired.
how it will fired the delete event.


Please help me as soon as possible because i need urgently.
Help me urgently.
thanks you
Jiten Kumar
Akhil Systems Pvt Ltd.
Caoimhin
Top achievements
Rank 1
 answered on 13 Jul 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?