Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
Hello !
I use a RadSearchBox like this : http://demos.telerik.com/aspnet-ajax/searchbox/examples/overview/defaultcs.aspx.
And I search to have my result in First or a "auto-scroll" to go to my result.
I tried with onFocus and this code :  var typeSearchBox = $find("<%= RadSearchBox1.ClientID %>");
                                                          typeSearchBox = typeSearchBox.get_inputElement();
                                                           typeSearchBox.focus();

But I don't arrive. Do you have a idea ?
Ivan Danchev
Telerik team
 answered on 15 Sep 2016
4 answers
118 views
I am trying to format my CSV export from a radGrid. It exports fine but it doesn't seem to pick up any of the styles. This what I am using: 

protected void imgBtnExportCSV_Click(object sender, EventArgs e)
  {
    foreach (GridDataItem item in grdLeadList.MasterTableView.Items) //loop through each grid item
      {
        if (item.Selected)
          {
            selectedItems.Add(item.ItemIndex);
          }
      }
 
foreach (GridDataItem item in grdLeadList.MasterTableView.Items)
  {
    // for particuler item
    item["CompanyName"].Font.Name = "Calibri";
    item["CompanyName"].Style["font-size"] = "8pt";
    item["CompanyName"].Style["background-color"] = "#FFF";
    item["CompanyName"].Style["vertical-align"] = "middle";
  }
  grdLeadList.ExportSettings.ExportOnlyData = true;
  grdLeadList.ExportSettings.OpenInNewWindow = true;
                grdLeadList.MasterTableView.Columns.FindByUniqueName("ClientSelectColumn").Visible = false;
            grdLeadList.MasterTableView.Columns.FindByUniqueName("EditCommandColumn1").Visible = false;
            grdLeadList.ExportSettings.FileName = "ColderLeads";
            grdLeadList.MasterTableView.ExportToCSV();
 
  }


Is it possible to format CSV export from radGrid?

Thanks!

Danniel
Top achievements
Rank 1
 answered on 14 Sep 2016
3 answers
226 views

hi all

im working on HIS system and i see its great idea to work with Scheduler to manage doctor's calendar with this perfect tool ,

our doctor calendar build on days in week and it repeated and we have to be able to disable calendar if doctor gone with holidays , there is a duration time for each appointment , its not important to view patients name or id on this calendar all requirement is to view  available time line in available days in week and vacant time  

look forward to hearing from you 

 

 

Peter Milchev
Telerik team
 answered on 14 Sep 2016
5 answers
663 views

Hi

We have "datarow" in class and "dataset" is from ObservableCollection. There are normal set and get for public properties. We use ObjectDataSource to get "dataset" and there are also insert, update and delete commands. All other things seems to work but we have problems with DateTime type properties. Those are tested in GridBoundColumn and GridDateTimeColumn and always same problem. Those are shown correctly with user date format or given datastringformat but when updating or inserting it always crash before our own codes to conversion from "System.String" to "System.DateTime". Only way we have got it work properly is use ISO standard type format "yyyy-MM-dd HH:mm:ss" when setting the value which is not acceptable way to work. So how these datetimes should be set to columns that those are shown and editable in user format and not crash somewhere before it even get to our own code?

Maria Ilieva
Telerik team
 answered on 14 Sep 2016
6 answers
449 views
i am trying to use  telerik:RadGrid but after debugging it giving me error as follows :(

The type or namespace name 'QuickStart' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)


why so??
Rumen
Telerik team
 answered on 14 Sep 2016
3 answers
95 views
Is there a good way to order the field names as they appear in the RadFilter control? I have a filter control that uses the expression tree. However, the field names display in the order as it appears on the RadGrid that is used to populate the results. I'd like it to be organized alphabetically so it's easier for people to find the fields that they need. I haven't found any way of doing this so far. Any ideas?
Pavlina
Telerik team
 answered on 14 Sep 2016
1 answer
75 views

Hello,

We do specify separate color for Important rows having note field. It was normally in "green" color when row with "note" data is loaded and other rows remain "white". While selecting multiple rows using shift key+mouse click the row with "note" data will be "yellow" color and other remaining rows will be default select color("blue").

This was working fine in IE browser. But in chrome or edge browser I cannot able to select multiple columns. Even though I select multiple rows using the property (EnableDragToSelectRows="true") and (AllowMultiRowSelection="True") I found that I cannot able to make color change that I have written in the function  (OnRowSelected="gdUnassigned_RowSelected").

The problem is If i give the property (EnableDragToSelectRows="true") then (OnRowSelected="gdUnassigned_RowSelected") won't be working.

In IE11 I have not specify the property (EnableDragToSelectRows="true") without this IE11 worked fine.

 

Please respond for my post and give me a solution though because it is very important feature for our project.

 

Thanks,

Antelson

