Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
Hi,

I'm new working with Radgrid.  I'm in the process of converting from Infragistics old control platform, and seeing if the radgrid can do what I need it to do.

I've seen various samples, but not one covering what I'm trying to do.  Perhaps someone can point me in the right direction.

Here is what I have.

The data displayed in the grid is disconnected.  That is, the data is retrieved by a business tier into a dataset, and that dataset is bound to the grid.  Upon a save operation, I collect the data again into a dataset.

All rows are put into edit mode at the same time.  Kinda like when editing an excel page.  I may have dropdowns in the grid.
I need a delete row button, and an add row button.  When "Collecting" the data from the grid to pass to the save method, I need to realize which rows have been added, deleted or inserted.

I need a footer column which will sum a particular column.  I need it to change on the client side when values above are updated.  (monetary column, allowing negatives, with proper formatting).

Validation for some columns (mandatory, etc.).

Is there a complete sort of sample for this kind of situation, or a number of samples giving parts?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 25 Jul 2013
1 answer
87 views
Hi,


We are using a combox with checkbox enabled. While we are using autosuggest option for the combobox, it is working but the typed letter is getting vanished within seconds. This causes a problem for viewer of what he is searching for..Please pfa the snap.


Thanks
Purojit


It will be COMBOBOX instead of Combox. Sorry for typo error..
Peter Filipov
Telerik team
 answered on 25 Jul 2013
1 answer
143 views
I  had the need to connect an instance of my RadFileExplorer to a file source on  an FTP, and I used the sample provided on - http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/how-to-use-the-ftp-connection.aspx

However I'm unable to create or rename a directory because I get the error: 

"The directory /files/test" already exists."
Ryan C
Top achievements
Rank 1
 answered on 25 Jul 2013
4 answers
88 views
H there,

I'm new to telerik controls and still trying to work out some of the fundamentals. As I understand it, when both grouping and paging are applied to a RadGrid, pages become "fixed", i.e. grouping records on a page will reduce the number of records that page holds to the new reduced number of visible records, rather than pulling in records from the next page to fill the remaining slots, or even including records that spilled over onto the next page in the group.

Does anyone know if it is possible to override this default behaviour, and get the grid to rebind after a grouping has been applied so that the pages are updated accordingly? 
Sim
Top achievements
Rank 1
 answered on 25 Jul 2013
1 answer
200 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
130 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
114 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
369 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
159 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
203 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?