Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
206 views

I have one radgrid in user control.

I am loading that user control using RadMultiPage in my .aspx page.

If I load that user control in default pageview then Pagination dropdown of radgrid working fine but if I load that same user control in other pageview of RadMultiPage using Ajax Request of RadAjaxManager then pagination dropdown not working. It is not performing any action like hover, focused, click etc. 

Other pagination controls are working fine. After refreshing grid or after any post back dropdown working fine.

 

Code of My .aspx file

 

<radA:RadAjaxManager ID="radAjaxManager"
        runat="server"
        AjaxUrl="OrderMain.aspx"
        OnAjaxRequest="radAjaxManager_AjaxRequest" ClientEvents-OnRequestStart="reqStart()" ClientEvents-OnResponseEnd="resEnd()">
         
    </radA:RadAjaxManager>
 
 
 
<div id="divReportsTreeViewContainer" class="reportsTreeViewContainer">
 
        <radT:RadTreeView ID="radTreeViewReports"
            runat="server"
            Skin="Arrows/3DClassic"
            ImagesBaseDir="Images/"
            ExpandDelay="1"
            OnNodeExpand="radTreeViewReports_NodeExpand"
            ShowLineImages="false"
            AutoPostBack="False">
        </radT:RadTreeView>
 
    </div>
 
 
<radTS:RadMultiPage ID="radMultiPageOrders"
        runat="server"
        RenderSelectedPageOnly="true"
        SelectedIndex="0">
        <radTS:PageView ID="defaultPage" runat="server">
            <MyOwnControl:MyControl runat="server" id="mycontrol1" />
        </radTS:PageView>
        <radTS:PageView ID="FirstPage" runat="server">
            <MyOwnControl:MyControl runat="server" id="mycontrol1" />
        </radTS:PageView>
         
    </radTS:RadMultiPage>

 

Code of .aspx.cs

 

protected void radAjaxManager_AjaxRequest(object sender, Telerik.WebControls.AjaxRequestEventArgs e)
        {
              
           switch (e.Argument)
                {
                    case 1:
                        {
                            radMultiPageOrders.SelectedIndex = 0;
                            break;
                        }
                    case 2:
                        {
                            radMultiPageOrders.SelectedIndex = 1;
                            break;
                        }
                     
                    default:
                        {
                            radMultiPageOrders.SelectedIndex = 0;
                            break;
                        }
                }
        }

 

My RadGrid declaration

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" ShowFooter="true" Skin="Telerik"
        AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" SelectedItemStyle-BackColor="Green"
        OnPreRender="RadGrid1_PreRender" OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand1"
        OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand" OnItemDataBound="RadGrid1_ItemDataBound1"
        OnItemCommand="RadGrid1_ItemCommand" PageSize="5" CellSpacing="0"></telerik:RadGrid>

Pavlina
Telerik team
 answered on 01 Mar 2016
2 answers
153 views

I have a user control on a page which is a RadRotator control.  The page is ajaxified.  There is a combobox which causes the usercontrol to refresh.

With Ajax disabled, it works great.

With Ajax enabled, when the usercontrol updates itself, it is fine.  When the combobox updates the usercontrol, all of the items in the usercontrol are listed vertically. 

Page:

RadAjaxManager1.AjaxSettings.AddAjaxSetting(clientcbo, this.QuickReportsFormDiv, null, UpdatePanelRenderMode.Inline);

 

UserControl:

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    </telerik:RadAjaxManagerProxy>

<telerik:RadScriptBlock ID="RadScriptBlockqrtr" runat="server">
    <script type="text/javascript">

        function ShowError(sender, args) {
            alert('Quick Report Request Failed with unknown error.');
        }
    </script>
</telerik:RadScriptBlock>

