Give Script Reference to AjaxControlToolKitScriptManager from Static Server - asp.net-web-api

I'm keeping the referenced files in a bundle on a static server and want to reference to the AjaxControlToolKitScriptManager for scriptreference . It is not working . Is there any other way out?. Below is the code which I'm trying to implement. Browser is able to download file But telerik controls are not able to access it
public void IncludeBundleFiles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/JavaScript/TelerikListMaster").Include(
"~/JavaScript/Telerik/Core.js",
"~/JavaScript/Telerik/Ajax.js",
"~/JavaScript/Telerik/jQuery.js",
"~/JavaScript/Telerik/jQueryPlugins.js",
"~/JavaScript/Telerik/RadGridScripts.js",
"~/JavaScript/Telerik/GridCellSelection.js",
"~/JavaScript/Telerik/OverlayScript.js",
"~/JavaScript/Telerik/NavigationScripts.js",
"~/JavaScript/Telerik/AnimationScripts.js",
"~/JavaScript/Telerik/RadComboBoxScripts.js",
"~/JavaScript/Telerik/TouchScrollExtender.js",
"~/JavaScript/Telerik/RadMenuScripts.js",
"~/JavaScript/Telerik/RadContextMenuScripts.js",
"~/JavaScript/Telerik/RadFilterScripts.js",
"~/JavaScript/Telerik/RadMenuItem.js",
"~/JavaScript/Telerik/RadAutoCompleteBoxScripts.js",
"~/JavaScript/Telerik/PopUpScripts.js",
"~/JavaScript/Telerik/RadToolTipScripts.js",
"~/JavaScript/Telerik/RadToolTipManager.js",
"~/JavaScript/Telerik/RadInputScript.js",
"~/JavaScript/Telerik/RadNumericInputScript.js",
"~/JavaScript/Telerik/RadCalendarCommonScript.js",
"~/JavaScript/Telerik/RadCalendarScript.js",
"~/JavaScript/Telerik/RadDatePicker.js",
"~/JavaScript/Telerik/RadPickersPopupDirectionEnumeration.js",
"~/JavaScript/Telerik/RadInputManagerScript.js"));
}
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="true" ScriptMode="Release">
<CompositeScript Path="https://localhost/JavaScript/TelerikListMaster">
<Scripts>
</Scripts>
</CompositeScript>
</asp:ToolkitScriptManager>

We need to Place the references of scripts to get from Static server under composite tag and place the combine script of all the scripts on Static server. Please refer to this article for further information.here
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="true" ScriptMode="Release">
<CompositeScript Path="https://localhost/StaticServer/JavaScript/TelerikListMaster.js">
<Scripts>
<asp:ScriptReference Path="~/Scripts/Telerik/Common/Core.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/TextBox/RadInputScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/NumericTextBox/RadNumericInputScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/jQuery.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Navigation/OData.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/jQueryPlugins.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/TouchScrollExtender.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Navigation/OverlayScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Navigation/NavigationScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/ComboBox/RadComboBoxScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/ComboBox/View/ClassicView.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/RadGrid/RadGridScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadDatePicker.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadPickersPopupDirectionEnumeration.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/DateInput/RadDateInputScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Common/Scrolling/ScrollingScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Animation/AnimationScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/RadMenuScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/ContextMenu/RadContextMenuScripts.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/MenuItem/RadMenuItem.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Menu/View/ClassicView.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadCalendarScript.js" ScriptMode="Release" />
<asp:ScriptReference Path="~/Scripts/Telerik/Calendar/RadCalendarCommonScript.js" ScriptMode="Release" />
</Scripts>
</CompositeScript>
</asp:ToolkitScriptManager>

Related

Add href link in custom grid in webform ASP.NET and Get ID of Select Row using JQuery