Konstantin Dikov
Telerik team
 answered on 14 Sep 2016
4 answers
201 views

Hi Team,

 

When I try renaming a folder in treeview pane, I am getting following error:

Stack Trace:
  at System.String.Substring(Int32 startIndex, Int32 length)
  at Telerik.Web.UI.RadFileExplorer.RenameTreeNode(RadTreeNode node, String newName)
  at Telerik.Web.UI.RadFileExplorer.RadTreeView1_NodeEdit(Object sender, RadTreeNodeEditEventArgs e)
  at Telerik.Web.UI.RadTreeView.OnNodeEdit(RadTreeNodeEditEventArgs e)
  at Telerik.Web.UI.RadTreeView.RaisePostBackEvent(String eventArgument)
  at Telerik.Web.UI.RadTreeView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 

However, file rename operation works fine. Can you please investigate the issue?

 

Vessy
Telerik team
 answered on 14 Sep 2016
2 answers
206 views

I have a radgrid with a 3-tier structure (master -> detail -> detaildetail)

In my ItemDataBound event:

protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
 ... code referencing e.Item
}

how can I determine which "tier" e.Item is?

The <telerik:GridTableView> markup does not appear to allow me to specify a separate ItemDataBound handler for each "tier".

Thanks,


.

.

.

ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
 answered on 13 Sep 2016
2 answers
278 views

I have an ASP.Net page with a RadGrid which is populated by the SQLDataSource.

I am trying to set up the RadGrid so the user edit some fields in the RadGrid for a record and click on update. But I cannot get it to work.  When clicking on update, I get "ORA-01036: illegal variable name/number" error.

I am connecting to an Oracle database.

In looking at your demos, none of them use EditMode = "InPlace".  They either use an Edit Form or some custom things like textboxes, comboboxes, etc.

I have tried having a simple update command in SQLDataSource like the following:

UpdateCommand="UPDATE ADMIN.RSDC_SCRAP_CREDIT_RATE SET LAST_UPDATE = CURRENT_DATE"

That statement should update the LAST_UPDATE field with the Current Date/Time for all the records but it is causing the error as well.  That statement was just a test to see if the parameters in the SQLDataSource is causing the error and/or the Update statement is causing the error.

Usually I set up a RadGrid to use NeedDataSource but alot of your demos and documentation for editing and updating records in the RadGrid indicate using SQLDataSource instead.

Either way I am trying to find a way for the user to edit fields in the RadGrid and update the record.

Please help!

Here is my ASP.net page:

<%@ Page Language="VB" AutoEventWireup="false" Debug="true" CodeFile="ScrapRateBySupplier.aspx.vb" Inherits="ScrapRateBySupplier" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 960px;
            height: 220px;
        }
        .auto-style4 {
            width: 355px;
        }
        .modal
        {
            position: fixed;
            top: 0;
            left: 0;
            background-color: black;
            z-index: 99;
            opacity: 0.8;
            filter: alpha(opacity=80);
            -moz-opacity: 0.8;
            min-height: 100%;
            width: 100%;
        }
        .loading
        {
            font-family: Arial;
            font-size: 10pt;
            border: 5px solid #67CFF5;
            width: 200px;
            height: 100px;
            display: none;
            position: fixed;
            background-color: White;
            z-index: 999;
        }
        .auto-style5 {
            width: 186px;
        }
        .auto-style6 {
            width: 264px;
        }
        html .RadMenu .rmLink,
        html .RadMenu .rmHorizontal .rmText {
            float: none;
            padding: 0;
            text-align: center;
        }   
        </style>
    <script type="text/javascript" src="/scripts/jquery.min.js"></script>
    <script type = "text/javascript" >
        function preventBack() { window.history.forward(); }
        setTimeout("preventBack()", 3);
        window.onunload = function () { null };
    </script>
    <script type="text/javascript">
        function ShowProgress() {
            setTimeout(function () {
                var modal = $('<div />');
                modal.addClass("modal");
                $('body').append(modal);
                var loading = $(".loading");
                loading.show();
                var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
                var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
                loading.css({ top: top, left: left });
            }, 200);
        }
        $('form').live("submit", function () {
            ShowProgress();
        });
        $(document).ready(function () {
            $("#txtActivity").focus(function () {
                $(this).css("background-color", "#ffff33");
            });
            $("#txtActivity").blur(function () {
                $(this).css("background-color", "#ffffff");
            });
            $("#ddlUnit").focus(function () {
                $(this).css("background-color", "#ffff33");
            });
            $("#ddlUnit").blur(function () {
                $(this).css("background-color", "#ffffff");
            });
            $("#txtNote").focus(function () {
                $(this).css("background-color", "#ffff33");
            });
            $("#txtNote").blur(function () {
                $(this).css("background-color", "#ffffff");
            });
        });
 
    </script>
