I'm working on a custom page to visualize the relations between parent and child records by displaying the table data in a hierarchical order.
There are 2 data views in my BLC, which I'd like to use as the data source for two PXGrids to display the data in a master/detail format. When a record is selected in the master grid, all of the related child entries should be shown in the details grid.
How should I declare my 2 PXGrids in Aspx to accomplish this task?
For example, if some BLC contains a Categories data view and a Related Products data view, you would specify the Categories view to be the data source for the master grid and the Products view to be the data source for the details grid. When a category is selected in the master grid, all products associated with that category will be displayed in the details grid from the Products data view.
public class ProductCategories : PXGraph<ProductCategories>
{
#region Actions
public PXSave<Category> Save;
public PXCancel<Category> Cancel;
#endregion
#region Data Members
public PXSelect<Category> Categories;
public PXSelect<CategoryProduct,
Where<CategoryProduct.categoryID,
Equal<Current<Category.categoryID>>>> CategoryProducts;
#endregion
#region Event Handlers
protected virtual void Category_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
this.CategoryProducts.Cache.AllowInsert = e.Row != null;
}
#endregion
}
As shown in the code snippet above, the detail view is referenced with the master view via a Current BQL operator. Also, notice RowSelected event handler defined for the Category DAC to disable Insert button on the details grid if there is not a single record in the master grid.
The next step is to configure master-detail PXGrids in Aspx:
for the master grid set SyncPosition property to true, then define the AutoCallBack and OnChangeCommand properties as follows to accordingly refresh the detail grid every time a different record or no record at all will be selected in the master grid:
<px:PXGrid ID="masterGrid" runat="server" DataSourceID="ds" SkinID="Details"
SyncPosition="True" Caption="Categories" CaptionVisible="True" Width="100%">
<AutoCallBack Command="Refresh" Target="detailGrid" />
<OnChangeCommand Command="Refresh" Target="detailGrid" />
...
</px:PXGrid>
for the detail grid it's only required to define a Refresh CallbackCommand to force the master grid to select data along with the details grid. By doing the framework will raise the previously defined Category_RowSelected event handler and disable Insert button on the details grid in cases when there is no record in the master grid:
<px:PXGrid ID="detailGrid" runat="server" DataSourceID="ds" SkinID="Details"
Caption="Products" CaptionVisible="True" Width="100%">
<CallbackCommands>
<Refresh SelectControlsIDs="masterGrid" />
</CallbackCommands>
...
</px:PXGrid>
For the sake of better user experience, it's recommended to place master-detail PXGrids within a PXSplitContainer as shown in the code snippet below:
<px:PXSplitContainer runat="server" ID="sp" PositionInPercent="true" SplitterPosition="50"
SkinID="Horizontal" Orientation="Horizontal" Panel1MinSize="250" Panel2MinSize="250">
<AutoSize Enabled="true" Container="Window" />
<Template1>
<px:PXGrid ID="masterGrid" runat="server" DataSourceID="ds" SkinID="Details"
SyncPosition="True" Caption="Categories" CaptionVisible="True" Width="100%">
<AutoCallBack Command="Refresh" Target="detailGrid" />
<OnChangeCommand Command="Refresh" Target="detailGrid" />
<Levels>
<px:PXGridLevel DataMember="Categories">
<Columns>
...
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Enabled="True" />
</px:PXGrid>
</Template1>
<Template2>
<px:PXGrid ID="detailGrid" runat="server" DataSourceID="ds" SkinID="Details"
Caption="Products" CaptionVisible="True" Width="100%">
<CallbackCommands>
<Refresh SelectControlsIDs="masterGrid" />
</CallbackCommands>
<Levels>
<px:PXGridLevel DataMember="CategoryProducts">
<Columns>
...
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Enabled="True" />
</px:PXGrid>
</Template2>
</px:PXSplitContainer>
And here is how master-details PXGrids should look and operate inside an Acumatica webpage:
Related
I have created a PXGraphExtension on POLandedCostDocEntry. I have added a PXAction button. When the button is pressed I show a popup panel to ask the user for a landed cost code.
The problem is that the PXSelector ignores whatever I enter into the field and resets to APPLE (or whatever Landed Cost Code is alphabetically first). If I use the Selector to choose a different code, the code I select is visible for a moment and then immediately replaced with APPLE again.
The ASPX for the popup dialog is as follows:
<px:PXSmartPanel runat="server" ID="PanelAskForLCCode" LoadOnDemand="True" AutoRepaint="True" Key="LandedCostCodeSelection" CaptionVisible="True" Caption="Select Landed Cost Code" AcceptButtonID="CstButton4" CancelButtonID="CstButton5">
<px:PXPanel runat="server" ID="CstPanel9">
<px:PXFormView runat="server" ID="CstFormView10" SkinID="Transparent" Width="100%" SyncPosition="True" DataMember="LandedCostCodeSelection" DataSourceID="ds">
<Template>
<px:PXSelector runat="server" ID="CstPXSelector11" DataField="LandedCostCodeID" CommitChanges="True" DataSourceID="ds">
</px:PXSelector>
</Template>
</px:PXFormView>
</px:PXPanel>
<px:PXPanel runat="server" ID="LandedCostCodeSelectionButtons" SkinID="Buttons">
<px:PXButton runat="server" ID="CstButton4" DialogResult="OK" Text="OK" />
<px:PXButton runat="server" ID="CstButton5" DialogResult="Cancel" Text="Cancel" />
</px:PXPanel></px:PXSmartPanel>
The code for the view that I'm referencing in the dialog is:
public PXSelect<LandedCostCode> LandedCostCodeSelection;
The code that I'm using to call the dialog is:
if (LandedCostCodeSelection.AskExt() == WebDialogResult.OK)
{
//rest of code here
}
What am I missing to allow the user to select or type a different Landed Cost Code?
Edit 1:
I have changed the code for the view that I'm referencing in the dialog to:
public PXFilter<LandedCostCode> LandedCostCodeSelection;
My aspx now looks like this:
<px:PXSmartPanel runat="server" ID="PanelAskForLCCode" Key="LandedCostCodeSelection" CaptionVisible="True" Caption="Select Landed Cost Code" AcceptButtonID="CstButton4" CancelButtonID="CstButton5" Width="300px" AutoRepaint="True" LoadOnDemand="True">
<px:PXFormView runat="server" ID="CstFormView18" CaptionVisible="False" Caption="LC Code Selection" DataSourceID="ds" DataMember="LandedCostCodeSelection">
<Template>
<px:PXLayoutRule runat="server" ID="CstPXLayoutRule19" StartColumn="True" ControlSize="XM" LabelsWidth="S"/>
<px:PXSelector runat="server" ID="CstPXSelector20" DataField="LandedCostCodeID" CommitChanges="True" DataSourceID="ds" DataMember="LandedCostCodeSelection"/>
</Template>
<CallbackCommands>
<Search CommitChanges="True"/>
</CallbackCommands>
</px:PXFormView>
<px:PXPanel runat="server" ID="LandedCostCodeSelectionButtons" SkinID="Buttons">
<px:PXButton runat="server" ID="CstButton4" DialogResult="OK" Text="OK"/>
<px:PXButton runat="server" ID="CstButton5" DialogResult="Cancel" Text="Cancel"/>
</px:PXPanel>
</px:PXSmartPanel>
I'm calling the dialog as follows:
if (LandedCostCodeSelection.AskExt((graph, view) =>
{
LandedCostCodeSelection.Cache.Clear();
},true) == WebDialogResult.OK)
{
}
I notice that when I click on the selector button and pick a row from the selector (which briefly returns a value to the field which is then overwritten right away) when I click on the selector button again, the selector has remembered the record I last selected.
Finally, if I invoke the dialog as follows:
if (LandedCostCodeSelection.AskExt((graph, view) =>
{
LandedCostCodeSelection.Cache.Clear();
LandedCostCodeSelection.Current.LandedCostCodeID = "XYZ";
},true) == WebDialogResult.OK)
{
}
Then the field is populated with XYZ and if I click OK I can reference the value of XYZ. (But if I use the selector, then the value is cleared and cannot be accessed again.)
The problem relies in the definition of the DataView and the DAC used. I have reproduced the issue and this is what I've changed to make it work:
Use a new custom DAC as a source for your view. Note that the field is not bound and is not key (does not have IsKey = true, as in LandedCostCode.LandedCostCodeID:
[Serializable]
[PXHidden]
public partial class LandedCostCodeFilter: IBqlTable
{
#region LandedCostCodeID
public abstract class landedCostCodeID : PX.Data.BQL.BqlString.Field<landedCostCodeID> { }
[PXString(15, IsUnicode = true)]
//[PXUnboudDefault("APPLE")] //optional, to preselect a value
[PXUIField(DisplayName = "Landed Cost Code",Visibility=PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(Search<LandedCostCode.landedCostCodeID>))]
public virtual String LandedCostCodeID {get; set}
#endregion
}
Change the DataView definition, using a PXFilter instead of PXSelect and use the new DAC
public PXFilter<LandedCostCodeFilter> LandedCostCodeSelection;
Correct that and your dialog should work.
Obs.
If you want to have a value pre-selected when you open the dialog, add [PXUnboudDefault("APPLE")] to the field in the DAC
Not sure how does your button definition look like, but here is what it should be:
public PXAction<POLandedCostDoc> SelectLandedCost;
[PXButton]
[PXUIField(DisplayName = "Select Landed Cost Code", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)]
protected void selectLandedCost()
{
if(LandedCostCodeSelection.AskExt(true) != WebDialogResult.OK) return;
// do some stuff here
}
Also, my aspx code:
<px:PXSmartPanel runat="server" ID="PanelAskForLCCode" Caption="Select Landed Cost Code" CaptionVisible="True" Key="LandedCostCodeSelection">
<px:PXFormView runat="server" ID="CstFormView2" DataMember="LandedCostCodeSelection" SkinID="Transparent" DataSourceID="ds" Height="100%" Width="100%">
<Template>
<px:PXLayoutRule runat="server" ID="CstPXLayoutRule3" StartColumn="True" />
<px:PXSelector runat="server" ID="CstPXSelector4" DataField="LandedCostCodeID" CommitChanges="True" AutoRefresh="True" />
<px:PXPanel runat="server" ID="LandedCostCodeSelectionButtons" SkinID="Buttons">
<px:PXButton runat="server" ID="CstButton6" DialogResult="OK" Text="OK" />
<px:PXButton runat="server" ID="CstButton7" DialogResult="Cancel" Text="Cancel" /></px:PXPanel></Template></px:PXFormView></px:PXSmartPanel>
We have a new page where we are looking to use the CS Attributes similarly to how they are used in the Item Class and Non Stock item pages
Item Class: Attribute definition.
Non Stock item page: Attribute implementation.
NOTE: I simplified the page to narrow down any potentially needed attributes in the ASPX.
Based on this, my Attribute definition page has the following elements:
Graph:
#region Datamembers
public PXSelect<MDEquipmentType> EquipmentType;
[PXViewName("Attributes")]
public CSAttributeGroupList<MDEquipmentType, MDEquipment> Mapping;
#endregion
ASPX:
<px:PXTabItem Text="Attributes">
<Template>
<px:PXGrid ID="grid" runat="server" DataSourceID="ds" Height="150px" Style="z-index: 100;
border: 0px;" Width="100%" ActionsPosition="Top" SkinID="Details" MatrixMode="True">
<Levels>
<px:PXGridLevel DataMember="Mapping">
<RowTemplate>
<px:PXSelector CommitChanges="True" ID="edAttributeID" runat="server" DataField="AttributeID" AllowEdit="True" FilterByAllFields="True" />
</RowTemplate>
<Columns>
<px:PXGridColumn DataField="IsActive" AllowNull="False" TextAlign="Center" Type="CheckBox" />
<px:PXGridColumn DataField="AttributeID" Width="81px" AutoCallBack="true" LinkCommand="CRAttribute_ViewDetails" />
<px:PXGridColumn AllowNull="False" DataField="Description" Width="351px" />
<px:PXGridColumn DataField="SortOrder" TextAlign="Right" Width="81px" SortDirection="Ascending" />
<px:PXGridColumn AllowNull="False" DataField="Required" TextAlign="Center" Type="CheckBox" />
<px:PXGridColumn AllowNull="True" DataField="CSAttribute__IsInternal" TextAlign="Center" Type="CheckBox" />
<px:PXGridColumn AllowNull="False" DataField="ControlType" Type="DropDownList" Width="81px" />
<px:PXGridColumn AllowNull="True" DataField="DefaultValue" Width="100px" RenderEditorText="False" />
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Enabled="True" MinHeight="150" />
</px:PXGrid>
</Template>
</px:PXTabItem>
Result:
So far so good, all records are persisted in the DB correctly in the table CSAttributeGroup
Now, the problem comes when I try to apply the attributes in the data entry page.
This is the page:
When the Equipment Type is set, the attribute grid does not populate.
Graph definition:
public class MDEquipmentEntry : PXGraph<MDEquipmentEntry, MDEquipment>
{
#region Datamembers
public PXSelect<MDEquipment> Equipment;
public CRAttributeList<MDEquipment> Answers;
ASPX:
<px:PXTabItem Text="Attributes">
<Template>
<px:PXGrid ID="PXGridAnswers" runat="server" Caption="Attributes" DataSourceID="ds" SkinID="Inquire" Width="100%" Height="200px" MatrixMode="True">
<Levels>
<px:PXGridLevel DataMember="Answers">
<Columns>
<px:PXGridColumn DataField="AttributeID" />
<px:PXGridColumn DataField="isRequired" TextAlign="Center" Type="CheckBox" Width="80px"/>
<px:PXGridColumn DataField="Value" Width="300px" AllowShowHide="False" AllowSort="False" />
</Columns>
<Layout FormViewHeight="" />
</px:PXGridLevel>
</Levels>
<AutoSize Enabled="True" MinHeight="200" />
<ActionBar>
<Actions>
<Search Enabled="False" />
</Actions>
</ActionBar>
<Mode AllowAddNew="False" AllowColMoving="False" AllowDelete="False" />
</px:PXGrid>
</Template>
</px:PXTabItem>
In the Nonstock item page the attribute is loaded immediately after inserting the Item Class. So I made sure that the commitChanges attribute was added to my page. Also looked for a FieldUpdated event that could be triggering the insertion but that does not appear to be needed.
What could be missing from my code?
The implementation of CRAttributeList depends on a class ID field being defined somewhere in your class. Upon initialization, CRAttributeList will look for a field in your MDEquipment DAC decorated with the CRAttributesField attribute.
For the InventoryItem DAC, here's how it is defined:
[CRAttributesField(typeof(InventoryItem.itemClassID))]
public virtual string[] Attributes { get; set; }
If system is unable to determine the current class ID, your attributes grid will not be populated with anything.
I am trying to show the preview text in one of my custom grid. This is similar to Activities tab on Case screen (CR306000). I have written below code but still it is not showing the preview text if I select Activities from the grid. Please suggest.
Code for DataView-
[PXFilterable]
[PXPreview(typeof(CRAcumaticaActivity))]
[PXViewName("AcumaticaActivities")]
public PXSelect<CRAcumaticaActivity,
Where<CRAcumaticaActivity.cloud9CaseID, Equal<Current<CRCase.caseCD>>>,
OrderBy<Desc<CRAcumaticaActivity.lastModifiedByDateTime>>> AcumaticaActivities;
HTML Code for gridwithpreview-
<px:PXTabItem Text="Acumatica Activities" LoadOnDemand="True">
<Template>
<pxa:PXGridWithPreview runat="server" PrimaryViewControlID="form" PreviewPanelStyle="z-index: 100; background-color: Window" GridSkinID="Inquire" PreviewPanelSkinID="Preview" NoteField="" AllowSearch="True" BlankFilterHeader="All Acumatica Activities" MatrixMode="true" DataSourceID="ds" DataMember="AcumaticaActivities" ID="grdAActivities" BorderWidth="0px" Width="100%">
<AutoSize Enabled="True" MinWidth="100" MinHeight="100" />
<ActionBar ActionsText="true" DefaultAction="AcuViewActivity" PagerVisible="False">
<CustomItems>
<px:PXToolBarButton Text="Get Activities">
<AutoCallBack Target="ds" Command="GetActivities" /></px:PXToolBarButton>
<px:PXToolBarButton Text="Publish Activity">
<AutoCallBack Target="ds" Command="PublishActivity" /></px:PXToolBarButton></CustomItems></ActionBar>
<GridMode AllowAddNew="False" AllowUpdate="False" AllowDelete="False" AllowFormEdit="False" AllowUpload="False" />
<Levels>
<px:PXGridLevel DataMember="AcumaticaActivities">
<RowTemplate />
<Columns>
<px:PXGridColumn DataField="ActivityID" Visible="False" AllowShowHide="False" AutoCallBack="true" />
<px:PXGridColumn DataField="Type" Width="250px" AutoCallBack="" />
<px:PXGridColumn DataField="Summary" Width="20" LinkCommand="AcuViewActivity" Visible="" />
<px:PXGridColumn DataField="Status" Width="50px" />
<px:PXGridColumn DisplayFormat="g" DataField="StartDate" Width="90px" />
<px:PXGridColumn DataField="Owner" Width="90px" /></Columns></px:PXGridLevel></Levels>
<PreviewPanelTemplate>
<px:PXHtmlView runat="server" DataField="Description" ID="edAcuDescrip" Height="100px" SkinID="Label" Width="100%">
<AutoSize Enabled="true" Container="Parent" /></px:PXHtmlView></PreviewPanelTemplate>
<CallbackCommands>
<Refresh PostData="Page" CommitChanges="True" /></CallbackCommands></pxa:PXGridWithPreview></Template></px:PXTabItem></Items>
<AutoSize Container="Window" Enabled="True" MinHeight="100" MinWidth="300" ></AutoSize>
</px:PXTab>
Finally found the answer and it is working now.
You should add PXPreview attribute to your Data View. In which first parameter should be your base DAC and second should be the child one.
For Example-
[PXPreview(typeof(CRCase), typeof(CRAcumaticaActivity))]
I was trying to recreate your setup but there is too much involved to get it working completely. However, I did notice that the DataField attribute on the PXHtmlView control is pointing to Description. It may not make a difference, but try changing it to description with a lower-case D and see if that solves the problem. I believe the DataField property needs to point to the class in the DAC and not the property itself.
Hope that helps.
Acumatica is seriously gonna make me cry. I have followed the tutorial in T100 to create a simple inquiry screen. When I open it, the screen is blank. I can see the layout in design view, when I load the screen it is blank.
My graph:
public class QLInventoryMaint : PXGraph<QLInventoryMaint>
{
public QLInventoryMaint()
{
ResponseRec.Cache.AllowInsert = false;
ResponseRec.Cache.AllowDelete = false;
ResponseRec.Cache.AllowUpdate = false;
}
[Serializable]
public class StrainFilter : IBqlTable
{
#region DisplayID
public abstract class displayID : PX.Data.IBqlField
{
}
protected String _DisplayID;
[PXString(4)]
[PXUIField(DisplayName = "Display ID")]
public virtual String DisplayID
{
get
{
return this._DisplayID;
}
set
{
this._DisplayID = value;
}
}
#endregion
}
public PXCancel<StrainFilter> Cancel;
public PXFilter<StrainFilter> StrainFilterRec;
[PXFilterable]
public PXSelectReadonly<StrainResult, Where<StrainResult.displayID, Equal<Current<StrainFilter.displayID>>>> ResponseRec;
}
My page:
<%# Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="SO301010.aspx.cs" Inherits="Page_SO301010" Title="Untitled Page" %>
<%# MasterType VirtualPath="~/MasterPages/FormDetail.master" %>
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" Runat="Server">
<px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" PrimaryView="StrainFilterRec" TypeName="PX.Objects.SO.QLInventoryMaint">
</px:PXDataSource>
</asp:Content>
<asp:Content ID="cont2" ContentPlaceHolderID="phF" Runat="Server">
<px:PXFormView ID="form" runat="server" DataSourceID="ds" Style="z-index: 100"
Width="100%" DataMember="StrainFilterRec" TabIndex="2500">
<Template>
<px:PXLayoutRule runat="server" StartRow="True"/>
<px:PXTextEdit ID="edDisplayID" runat="server" AlreadyLocalized="False" DataField="DisplayID" DefaultLocale="">
</px:PXTextEdit>
</Template>
</px:PXFormView>
</asp:Content>
<asp:Content ID="cont3" ContentPlaceHolderID="phG" Runat="Server">
<px:PXGrid ID="grid" runat="server" DataSourceID="ds" Style="z-index: 100"
Width="100%" Height="150px" SkinID="Details" TabIndex="3500" TemporaryFilterCaption="Filter Applied">
<EmptyMsg ComboAddMessage="No records found.
Try to change filter or modify parameters above to see records here." NamedComboMessage="No records found as '{0}'.
Try to change filter or modify parameters above to see records here." NamedComboAddMessage="No records found as '{0}'.
Try to change filter or modify parameters above to see records here." FilteredMessage="No records found.
Try to change filter to see records here." FilteredAddMessage="No records found.
Try to change filter to see records here." NamedFilteredMessage="No records found as '{0}'.
Try to change filter to see records here." NamedFilteredAddMessage="No records found as '{0}'.
Try to change filter to see records here." AnonFilteredMessage="No records found.
Try to change filter to see records here." AnonFilteredAddMessage="No records found.
Try to change filter to see records here."></EmptyMsg>
<Levels>
<px:PXGridLevel DataKeyNames="DisplayID" DataMember="ResponseRec">
<Columns>
<px:PXGridColumn DataField="Name" Width="200px">
</px:PXGridColumn>
<px:PXGridColumn DataField="Abbreviation">
</px:PXGridColumn>
<px:PXGridColumn DataField="ClonesCount" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="PlantsCount" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="HarvestedCount" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="WetFlowerWeight" TextAlign="Right">
</px:PXGridColumn>
<px:PXGridColumn DataField="DryFlowerWeight" TextAlign="Right">
</px:PXGridColumn>
</Columns>
</px:PXGridLevel>
</Levels>
<AutoSize Container="Window" Enabled="True" MinHeight="150" />
</px:PXGrid>
</asp:Content>
I wanted originally to create a lookup screen with no database fields, but I was getting the same result. I decided just o follow tutorial and create inquiry screen. I hate this framework.
My guess is the Current<> display ID is not getting set so the query for the grid is empty. You can do a SQL trace to confirm but I would use CommitChange="True" on the filter field in your page...
<px:PXTextEdit ID="edDisplayID" runat="server" AlreadyLocalized="False" DataField="DisplayID" CommitChanges="True">
It appears that FormDetail creation does not work in 17.204.0019. I created the screen in 17.202.0016 and it worked fine. I imported the screen into 17.204.0019 and it also worked. Can anyone confirm or deny this?
I have a RadGrid with KeyboardNavigation allowed, RowSelection enabled.
When i click on a row using the mouse, the post back happens and i perform the necessary operations that i wish to do.
Now, when i use the keyboard up/down keys to change the row selection, the grid does change the SelectedRow (the display shows the selection happening). But the control does not post back in this case.
Anybody know how to create a postback after a row is changed by the keyboard?
jai telengana
function keyPress(sender, args) {
if (args.get_keyCode() == 13) {
args.set_cancel(true);
if (sender._activeRow) {
sender._activeRow.click();
}
}
}
<telerik:RadGrid ID="Manage_Group_RadGrid" AllowFilteringByColumn="true" OnItemCommand="Manage_Group_RadGrid_ItemCommand" AllowPaging="true" AllowMultiRowSelection="true" OnItemDataBound="Manage_Group_RadGrid_ItemDataBound" ShowStatusBar="true"
AllowSorting="true" OnDataBinding="Manage_Group_RadGrid_DataBinding" OnNeedDataSource="Manage_Group_RadGrid_NeedDataSource" GroupingEnabled="true" ShowGroupPanel="true" OnGroupsChanging="Manage_Group_RadGrid_GroupsChanging"
PagerStyle-AlwaysVisible="true"
PageSize="15" Height="440px"
DataKeyNames="cn" runat="server">
<EditItemStyle BackColor="green" />
<MasterTableView DataKeyNames="cn" AutoGenerateColumns="false"
PagerStyle-AlwaysVisible="true" GroupsDefaultExpanded="false" CommandItemDisplay="Top">
<Columns>
<telerik:GridBoundColumn DataField="cn" HeaderText="cn" SortExpression="cn" UniqueName="cn"
ItemStyle-Width="200px" HeaderStyle-Width="200px" />
<telerik:GridBoundColumn DataField="cn" HeaderText="sAMAccountName" SortExpression="sAMAccountName" UniqueName="sAMAccountName"
ItemStyle-Width="200px" HeaderStyle-Width="200px" />
</Columns>
<CommandItemSettings ShowAddNewRecordButton="false" />
</MasterTableView>
<GroupingSettings CaseSensitive="false" />
<GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
<ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="false">
**<ClientEvents OnKeyPress="keyPress" />**
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>