<asp:Panel id="QuickReportsFormDiv" runat="server" style="min-height: 66px; margin-bottom: 5px; white-space: normal!important">
                    
        <telerik:RadRotator ID="QuickReportsRadRotator" runat="server" 
            RenderMode="Lightweight" Height="100px" Width="100%"
            RotatorType="Buttons" EnableDragScrolling="false" WrapFrames="false" 
            ScrollDirection="Left,Right" ScrollDuration="1" 
            AppendDataBoundItems="false"
            OnItemClick="QuickReportsRadRotator_ItemClick"
           >
            
            <ItemTemplate>
                
                    <telerik:RadBinaryImage ID="QuickReportsControl" runat="server"
                        CssClass="QRThumbnails"
                        AlternateText='<%# Eval("FileUploadID") %>'  ToolTip='<%# Eval("FileTitle") %>' 
                        DataValue='<%# Eval("ThumbnailBinaryData") %>'
                        />
            </ItemTemplate>
        </telerik:RadRotator>                 

    </asp:Panel>

 

Stamo Gochev
Telerik team
 answered on 01 Mar 2016
12 answers
2.7K+ views
Hi,

I tried to use a RadWindows as a container, I put a radtextbox it in.
Then I wanted my user to right click on a listbox item and then Click "Edit"  (from a RadContextMenu), I want to update the textbox based on the user's selection. So I need to open RadWindow from Server Side code. But if I use the OpenElementID properties, the client side event of the "Edit" item won't be fired.

Any idea?

Andy Ho
sushant
Top achievements
Rank 1
 answered on 01 Mar 2016
4 answers
479 views
Hi,

We use Telerik grid for VS2008, version 2011.3.1115.0.

I have 2 issues:

1) When I create columns manually in this way:

<div style="margin-right: 20px;">
    <telerik:RadGrid ID="RadGrid1" runat="server" Width="100%" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
        AutoGenerateColumns="false" AllowMultiRowSelection="true">
        <MasterTableView PageSize="10" AllowPaging="True" Width="100%" DataKeyNames="ContinentID" DataSourceID="SqlDataSource1" EditMode="InPlace">
            <Columns>
                <telerik:GridClientSelectColumn></telerik:GridClientSelectColumn>
                <telerik:GridBoundColumn HeaderText="ContinentID" DataField="ContinentID"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="ContinentName" DataField="ContinentName"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
            <Selecting AllowRowSelect="true"></Selecting>
        </ClientSettings>
    </telerik:RadGrid>
</div>

The code behind is as follows:

RadGrid1.ExportSettings.ExportOnlyData = true;
RadGrid1.ExportSettings.IgnorePaging = true;
RadGrid1.ExportSettings.OpenInNewWindow = true;
RadGrid1.MasterTableView.ExportToExcel();

When I export grid to Excel file the Boolean values from first check box column are exported as well. How can I export all data but without those Boolean values?

2) When I want to export data only from selected rows from grid that contains the first check box column to Excel file using the following code:

foreach (GridDataItem item in RadGrid1.Items)
{
    if (item.Selected == false)
    {
        item.Visible = false;
    }
}
RadGrid1.ExportSettings.ExportOnlyData = true;
RadGrid1.ExportSettings.IgnorePaging = true;
RadGrid1.ExportSettings.OpenInNewWindow = true;
RadGrid1.MasterTableView.ExportToExcel();

not only selected rows, but whole grid was exported.

How can I solve these 2 issues?

Thank you in advance.

Goran
P
Top achievements
Rank 1
 answered on 29 Feb 2016
4 answers
173 views

Hi,

I was trying hard to use Gantt with Oracle Database over the Oracle Managed Connection, with Visual Studio 2013/ASP.NET 4.5. Well I had a few problems.

Then I returned to the blackboard and Worked on your Example. Then I hit an end.