</head>
<body style="background-color: #3A4459">
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
     <div>
        <img alt="RSDC of Michigan" class="auto-style1" src="/images/RSDC_Logo2.jpg" />
        <br />
        <telerik:RadMenu ID="RadMenu1" Runat="server" Width="960px" Style="z-index: 50">
            <Items>
                <telerik:RadMenuItem runat="server" Font-Bold="True" Font-Size="14pt" NavigateUrl="CustomerPortal" Text="Home" Width="475px">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" IsSeparator="True" Text="Sep">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Font-Bold="True" Font-Size="14pt" ForeColor="Red" Text="Logout" Width="475px">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
        <br />
        <br />
        <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="White" Text="Scrap Rate By Supplier"></asp:Label>
        <table style="width:960px;">
            <tr>
                <td style="text-align:right;"><asp:Label ID="lblTable" runat="server" ForeColor="White"></asp:Label></td>
            </tr>
        </table>
        <asp:Panel ID="Panel1" runat="server" Height="600px" Wrap="False" BorderWidth="3px" BorderColor="Black" BorderStyle="Ridge" ForeColor="White" Width="955px" style="margin-right: 17px">
            <br />   
                                             
            <telerik:RadButton ID="rbtnAdd" runat="server" Text="ADD" RenderMode="Classic" Font-Size="11pt">
               <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="3"></Icon>
            </telerik:RadButton>
                
            <asp:Label ID="Label1" runat="server"></asp:Label>
            <br />
            <br />
        <telerik:RadGrid ID="rgScrapRateBySupplier" runat="server" GroupPanelPosition="Top" Height="400px" Width="955px" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"  AllowAutomaticUpdates="True">
            <ExportSettings>
                <Pdf AllowPrinting="False">
                </Pdf>
            </ExportSettings>
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <MasterTableView EditMode="InPlace" DataSourceID="SqlDataSource1">
                <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" />
                <Columns>
                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="SUPPLIER" FilterControlAltText="Filter column column" HeaderText="Supplier" ReadOnly="True" UniqueName="Supplier">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PRIME" FilterControlAltText="Filter column column" HeaderText="Prime" UniqueName="Prime">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RSDC_SV" FilterControlAltText="Filter column1 column" HeaderText="RSDC SV" UniqueName="RSDCSv">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="MILL" FilterControlAltText="Filter column2 column" HeaderText="Mill" UniqueName="Mill">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ENG" FilterControlAltText="Filter column3 column" HeaderText="Eng" UniqueName="Eng">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="LAST_UPDATE" FilterControlAltText="Filter column4 column" HeaderText="Last Update" ReadOnly="True" UniqueName="LastUpdate">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
            <br />
            <br />
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="OverwriteChanges" ConnectionString="<%$ ConnectionStrings:OracleConnectionStringS01 %>" ProviderName="<%$ ConnectionStrings:OracleConnectionStringS01.ProviderName %>"
                SelectCommand="SELECT * FROM ADMIN.RSDC_SCRAP_CREDIT_RATE">
            </asp:SqlDataSource>
        </asp:Panel>
        <br />
        <br />
 
    </div>
     <div class="loading" align="center" style="z-index:100000">
        Loading. Please wait.<br />
        <br />
        <img src="loader.gif" alt="" />
    </div>
   </form>
</body>
</html>

Here is the Code-behind in vb.net:

Imports System.Data
Imports Telerik.Web.UI
 
Partial Class ScrapRateBySupplier
    Inherits System.Web.UI.Page
 
    Private myDSData As DataSet
    Private sql As String
    Private bHasError As Boolean = False, strErrorMsg As String
 
    Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        Try
            Dim strUser As String = ""
            Dim strDecUser As String = ""
            Dim strAppName As String = "ACMENUSCRAPRATEBYSUPP"
 
            If Request.IsAuthenticated Then
                If Not Session("UserName") Is Nothing Then
                    strUser = CType(Session("UserName"), String)
 
                    strDecUser = DataEncryption.base64Decode(strUser)
 
                    strDecUser = DataEncryption.base64Decode(strDecUser)
 
                    strDecUser = DataEncryption.base64Decode(strDecUser)
 
                    strUser = strDecUser
 
                End If
 
                If Not LoginValidation.IsValidAppAccess(strUser, strAppName) Then
                    Response.Redirect("CustomerPortal")
                End If
            Else
                FormsAuthentication.RedirectToLoginPage()
            End If
 
        Catch ex As Exception
            strErrorMsg = "Procedure: Page_Init - ScrapRateBySupplier" & vbCrLf & "Error Message: " & ex.Message & vbCrLf & "Source: " & ex.Source
            UserFunctions.UserMsgBox(Me, strErrorMsg)
 
        End Try
    End Sub
 
End Class

Keith
Top achievements
Rank 1
 answered on 13 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?