Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
185 views
Could anybody help me?  I am looking for a way to develop a web application that features an infinite scroll and as you scroll down, more content is loaded.  I would like to retrieve this information or content from a database table as text and graphics but I keep on seeing php examples.  Could anybody help and show me an example using asp.net with JQuery?  Thanks!
Eyup
Telerik team
 answered on 25 Jul 2013
3 answers
102 views
There is a RadEditor in RadGrid inside user control. When using ajaxmanager in page and ajaxify grid, radeditor content not updating with new value in ie 9.0.8 (in firefox there is no problem). İf I use radgrid in page there is no problem everything is ok in ie.
Slav
Telerik team
 answered on 25 Jul 2013
1 answer
93 views
We have a  RadHtmlChart of around 30 series, it runs fine on Chrome, Firefox, and IE 9/10. But really slow on IE8. Is there anyway to improve performance on IE8?
Danail Vasilev
Telerik team
 answered on 25 Jul 2013
6 answers
340 views
Dear

I'm applying security by disable all controls with certain CssClass based on permission, for example I'm adding Insert CssClass to controls I want to disable or enable base on user role.
Now this is working great with RadGrid but unfortunately when using Detail/Hierarchy Grid within RadGrid I can't apply this logic, I don't know why, can you help me please?

ASPX:
<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel" HorizontalAlign="NotSet">
    <telerik:RadGrid ID="grdTransactions" runat="server" AllowPaging="True" CellSpacing="0" GridLines="None" AutoGenerateColumns="False" DataSourceID="odsEmployeeTrans" AllowFilteringByColumn="True" AllowSorting="True" ShowGroupPanel="True" EnableTheming="True">
        <ClientSettings AllowDragToGroup="True">
            <Scrolling AllowScroll="False" UseStaticHeaders="True" />
        </ClientSettings>
        <ExportSettings>
            <Pdf PageTitle="Transactions" Author="WebTimeTel" Creator="WebTimeTel" PaperSize="A4"></Pdf>
        </ExportSettings>
        <MasterTableView AllowMultiColumnSorting="True" DataKeyNames="TransID" DataSourceID="odsEmployeeTrans" PageSize="50">
            <DetailTables>
                <telerik:GridTableView runat="server" CommandItemDisplay="TopAndBottom" DataKeyNames="TaskID" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" DataSourceID="odsTasks" AllowFilteringByColumn="False" AllowSorting="False">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="TransID" MasterKeyField="TransID"></telerik:GridRelationFields>
                    </ParentTableRelation>
                    <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Add New Task" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <CommandItemTemplate>
                        <asp:LinkButton ID="lbtnAdd" runat="server" CssClass="Insert" CommandName="InitInsert" Visible='<%# !grdTransactions.MasterTableView.DetailTables[0].IsItemInserted %>'>Add new</asp:LinkButton>
                        <asp:LinkButton ID="lbtnAddThis" runat="server" CssClass="Insert" CommandName="PerformInsert" Visible='<%# grdTransactions.MasterTableView.DetailTables[0].IsItemInserted %>'> Add this</asp:LinkButton>
                    </CommandItemTemplate>
                    <Columns>
                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit"
                            FilterControlAltText="Filter column column" ButtonCssClass="Update"
                            UniqueName="Edit" HeaderStyle-Width="3%">
                            <HeaderStyle Width="3%" />
                        </telerik:GridButtonColumn>
                        <telerik:GridTemplateColumn DataField="TaskType" FilterControlAltText="Filter TaskType column" HeaderText="Task Type" UniqueName="TaskType">
                            <EditItemTemplate>
                                <telerik:RadComboBox ID="ddlTaskType" DataSourceID="odsTaskTypes" DataTextField="TaskTypeEn" DataValueField="TaskTypeId" SelectedValue='<%# Bind("TaskTypeId") %>' runat="server"></telerik:RadComboBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="TaskTypeLabel" runat="server" Text='<%# Eval("TaskType.TaskTypeEn") %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridDateTimeColumn FilterControlAltText="Filter TimeFom column" HeaderText="Time From" UniqueName="TimeFrom" DataField="TimeFrom" PickerType="TimePicker" DataType="System.DateTime" DataFormatString="{0:hh:mm tt}">
                        </telerik:GridDateTimeColumn>
                        <telerik:GridDateTimeColumn FilterControlAltText="Filter TimeTo column" HeaderText="Time To" UniqueName="TimeTo" DataField="TimeTo" PickerType="TimePicker" DataType="System.DateTime" DataFormatString="{0:hh:mm tt}">
                        </telerik:GridDateTimeColumn>
                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
                            ConfirmText="Are you sure?" FilterControlAltText="Filter column column"
                            ImageUrl="~/images/delete.png" ButtonCssClass="Delete" UniqueName="Delete" HeaderStyle-Width="3%">
                            <HeaderStyle Width="3%" />
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                    <PagerStyle AlwaysVisible="True" />
                </telerik:GridTableView>
            </DetailTables>
            <CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToPdfButton="True" ShowAddNewRecordButton="False" ExportToCsvText="Export to CSV" ShowExportToCsvButton="True" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridButtonColumn Text="Select" CommandName="Select" FilterControlAltText="Filter Images column" UniqueName="Select">
                </telerik:GridButtonColumn>
                <telerik:GridBoundColumn DataField="TransID" FilterControlAltText="Filter TransID column" HeaderText="Trans#" UniqueName="TransID" AllowFiltering="False" Display="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter EmployeeNumber column" HeaderText="Employee#"
                    DataField="EmployeeNumber" UniqueName="EmployeeNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter EmployeeCode column" HeaderText="Employee Code"
                    DataField="EmployeeCode" UniqueName="EmployeeCode">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter EmployeeName column" HeaderText="Name"
                    DataField="EmployeeName" UniqueName="EmployeeName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter DepartmentEn column" HeaderText="Department"
                    DataField="EmployeeDepartmentEn" UniqueName="DepartmentEn">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter DepartmentAr column" HeaderText="القسم"
                    DataField="EmployeeDepartmentAr" UniqueName="DepartmentAr">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter TransDate column" HeaderText="In Date"
                    DataField="InDateTime" DataFormatString="{0:dd/MM/yyyy}" UniqueName="InDate" DataType="System.DateTime">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter TransDate column" HeaderText="In Time"
                    DataField="InDateTime" DataFormatString="{0:hh:mm tt}" UniqueName="InTime" DataType="System.DateTime">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter TransTypeEn column" HeaderText="In Device"
                    DataField="DeviceInName" UniqueName="InDeviceName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OutDateTime" FilterControlAltText="Filter Device column" HeaderText="Out Date" DataFormatString="{0:dd/MM/yyyy}" UniqueName="OutDate">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OutDateTime" FilterControlAltText="Filter Device column" HeaderText="Out Time" DataFormatString="{0:hh:mm tt}" UniqueName="OutTime">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DeviceOuName" FilterControlAltText="Filter OutDeviceName column" HeaderText="Out Device Name" UniqueName="OutDeviceName">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <PagerStyle Position="Bottom" AlwaysVisible="True" Mode="NumericPages" />
        </MasterTableView>
        <PagerStyle AlwaysVisible="True" Mode="NumericPages" />
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
 CS (Logic):
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
 
 
        if (Module != null)
        {
            StaticModule = Module;
            _staticUser = _user;
            if (!_groupRepository.IsUserAllowToView(Module, _user.UserID.Value))
                throw new HttpException(401, "Unauthorized access");
 
            var securedControls = Helpers.Methods.GetAllControls(this)
                                              .OfType<WebControl>()
                                              .Where(c => c.CssClass == "Insert" ||
                                              c.CssClass == "Update"||
                                              c.CssClass == "Delete");
 
 
            if (!_groupRepository.IsUserAllowToInsert(Module, _user.UserID.Value))
            {
 
                foreach (var control in securedControls.Where(c => c.CssClass == "Insert"))
                {
                    control.Enabled = false;
                }
 
 
            }
 
            if (!_groupRepository.IsUserAllowToUpdate(Module, _user.UserID.Value))
            {
 
                foreach (var control in securedControls.Where(c => c.CssClass == "Update"))
                {
                    control.Enabled = false;
                }
 
 
            }
 
            if (!_groupRepository.IsUserAllowToDelete(Module, _user.UserID.Value))
            {
 
                foreach (var control in securedControls.Where(c => c.CssClass == "Delete"))
                {
                    control.Enabled = false;
                }
 
 
            }
 
        }
}