So when you want resource assignments to be made, You cant. The events do not trigger. Am I missing something?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Temp_GanttBinding_List.aspx.cs" Inherits="GanttDBConnection.Temp_GanttBinding_List" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI.Gantt" tagprefix="cc1" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
    <div>
 
        <telerik:RadGantt runat="server" ID="RadGantt1"
            Culture="tr-TR" LocalizationPath="LocalResources"
            SnapToGrid="false" AutoGenerateColumns="false"
            SelectedView="MonthView" EnableResources="true"
 
            OnDependencyInsert="RadGantt1_DependencyInsert"
            OnDependencyDelete="RadGantt1_DependencyDelete"
 
            OnTaskDelete="RadGantt1_TaskDelete"
            OnTaskUpdate="RadGantt1_TaskUpdate"
            OnTaskInsert="RadGantt1_TaskInsert"
             
            OnAssignmentDelete="RadGantt1_AssignmentDelete"
            OnAssignmentInsert="RadGantt1_AssignmentInsert"
            OnAssignmentUpdate="RadGantt1_AssignmentUpdate"
            >
            <Columns>
                <telerik:GanttBoundColumn DataField="ID" HeaderText="#" Width="40px"></telerik:GanttBoundColumn>
                <telerik:GanttBoundColumn DataField="Title" HeaderText="BaÅŸlık" DataType="String"></telerik:GanttBoundColumn>
                <telerik:GanttResourceColumn HeaderText="Atanmış Kaynak"></telerik:GanttResourceColumn>
            </Columns>
 
            <DataBindings>
                <TasksDataBindings  IdField="ID"  TitleField="Title"  StartField="Start"  EndField="End"
                    PercentCompleteField="PercentComplete"  OrderIdField="OrderID"  SummaryField="Summary"  ParentIdField="ParentID" />
 
                <DependenciesDataBindings  IdField="ID"  PredecessorIdField="PredecessorID"
                    SuccessorIdField="SuccessorID"  TypeField="Type" />
                 
                <ResourcesDataBindings IdField="ID"
                    TextField="Name"
                    ColorField="Color" />
 
                <AssignmentsDataBindings IdField="ID"
                    TaskIdField="TaskID"
                    ResourceIdField="ResourceID"
                    UnitsField="Units" />
            </DataBindings>
        </telerik:RadGantt>
 
    </div>
    </form>
</body>
</html>

 

Then I kind of added some to simulate my own project.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using Telerik.Web.UI.Gantt;
using System.Data;
 
namespace GanttDBConnection
{
    public partial class Temp_GanttBinding_List : System.Web.UI.Page
    {
        private const string TasksKey = "Telerik.GanttSample.Tasks";
        private const string DependenciesKey = "Telerik.GanttSample.Dependencies";
        private const string AssignmentsKey = "Telerik.GanttSample.Assignments";
        private const string ResourcesKey = "Telerik.GanttSample.Resources";
 
        private List<Task> Tasks
        {
            get
            {
                List<Task> sessionTasks = Session[TasksKey] as List<Task>;
 
                if (sessionTasks == null)
                {
                    sessionTasks = new List<Task>();
 
                    sessionTasks.Add(new Task
                    {
                        ID = 1,
                        Title = "Yeni Görev",
                        Start = new DateTime(2015, 8, 5, 12, 40, 0),
                        End = new DateTime(2015, 8, 5, 12, 40, 0),
                        OrderID = 0
                    });
 
                    Session[TasksKey] = sessionTasks;
                }
 
                return sessionTasks;
            }
        }
 
        public List<Dependency> Dependencies
        {
            get
            {
                List<Dependency> sessionDependencies = Session[DependenciesKey] as List<Dependency>;
 
                if (sessionDependencies == null)
                {
                    sessionDependencies = new List<Dependency>();
 
                    Session[DependenciesKey] = sessionDependencies;
                }
 
                return sessionDependencies;
            }
        }
 
        public List<CustomGanttResource> CustomGanttResources
        {
            get
            {
                List<CustomGanttResource> sessionResources = Session[ResourcesKey] as List<CustomGanttResource>;
 
                if (sessionResources == null)
                {
                    sessionResources = new List<CustomGanttResource>();
 
                    sessionResources.Add(new CustomGanttResource
                    {
                        ID = 1,
                        Name = "Mutlu",
                        Color = "#ff0000"
                    });
 
                    Session[ResourcesKey] = sessionResources;
                }
 
                return sessionResources;
            }
        }
 
        public List<Assignment> Assignments
        {
            get
            {
                List<Assignment> sessionAssignments = Session[AssignmentsKey] as List<Assignment>;
 
                if (sessionAssignments == null)
                {
                    sessionAssignments = new List<Assignment>();
 
                    Session[DependenciesKey] = sessionAssignments;
                }
 
                return sessionAssignments;
            }
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            RadGantt1.DataSource = Tasks;
            RadGantt1.DependenciesDataSource = Dependencies;
            RadGantt1.ResourcesDataSource = CustomGanttResources;
            RadGantt1.AssignmentsDataSource = Assignments;
        }
 