I am trying to add inside custom grid within template but I cannot see these links in output along with other grid data ....
<cc0:Grid ID="StaffItemList" runat="server" FolderStyle="~/Styles/Grid" AutoGenerateColumns="false"
Width="100%" PageSizeOptions="5,10,20,50,100,-1" AllowFiltering="true" FilterType="ProgrammaticOnly"
AllowAddingRecords="false">
<Columns>
<cc0:CheckBoxSelectColumn ShowHeaderCheckBox="true" Width="50" ControlStyle-CssClass="UserInRoleGrid"></cc0:CheckBoxSelectColumn>
<cc0:Column DataField="id" HeaderText="ID" Visible="true" />
<cc0:Column DataField="loginid" HeaderText="loginid" Width="150" />
<cc0:Column DataField="forenames" HeaderText="forenames" />
<cc0:Column DataField="surnames" HeaderText="surnames" />
<cc0:Column DataField="gender" HeaderText="gender" />
<cc0:Column DataField="email" HeaderText="email" />
<cc0:Column DataField="deleted" HeaderText="deleted" />
</Columns>
<Templates>
<cc0:GridTemplate runat="server" ID="AddUserToRoleLink">
<Template>
addRole
</Template>
</cc0:GridTemplate>
</Templates>
</cc0:Grid>
I have found asnswer; code as following....
<cc0:Grid ID="StaffItemList" runat="server" FolderStyle="~/Styles/Grid" AutoGenerateColumns="false"
Width="100%" PageSizeOptions="5,10,20,50,100,-1" AllowFiltering="true" FilterType="ProgrammaticOnly"
AllowAddingRecords="false">
<Columns>
<cc0:Column DataField="id" HeaderText="ID" Visible="true"/>
<cc0:Column DataField="loginid" HeaderText="loginid" Width="150" />
<cc0:Column DataField="forenames" HeaderText="forenames" />
<cc0:Column DataField="surnames" HeaderText="surnames" />
<cc0:Column DataField="gender" HeaderText="gender" />
<cc0:Column DataField="email" HeaderText="email" />
<cc0:Column DataField="deleted" HeaderText="deleted" />
<cc0:Column DataField="Functions" HeaderText="deleted" >
<TemplateSettings TemplateId="AddUserToRoleControl"/>
</cc0:Column>
</Columns>
<Templates>
<cc0:GridTemplate runat="server" ID="AddUserToRoleControl">
<Template>
Add Role
</Template>
</cc0:GridTemplate>
</Templates>
</cc0:Grid>
jQuery
<script type="text/javascript">
$(document).ready(function () {
$(".AddStaffToRoleLink").on("click", function () {
var selectedStaffID = $(this).attr("id");
alert("this is " + selectedStaffID);
});
});
</script>

using ajaxToolkit:ToolkitScriptManager with asp:ScriptManager

I am attempting to use the ajaxToolkit:CalendarExtender in my content.aspx page. The problem is that I have an asp:ScriptManager tag within my site.master page. How do I utilize the ScriptManagerProxy to replace the ajaxToolkit:ToolkitScriptManager in my content.aspx page.
* The code below is my site.Master *
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="cms.master.cs" Inherits="ccib.cms" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %>>
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<webopt:bundlereference runat="server" path="~/Content/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManagerProxy1" runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<%--<asp:ScriptReference Name="MsAjaxBundle" />--%>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
<div class="container">
<div class="row">
<nav class="navbar navbar-default" role="navigation">
</nav>
</div>
</div>
<div class="container">
<div class="row">
<div class="container body-content">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div class="row">
<footer>
<p> © <%: DateTime.Now.Year %> </p>
</footer>
</div>
</div>
</form>
</body>
</html>
* The code below is my content.aspx *
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Content.aspx.cs" Inherits="ccib.mycms.Content" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
<asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
<ajaxToolkit:CalendarExtender
ID="CalendarExtender2"
TargetControlID="txtStartDate"
Format="dd/MM/yyyy"
runat="server">
</ajaxToolkit:CalendarExtender>
</asp:Content>
I did find a work around for this although I am not sure it is ideal. For those also having this problem I did manage to get this to work by adding a second master page were I initiated the ToolScriptManager before the ScriptManagerProxy. The second Site.Master just uses the ScriptManagerProxy. The issue seems to be that I am unable to use a ScriptManagerProxy within my content pages to serve AJAX controls that utilize the ToolScriptManager. This will work until I find a better way. Below is my code for others to reference.
* Site-AJAX.Master *
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ></ajaxToolkit:ToolkitScriptManager>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<%--<asp:ScriptReference Name="MsAjaxBundle" />--%>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManagerProxy>
Site.Master (For content pages that do require ToolScriptManager)
<asp:ScriptManager ID="ScriptManagerProxy1" runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<%--<asp:ScriptReference Name="MsAjaxBundle" />--%>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
Also do not forget to add the toolkit to the web.config file.
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
</configuration>