Emad Mokhtar
Top achievements
Rank 1
 answered on 25 Jul 2013
1 answer
147 views
Hi.
   
     I have used a Grid, a ComBoBox, and a button to do a simple task.
    User selects something from the ComboBox, then click on the button. I expect the Grid will be refreshed according to the selecttions from the  ComboBox.
    The problem is that the Gird can't be refreshed after the button click, I don't know what is the problem, I have tried RadGrid1.DataBind() and RadGrid1.Rebind().

Please help.

Thanks,
Jian
++++++++++++++++++++++++
Codes for Aspx page

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns='http://www.w3.org/1999/xhtml'>

<head>

    <title>Simple Data Binding in AJAX GridView | RadGrid demo</title>

</head>

<body>

<form id="form1" runat="server">

    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    
     <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
 
               <telerik:RadComboBox ID="RadComboBox1" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="false"
                    Width="300" Label="Select SaleRep:">
                    <Items>
                         <telerik:RadComboBoxItem Text="6277" />
                         <telerik:RadComboBoxItem Text="6278" />
                         <telerik:RadComboBoxItem Text="6279" />
                         <telerik:RadComboBoxItem Text="6280" />
                         <telerik:RadComboBoxItem Text="6281" />
                         <telerik:RadComboBoxItem Text="6282" />
                         <telerik:RadComboBoxItem Text="6283" />
                         <telerik:RadComboBoxItem Text="6284" />
                         <telerik:RadComboBoxItem Text="6285" />
                         <telerik:RadComboBoxItem Text="6286" />
                         <telerik:RadComboBoxItem Text="6287" />
                         <telerik:RadComboBoxItem Text="6288" />
                    </Items>
               </telerik:RadComboBox>
               
               <telerik:RadButton ID="Button1" runat="server" Text="Get Checked Items" OnClick="Button1_Click" />
   
     </telerik:RadAjaxPanel>
     
     <br /><br />
     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1" Width="97%" AllowPaging="True" PageSize="15" runat="server"
        AllowSorting="true" GridLines="None">
        <MasterTableView Width="100%">
        </MasterTableView>
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
        <FilterMenu EnableTheming="True">
            <CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
        </FilterMenu>
    </telerik:RadGrid>

