we created a separate web page to open it as a popup window.
In this popup window we used <dynamics:AXhierarchicalGridView> control
---------------------------------------------------------------------------------------------
<dynamics:AxHierarchicalGridView ID="AxHierarchicalGridView1" runat="server"
BodyHeight="" DataKeyNames="RecId" DataMember="HierarchyTreeTable"
DataSetCachingKey="de2bf1a9-e221-49d4-a9bd-c30e9ec66429"
DataSourceID="DS_MyEPActivityTreeView" EnableModelValidation="True"
HierarchyIdFieldName="ElementNumber"
HierarchyParentIdFieldName="ParentElementNumber" ShowFilter="false"
HierarchyTitleField="activityNumber**" Width="395px">
<Columns>
<dynamics:AxBoundField DataField="activityNumber**"
DataSet="MyEPActivityTreeView" DataSetView="HierarchyTreeTable">
</dynamics:AxBoundField>
<dynamics:AxBoundField DataField="Name" DataSet="MyEPActivityTreeView"
DataSetView="HierarchyTreeTable" SortExpression="Name">
</dynamics:AxBoundField>
</Columns>
</dynamics:AxHierarchicalGridView>
-------------------------------------------------------------------------------------------
In the code behind of this control we are using below code.
--------------------------------------------------------------------------------------------------------
protected void Page_Init(object sender, EventArgs e)
{
// Determine whether the control is being used in a lookup.
AxLookup lookupControl = AxLookup.GetLookup(this);
if (lookupControl != null)
{
// It is a lookup, so set properties and register events.
this.AxHierarchicalGridView1.ShowContextMenu = false;
this.AxHierarchicalGridView1.ShowFilter = true;
// Register the events to handle.
lookupControl.OkClicked += new EventHandler<AxLookupEventArgs>(lookupControl_OkClicked);
this.DS_MyEPActivityTreeView.CreatingDataSetRun += new EventHandler<CreatingDataSetRunEventArgs>(DS_MyEPActivityTreeView_CreatingDataSetRun);
}
}
protected void DS_MyEPActivityTreeView_CreatingDataSetRun(object sender, CreatingDataSetRunEventArgs e)
{
e.DataSetRunArgs.parm = (string)Session["ProjId"];
}
protected void lookupControl_OkClicked(object sender, AxLookupEventArgs e)
{
// Get the current row in the data source used for the control.
DataSetViewRow currentRow = this.DS_MyEPActivityTreeView.GetDataSourceView(this.AxHierarchicalGridView1.DataMember).DataSetView.GetCurrent();
if (currentRow != null)
{
e.LookupControl.TargetITextControl.Text = (string)currentRow.GetFieldValue("activityNumber**");
}
}
-------------------------------------------------------------------------------------------------------------------
On the parent page we used <dynamics:AxBoundField> control for Activities
---------------------------------------------------------------
<dynamics:AxBoundField DataSet="TSTimesheetEntry" DataSetView="TSTimesheetLine" HeaderText="<%$ AxLabel:@SYS54618 %>" SortExpression="ActivityNumber"
DataField="activityTxt**" LookupButtonDisplaySettings="Always" AutoPostBack="True" ItemStyle-Width="11%">
<ItemStyle Width="11%" />
-----------------------------------------
In code behind of the TSTimesheetEntry web page , we are just putting value of Project Id into Session variable which we are getting from the popup window. This is a drawback where ProjectId remains in the session for the lifetime of the user session. but we did not have any choice.