RadComboBox and RadTextbox not working

I am using VS2013 framework 4.5 and telerik version 2014.1.403.45
RadComboBox not showing the items on clicking on it. The defination is like this-
<telerik:RadComboBox ID="cmbjobType" runat="server" Skin="Web20"
EmptyMessage="--Please Select--">
<Items>
<telerik:RadComboBoxItem Value="0" Text="Repair" />
<telerik:RadComboBoxItem Value="1" Text="Additional" />
<telerik:RadComboBoxItem Value="2" Text="Modify" />
</Items>
</telerik:RadComboBox>
RadTextBox also not working properly, the Empty message is not clearing on clicking on the textbox
<telerik:RadTextBox ID="txtProjTitle" EmptyMessage="Enter Project Title" CssClass="TextBox" runat="server"></telerik:RadTextBox>
and i face some more issues is this some version problem, please suggest.
I have added the following to my master Page
<telerik:RadScriptManager ID="RadScriptManager1" AsyncPostBackTimeout="6000000" 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
It might getting conflict with ToolScriptManager, once i removed these lines of COde , all my ajax and telerik controls worked as expected.

AjaxControlToolkit does not work for pages using MasterPage

I've been trying to get the AjaxControlToolkit (downloaded from NuGet) version 7.0607 to work for web forms that use a masterpage with no luck.
Running DotNet 4.5
The MasterPage has the ToolkitScriptManager on it, but it does not pass down to child pages.
I can create a standalone aspx page, drop a scriptmanager on the page and the controls work just fine, so I figure there is a setting missing.
What is the procedure for making this work?
The masterpage script block is as so:
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="ExtenderBase.BaseScripts.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="Common.Common.js" />
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="jquery.ui.combined" />
<asp:ScriptReference Name="WebForms.js" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
</Scripts>
</ajaxToolkit:ToolkitScriptManager>
no bug, just bad advice from another forum.
The following lines were the culprit - either one messes up things:
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="ExtenderBase.BaseScripts.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit" Name="Common.Common.js" />
Replacing the Microsoft script manager with toolkit script manger did the trick for me and they are working.
<asp:ScriptManager ID="ScriptManager1" runat="server">
with
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>

EXT.net - Grid Panel via Entity with DropDowns, Dates, Pin Editing and Deletion