</form>

</body>

</html>

=================
Code for ASPX.VB Page

Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports Telerik.Web.UI

Partial Public Class Grid2
    Inherits System.Web.UI.Page

    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

        RadGrid1.DataSource = GetDataTable("SELECT TOP 20 [salesRepID],[salesID],[lastName],[firstName] FROM [tpcodata2].[dbo].[salesRep]")

    End Sub

    Public Function GetDataTable(ByVal query As String) As DataTable
        Dim ConnString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString
        Dim conn As SqlConnection = New SqlConnection(ConnString)
        Dim adapter As SqlDataAdapter = New SqlDataAdapter
        adapter.SelectCommand = New SqlCommand(query, conn)
        Dim table1 As New DataTable
        conn.Open()
        Try
            adapter.Fill(table1)
        Finally
            conn.Close()
        End Try
        Return table1
    End Function

    Public Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Dim sb As New StringBuilder()
        Dim collection As IList(Of RadComboBoxItem) = RadComboBox1.CheckedItems
        Dim iCnt As Integer

        If (collection.Count <> 0) Then
            iCnt = 1
            For Each item As RadComboBoxItem In collection
                If iCnt = collection.Count Then
                    sb.Append(item.Text)
                Else
                    sb.Append(item.Text + ",")
                End If

                iCnt = iCnt + 1
            Next

        End If

        If sb.ToString() = "" Then
            Me.RadGrid1.DataSource = GetDataTable("SELECT TOP 20 [salesRepID],[salesID],[lastName],[firstName] FROM [tpcodata2].[dbo].[salesRep]")
        Else
            Me.RadGrid1.DataSource = GetDataTable("SELECT [salesRepID],[salesID],[lastName],[firstName] FROM [tpcodata2].[dbo].[salesRep] where [salesRepID] in (" + sb.ToString() + ")")
        End If
 
        Me.RadGrid1.Rebind()

    End Sub