        protected void RadGantt1_TaskDelete(object sender, TaskEventArgs e)
        {
            foreach (Task task in e.Tasks)
            {
                var original = GetByID((int)task.ID);
 
                Tasks.Remove(original);
            }
        }
 
        protected void RadGantt1_TaskUpdate(object sender, TaskEventArgs e)
        {
            foreach (Task task in e.Tasks)
            {
                var original = GetByID((int)task.ID);
 
                original.Start = task.Start;
                original.End = task.End;
                original.Title = task.Title;
                original.PercentComplete = task.PercentComplete;
                original.OrderID = task.OrderID;
                original.Summary = task.Summary;
                original.ParentID = task.ParentID;
            }
        }
 
        protected void RadGantt1_TaskInsert(object sender, TaskEventArgs e)
        {
            foreach (Task task in e.Tasks)
            {
                task.ID = NextID();
 
                Tasks.Add(task);
            }
        }
 
        private Task GetByID(int id)
        {
            return Tasks.Find((task) => (int)task.ID == id);
        }
 
        private int NextID()
        {
            var nextID = 0;
 
            foreach (ITask task in Tasks)
            {
                if ((int)task.ID > 0)
                {
                    nextID = (int)task.ID;
                }
            }
 
            return ++nextID;
        }
 
        protected void RadGantt1_DependencyInsert(object sender, DependencyEventArgs e)
        {
            foreach (Dependency dependency in e.Dependencies)
            {
                dependency.ID = NextDependencyID();
 
                Dependencies.Add(dependency);
            }
        }
 
        protected void RadGantt1_DependencyDelete(object sender, DependencyEventArgs e)
        {
            foreach (Dependency dependency in e.Dependencies)
            {
                var original = GetDependencyByID((int)dependency.ID);
 
                Dependencies.Remove(original);
            }
        }
 
        private Dependency GetDependencyByID(int id)
        {
            return Dependencies.Find((dependency) => (int)dependency.ID == id);
        }
 
        private int NextDependencyID()
        {
            var nextID = 0;
 
            foreach (IDependency dependency in Dependencies)
            {
                if ((int)dependency.ID > 0)
                {
                    nextID = (int)dependency.ID;
                }
            }
 
            return ++nextID;
        }
 
        protected void RadGantt1_AssignmentDelete(object sender, AssignmentEventArgs e)
        {
            //Just to see if this event triggers.
            int a = 5;
        }
 
        protected void RadGantt1_AssignmentInsert(object sender, AssignmentEventArgs e)
        {
            //Just to see if this event triggers.
            int a = 5;
        }
 
        protected void RadGantt1_AssignmentUpdate(object sender, AssignmentEventArgs e)
        {
            //Just to see if this event triggers.
            int a = 5;
        }
 
        public class CustomGanttResource
        {
            public void CustomGanttResources(int ID, string Name, string Color)
            {
                _ID = ID;
                _Name = Name;
                _Color = Color;
            }
            private int _ID;
            public int ID
            {
                get { return _ID; }
                set { _ID = value; }
            }
            private string _Name;
            public string Name
            {
                get { return _Name; }
                set { _Name = value; }
            }
            private string _Color;
            public string Color
            {
                get { return _Color; }
                set { _Color = value; }
            }
        }
 
    }
}

 

 

Thanks in Advance.

Mutlu

Nencho
Telerik team
 answered on 29 Feb 2016
1 answer
85 views

Hi Guys

I have been retired from commercial website design for a few years now but I am still doing stuff for various charities and church organisations, so I would like to be as current as possible without spending their money unnecessarily. I am on the Q3 2013 version 2013.3.1114.40 (i.e. SP1) and would like to get as current as possible. Can I get access to SP2 without renewing my licence?

Thanks

 

Clive

Pavlina
Telerik team
 answered on 29 Feb 2016
3 answers
558 views
I have below Autocompletebox on a page as below.

<telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" Width="400px"
                DropDownWidth="400px" DropDownHeight="300px" DataTextField="Company_Name"
                DataValueField="Company_ID"                
                AutoPostBack="true"
                InputType="Text"             
                TextSettings-SelectionMode ="Single"
                OnTextChanged="RadAutoCompleteBox1_TextChanged">
</telerik:RadAutoCompleteBox>

and there is some code written in "RadAutoCompleteBox1_TextChanged", which populates a drop down values based on the selection in autocompletebox.

I see the filtered entries in the drop down as I type in input control. And it works fine when I select/tab out/ enter a item.
But if I type exact and whole text that matches the entry, the textchanged event is not fired.

for example, I have a entry as California in the datasource.
Typed the whole and exact (case sensitive) text in the input control.
The entry is displayed in drop down and selected it with mouse.
TextChanged event is not fired.

Please help.



Nencho
Telerik team
 answered on 29 Feb 2016
1 answer
105 views

Hi,

In the latest 2016.1.225 release, we have problem moving windows when using Lightweight, Restriction Zone and a parent with overflow none!

This worked in the previous version...

Sample:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="window.aspx.vb" Inherits="TestaTredjepartWeb.window" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow: hidden">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="s" runat="server">
        </asp:ScriptManager>
        <div>
            <asp:Panel ID="pnlRestrictionZone" runat="server" Style="width: 700px; background-color: blue; height: 500px">
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                    <Windows>
                        <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" AutoSize="true" RenderMode="Lightweight" Title="Hello" NavigateUrl="windowcontent.aspx" VisibleStatusbar="false" RestrictionZoneID="pnlRestrictionZone">
                        </telerik:RadWindow>
                    </Windows>
                </telerik:RadWindowManager>
            </asp:Panel>
        </div>
    </form>
</body>
</html>

When trying to move the window in the sample above using Firefox, it will always jump to the top left corner for start!

Regards
Andreas

Danail Vasilev
Telerik team
 answered on 29 Feb 2016
3 answers
291 views
How to add total in footer in case of editable grid with paging and DataSourceID?

Now I'm adding total in ItemDataBound by summarize the values and update GridFooterItem
but in this case because of the paging, it doesn't summarize them all, just
the rows in current page. i need to summarize all and update the total
when the grid content is updated.
what is the correct approach in this case?

aspx:
-----
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
</telerik:RadWindowManager>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>

<telerik:RadSplitter ID="mainSplitter" runat="server" Height="100%" Width="100%" 
Orientation="Horizontal" VisibleDuringInit="false" BorderSize="0" PanesBorderSize="0">
<telerik:RadPane ID="paneTitle" runat="server" Height="50px">
<h1>Production Groups</h1>
</telerik:RadPane>
<telerik:RadPane ID="paneGrid" runat="server">


<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" 
AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" 
GridLines="None" Width="1200px" Height="95%"
AllowAutomaticDeletes="True" 
AllowAutomaticInserts="True" 
AllowAutomaticUpdates="True" 
        OnItemDataBound="RadGrid1_ItemDataBound"
        OnDataBound="RadGrid1_DataBound"
        >
<ClientSettings EnableRowHoverStyle="true">
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>

<MasterTableView DataKeyNames="GroupID" DataSourceID="ObjectDataSource1" CommandItemDisplay="Top" EditMode="PopUp" ShowFooter="true">
<CommandItemSettings ExportToPdfText="Export to Pdf" AddNewRecordText="Add New Production Group"></CommandItemSettings>

<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn HeaderText="Edit" ButtonType="ImageButton">
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderStyle HorizontalAlign="Center" Width="50px" />
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn ConfirmText="Delete this group?" ConfirmDialogType="RadWindow" 
ConfirmTitle="Delete" ButtonType="ImageButton" HeaderText="Delete"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderStyle HorizontalAlign="Center" Width="50px" />
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="GroupID" HeaderText="ID" ReadOnly="true" 
SortExpression="GroupID" UniqueName="GroupID" DataType="System.Int32">
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderStyle HorizontalAlign="Center" Width="50px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="GroupName" HeaderText="Group Name" 
SortExpression="GroupName" UniqueName="GroupName">
<ItemStyle  Width="250px" />
<HeaderStyle  Width="250px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SortOrder" HeaderText="Sort Order" 
SortExpression="SortOrder" UniqueName="SortOrder">
<ItemStyle HorizontalAlign="Center" Width="80px" />
<HeaderStyle HorizontalAlign="Center" Width="80px" />
</telerik:GridBoundColumn>
            
