or

<telerik:RadGrid ID="grdSales" runat="server" AutoGenerateColumns="False" GridLines="None" Height="350px" AllowPaging="True" EnableEmbeddedSkins="False" Skin="customGrid" AllowFilteringByColumn="True"> <GroupingSettings CaseSensitive="False" /> <ClientSettings> <Selecting AllowRowSelect="True" /> </ClientSettings> <MasterTableView NoMasterRecordsText="" AllowFilteringByColumn="True"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridDateTimeColumn AutoPostBackOnFilter="True" DataField="SALESDATE" SortExpression="SALESDATE" DataFormatString="{0:dd/MM/yyyy}" UniqueName="SALESDATE" PickerType="None"> </telerik:GridDateTimeColumn> </Columns> <EditFormSettings> <EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" EditImageUrl="Edit.gif" CancelImageUrl="Cancel.gif"> </EditColumn> </EditFormSettings> </MasterTableView> <FilterMenu EnableEmbeddedSkins="False"> </FilterMenu> <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"> </HeaderContextMenu> </telerik:RadGrid>| <FormTemplate> |
| <table> |
| <tr> |
| <td> |
| Inventory Name: |
| </td> |
| <td> |
| <telerik:RadComboBox SelectedValue='<%# Bind( "InventoryId") %>' ID="RadComboBoxInventoryName" runat="server" Height="300px" Width="300px" |
| Filter="Contains" MarkFirstMatch="true" ChangeTextOnKeyBoardNavigation="false" |
| DataSourceID="ObjectDataSourceInventoryName" DataTextField="Name" DataValueField="InventoryId" AutoPostBack="true"> |
| <Items> |
| <telerik:RadComboBoxItem Text="" Value="" Selected="true" /> |
| </Items> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| </tr> |
| <tr> |
| <td> |
| Attribute: |
| </td> |
| <td> |
| <telerik:RadComboBox Text='<%# Bind( "Attribute") %>' ID="RadComboBoxAttribute" runat="server" Height="300px" Width="300px" |
| Filter="Contains" MarkFirstMatch="true" ChangeTextOnKeyBoardNavigation="false" |
| DataSourceID="ObjectDataSourceAttribute" DataTextField="Attribute" DataValueField="Attribute" AutoPostBack="true"> |
| <Items> |
| <telerik:RadComboBoxItem Text="" Value="" Selected="true" /> |
| </Items> |
| <ItemTemplate> |
| <%# DataBinder.Eval(Container.DataItem, "Type")%>.<%# DataBinder.Eval(Container.DataItem, "Attribute")%> |
| </ItemTemplate> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| <tr> |
| <td align="left" colspan="2"> |
| <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' |
| runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'> |
| </asp:Button> |
| <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" |
| CommandName="Cancel"></asp:Button></td> |
| </tr> |
| </table> |
| </FormTemplate> |
| <asp:ObjectDataSource ID="ObjectDataSourceInventoryName" runat="server" |
| TypeName="Ams.Web.BackOffice.InventoryAdapter" |
| DataObjectTypeName="Ams.Core.DomainObject.Inventory" |
| OldValuesParameterFormatString="original_{0}" |
| ConflictDetection="CompareAllValues" |
| SelectMethod="GetInventoryForComboBox"> |
| </asp:ObjectDataSource> |
| <asp:ObjectDataSource ID="ObjectDataSourceAttribute" runat="server" |
| TypeName="Ams.Web.BackOffice.InventoryTypeAttributesAdapter" |
| DataObjectTypeName="Ams.Core.DomainObject.InventoryAttribute_InventoryType" |
| OldValuesParameterFormatString="original_{0}" |
| ConflictDetection="CompareAllValues" |
| SelectMethod="GetAttributeByInventoryId"> |
| <SELECTPARAMETERS> |
| <asp:ControlParameter Name="aInventoryId" PropertyName="SelectedValue" ControlID="RadComboBoxInventoryName" /> |
| </SELECTPARAMETERS> |
| </asp:ObjectDataSource> |
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource" AllowSorting="true" GridLines="None" PageSize="5" Skin="Web20" Width="80%" onpageindexchanged="RadGrid1_PageIndexChanged" onpagesizechanged="RadGrid1_PageSizeChanged" OnUpdateCommand="RadGrid1_UpdateCommand" onitemdatabound="RadGrid1_ItemDataBound"> <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true"> <Selecting AllowRowSelect="true" /> <Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false" ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="true" /> </ClientSettings> <MasterTableView Width="100%" AutoGenerateColumns="false" > <Columns> <telerik:GridButtonColumn CommandName="Edit" Text="Edit" UniqueName="Edit"> </telerik:GridButtonColumn> <telerik:GridButtonColumn CommandName="Replace" Text="Replace" UniqueName="Replace"> </telerik:GridButtonColumn> <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete"> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="P" HeaderText="Prefix"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="FN" HeaderText="FirstName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MN" HeaderText="MiddleI"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LN" HeaderText="LastName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SchoolName" HeaderText="LocatedAt"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PersonID" HeaderText="PersonID" Visible="false" UniqueName="PersonID"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <PagerStyle Mode="NextPrevAndNumeric" />RadGrid1.DataSource = dsAdminInfo.Tables[0];<br>RadGrid1.DataBind(); protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { RadGrid1.DataSource = ((DataSet)Session["AdminInfo"]).Tables[0]; }
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode)) { GridEditFormItem editform = (GridEditFormItem)e.Item; editform["PersonID"].Parent.Visible = false; }| aspx.page | Begin Load | 0.000159517480573648 | 0.000017 |
| Start OnNeedDataSource | 0.000180190499071809 | 0.000021 | |
| Start database call | 0.00020058415245513 | 0.000020 | |
| Finish database call | 6.53778594765536 | 6.537585 | |
| Start generation of parent ids | 6.53783343972488 | 0.000047 | |
| Finish generation of parent ids | 6.56655440845135 | 0.028721 | |
| Finish OnNeedDataSource | 6.56660441480691 | 0.000050 | |
| aspx.page | End Load | 14.5043473402346 | 7.937743 |