End Class
  
    
 
   
Eyup
Telerik team
 answered on 25 Jul 2013
8 answers
175 views
I have started developing applications using a Virtual Windows 8 developer environment.  My target is not windows 8 per se however I am trying to track down the "bugs" which always crop up with a new OS.

I have a error to report which appears to be windows 8 specific.  It occurs when a project is compiled and run.  The errors appear in the debug window of the developer workstation.  Actual execution and performance does not appear to be impacted by this "bug".

I am using Internet Explorer under windows 8.  It reports "Windows 8(9.6)".

The actual error is:

Exception was thrown at line 3, column 25802 in http://aspnet-scripts.telerikstatic.com/ajaxz/2012.3.1016/Common/jQuery.js

0x800a139e - JavaScript runtime error: SyntaxError


Has anyone else seen this "bug"?
Martin
Telerik team
 answered on 25 Jul 2013
1 answer
98 views
Hi,
On initial load radgrid is loading find.
I have a button outside the grid to update.when i click on button there is messup with grid columns width.
Eyup
Telerik team
 answered on 25 Jul 2013
0 answers
153 views
hi
 I am working on Mobile Application in Icenium Graphite.Now i want to develop sample application on Payment Gate way using JQuery can any one help me in this

Thanks in advance,
Raadhika
Radhika
Top achievements
Rank 1
 asked on 25 Jul 2013
4 answers
361 views
Hi,
I have created one column as "GridButtonColumn" in one dynamic radgrid, When i click a button in any of the row that "GridButtonColumn" column will be hided soon... Can you anyone help me to solve the problem ..?


Thanks
-Rk.MooRthy
 answered on 25 Jul 2013
16 answers
978 views
I want to populate fields within a radgrid with some phony data when the button is clicked.
The GetInsertItem() statement causes exception:
Exception Details: Telerik.Web.UI.GridException: Insert item is available only when grid is in insert mode.

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div>
  <telerik:RadButton runat="server" ID="RadButton1" AutoPostBack="true" Text="fill data"  ButtonType="LinkButton" onclick="RadButton1_Click"></telerik:RadButton>
</div>
 
<telerik:RadAjaxPanel runat=server>
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
            ShowStatusBar="True" GridLines="None"  OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnInsertCommand="RadGrid1_InsertCommand" OnCreateColumnEditor="RadGrid1_CreateColumnEditor"
            OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated">
            
            <MasterTableView DataKeyNames="id" CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Emp" DataField="emp" UniqueName="emp">
 
 
 
protected void RadButton1_Click(object sender, EventArgs e)
{
        GridEditFormInsertItem i = (GridEditFormInsertItem)RadGrid1.MasterTableView.GetInsertItem();
        RadTextBox r = (RadTextBox)i.FindControl("emp");
        r.Text = "Johnny";
}

Princy
Top achievements
Rank 2
 answered on 25 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?