<telerik:GridBoundColumn DataField="ProductionCost" HeaderText="Production Cost" 
SortExpression="ProductionCost" UniqueName="ProductionCost" DataFormatString="{0:c2}">
<ItemStyle HorizontalAlign="Center" Width="80px" />
<HeaderStyle HorizontalAlign="Center" Width="80px" />
</telerik:GridBoundColumn>

</Columns>
<EditFormSettings CaptionDataField="GroupName"
                          CaptionFormatString="Edit Production Group: {0}"
                          InsertCaption="New Production Group"
                          EditFormType="Template" >
<EditColumn ButtonType="ImageButton">
</EditColumn>
<PopUpSettings Modal="true" />
            <FormTemplate>
                    <table id="Table1" cellspacing="1" cellpadding="1" width="270" border="0">
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Group Name:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="TextBox10" Text='<%# Bind("GroupName") %>' runat="server">
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        
                        <tr>
                            <td>
                                Sort Order:
                            </td>
                            <td>
                                <telerik:RadTextBox ID="TextBox11" Text='<%# Bind("SortOrder") %>' MaxLength="2" runat="server">
                                </telerik:RadTextBox>
                            </td>
                        </tr>

                        <tr>
                            <td>
                                Production Cost:
                            </td>
                            <td>
                                <telerik:RadNumericTextBox ID="txtProductionCost" runat="server" Width="100px" Type="Currency"  Text='<%# Bind("ProductionCost") %>'>
                                    <NumberFormat DecimalDigits="2" />
                                </telerik:RadNumericTextBox>
                            </td>
                        </tr>
                      

                    </table>
                    <table style="width: 100%">
                        <tr>
                            <td align="left" colspan="2">
                                <asp:Button ID="Button1"
                                    runat="server" class="rgUpdate" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button>&nbsp;
                                <asp:Button ID="Button2" class="rgCancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
            </FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadPane>
</telerik:RadSplitter>

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
DeleteMethod="DeleteProductionGroup" InsertMethod="InsertProductionGroup" 
SelectMethod="GetAllProductionGroups" TypeName="comp.BL.ProductionController" 
UpdateMethod="UpdateProductionGroup">
<DeleteParameters>
<asp:Parameter Name="GroupID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="GroupName" Type="String" />
<asp:Parameter Name="sortOrder" Type="Int32" />
            <asp:Parameter Name="ProductionCost" Type="Decimal" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="GroupID" Type="Int32" />
<asp:Parameter Name="GroupName" Type="String" />
<asp:Parameter Name="sortOrder" Type="Int32" />
            <asp:Parameter Name="ProductionCost" Type="Decimal" />
</UpdateParameters>
</asp:ObjectDataSource>


aspx.cs
-------

double total_ProductionCost = 0;

    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {

        if (e.Item is GridFooterItem)
        {
            GridFooterItem footerItem = e.Item as GridFooterItem;
            footerItem["ProductionCost"].Text = "" + String.Format("{0:C2}", total_ProductionCost);
        }

        if (e.Item.ItemType != GridItemType.Item && e.Item.ItemType != GridItemType.AlternatingItem) return;
        tblProductionGroup item = (tblProductionGroup)e.Item.DataItem;
        if (item.ProductionCost.HasValue)
        {
            double ProductionCost = (double)item.ProductionCost;
            total_ProductionCost += ProductionCost;
        }
        var source = RadGrid1.DataSource;

    }
Eyup
Telerik team
 answered on 29 Feb 2016
1 answer
139 views
We have been sent a case where captcha showed an inappropriate word. We need to blacklist list of offensive/inappropriate words before they load in the captcha image. How can we do that, please help. Screenshot attached.
Danail Vasilev
Telerik team
 answered on 29 Feb 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?