Title sounds like a real mouthful, so let me try to explain this. I'm very strong with grinding out Web Forms and this is my second crack at using a framework and MVC (don't ask about the first one). Start with a table like this:
Title: Milestones
Id int - Auto, PK
Project_Id int - FK, Many Milestones to One Project, Provided static for now
Number int
Name varchar(50)
Status_Id int - FK One Status to One Milestone
PlannedDate date
LatestEstimate date
MilestoneType_ID int - FK One Type to One Milestone
These all sit on an SQL server, are pulled in by an Entity and then are pulled in by an ObjectDataSource, like this:
<asp:ObjectDataSource runat="server" ID="MilestonesObjectSource" SelectMethod="GetByProject"
DeleteMethod="DeleteMilestone" TypeName="TCProjectManagement.Models.MilestonesAddition">
<SelectParameters>
<asp:Parameter DefaultValue="6" Name="ProjectID" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Type="Int32" Name="Id" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Type="Int32" Name="Id" />
<asp:Parameter Type="Int32" Name="Number" />
<asp:Parameter Type="String" Name="Name" />
<asp:Parameter Type="Int32" Name="Status_Id" />
<asp:Parameter Type="DateTime" Name="PlannedDate" />
<asp:Parameter Type="DateTime" Name="LatestEstimate" />
<asp:Parameter Type="Int32" Name="MilestoneType_ID" />
</UpdateParameters>
</asp:ObjectDataSource>
Sofar so good. Data pull seems to work out okay. I've got a couple more Object Sources that deal exclusively with the Foriegn Keys, so I'll skip those since they seem to be working.
The problems I have are attempting to stitch together many examples that don't seem to go together well. My objectives, in no paticular order:
1) Pin Editing: Click a button to edit, click it again to confirm. Rather do this than have somebody infer to double click for a change. Sofar, this sorta works.
2) Drop Downs for Foriegn Keys: While not in edit mode, should display the "Name" field of the FK. While in edit it should be a Drop Down for options (there's only three). This stays blank dispite what I do.
3) Deletion: Press a button to blow away a row. I put the button there but it's a copy of the JS for editing. What do I need to use to have it be deletion?
4) Dates: This doesn't work at all. One of the weird parts is that from the SQL server's type of Date, it gets changed to DateTime in the Entity and stays that way throughout. However, I cannot get the desired control of ext:DateField to cooperate with the provided data since it displays a time and completely blanks out when editing.. I know I'm doing something wrong here.
5) Saving Changes: Not quite sure I set it up right (or at all).
Provisions of Javascript:
<script type="text/javascript">
var pinEditors = function (btn, pressed) {
var columnConfig = btn.column,
column = columnConfig.column;
if (pressed) {
column.pinOverComponent();
column.showComponent(columnConfig.record, true);
} else {
column.unpinOverComponent();
column.hideComponent(true);
}
};
var pinDeleters = function (btn, pressed) { };
</script>
And ASP Code:
<ext:GridPanel ID="MilestonesGridPanel" runat="server" Title="Milestones" Width="1000px"
Height="300px">
<Store>
<ext:Store ID="MilestonesGridStore" runat="server" DataSourceID="MilestonesObjectSource">
<Model>
<ext:Model runat="server" IDProperty="Id">
<Fields>
<ext:ModelField Name="Id" Type="Int" />
<ext:ModelField Name="Number" Type="Int" />
<ext:ModelField Name="Name" Type="String" />
<ext:ModelField Name="Status_Id" Type="Int" />
<ext:ModelField Name="PlannedDate" />
<ext:ModelField Name="LatestEstimate" />
<ext:ModelField Name="MilestoneType_ID" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="IdColumn" runat="server" DataIndex="Id" Text="DBID" Visible="false" />
<ext:ComponentColumn ID="NumberColumn" runat="server" DataIndex="Number" OverOnly="true"
Pin="true" Flex="1" Text="Number" Editor="true">
<Component>
<ext:NumberField ID="NumberColumnNumberField" runat="server" />
</Component>
</ext:ComponentColumn>
<ext:ComponentColumn ID="NameColumn" runat="server" DataIndex="Name" OverOnly="true"
Pin="true" Flex="1" Text="Name" Editor="true">
<Component>
<ext:TextField ID="NameColumnTextField" runat="server" />
</Component>
</ext:ComponentColumn>
<ext:ComponentColumn ID="StatusColumn" runat="server" DataIndex="Status_Id" OverOnly="true"
Pin="true" Flex="1" Text="Status" Editor="true">
<Component>
<ext:ComboBox ID="StatusColumnDropDownBox" runat="server" QueryMode="Local" Editable="false"
StoreID="MilestoneStatusStore" DisplayField="Name" ValueField="ID" EmptyText="Empty" />
</Component>
</ext:ComponentColumn>
<ext:ComponentColumn ID="PlannedDateColumn" runat="server" DataIndex="PlannedDate"
OverOnly="true" Pin="true" Flex="1" Text="Planned Date" Editor="true">
<Renderer Format="Date" FormatArgs="'m/d/y'" />
<Component>
<ext:DateField ID="PlannedDateColumnTextField" runat="server" Format="MM/dd/yyyy"
EmptyText="Empty" />
</Component>
</ext:ComponentColumn>
<ext:ComponentColumn ID="LatestEstimateColumn" runat="server" DataIndex="LatestEstimate"
OverOnly="true" Pin="true" Flex="1" Text="Latest ETA" Editor="true">
<Renderer Format="Date" FormatArgs="'m/d/y'" />
<Component>
<ext:DateField ID="LatestEstimateColumnTextField" runat="server" Format="MM/dd/yyyy"
EmptyText="Empty" />
</Component>
</ext:ComponentColumn>
<ext:ComponentColumn ID="MilestoneTypeColumn" runat="server" DataIndex="MilestoneType_ID"
OverOnly="true" Pin="true" Flex="1" Text="Milestone Type" Editor="true">
<Component>
<ext:ComboBox ID="MilestoneTypeColumnComboBox" runat="server" QueryMode="Local" Editable="false"
StoreID="MilestoneTypesStore" DisplayField="Name" ValueField="ID" EmptyText="Empty" />
</Component>
</ext:ComponentColumn>
<ext:ComponentColumn ID="EditColumn" runat="server" Width="30" PinAllColumns="false"
AutoWidthComponent="false" OverOnly="true" Text="Edit" Sortable="False">
<Component>
<ext:Button ID="EditButton" runat="server" ToolTip="Pin Editors" Icon="Pencil" AllowDepress="true"
EnableToggle="true" Width="25">
<Listeners>
<Toggle Fn="pinEditors" />
</Listeners>
</ext:Button>
</Component>
</ext:ComponentColumn>
<ext:ComponentColumn ID="DeleteColumn" runat="server" Width="30" PinAllColumns="false"
AutoWidthComponent="false" OverOnly="true" Text="Delete" Sortable="False">
<Component>
<ext:Button ID="DeleteButton" runat="server" ToolTip="Delete Milestone" Icon="Delete"
AllowDepress="true" EnableToggle="false" Width="25">
<Listeners>
<Click Handler="#{MilestonesGridStore}.remove(this.parentMenu.dataRecord)" />
</Listeners>
</ext:Button>
</Component>
</ext:ComponentColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel runat="server" Mode="Single">
<Listeners>
<Select Handler="#{DeleteMilestoneGridButton}.enable();" />
<Deselect Handler="if (!#{MilestonesGridPanel}.selModel.hasSelection()) {
#{DeleteMilestoneGridButton}.disable();
}" />
</Listeners>
</ext:RowSelectionModel>
</SelectionModel>
<Buttons>
<ext:Button ID="AddtoMilestoneGridButton" runat="server" Text="Insert" Icon="Add">
<Listeners>
<Click Handler="#{MilestonesGridStore}.insert(0, {}); #{MilestonesGridPanel}.editingPlugin.startEditByPosition({row:0, column:0});" />
</Listeners>
</ext:Button>
<ext:Button ID="DeleteMilestoneGridButton" runat="server" Text="Delete" Icon="Delete"
Disabled="true">
<Listeners>
<Click Handler="#{MilestonesGridPanel}.deleteSelected();
if (!#{MilestonesGridPanel}.hasSelection()) {
#{DeleteMilestoneGridButton}.disable();
}" />
</Listeners>
</ext:Button>
<ext:Button ID="RefreshMilestonesGridButton" runat="server" Text="RefresH" Icon="Reload">
<Listeners>
<Click Handler="#{MilestonesGridStore}.load();" />
</Listeners>
</ext:Button>
<ext:Button ID="SaveMilestoneGridButton" runat="server" Text="Save" Icon="Disk">
<Listeners>
<Click Handler="#{MilestonesGridStore}.sync();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:GridPanel>

Resources