private void grdBase_onLoadDataGrid(object sender, Control.GridView.DataBindArgs e)
        {
            PortfolioHead entity = new PortfolioHead();
            entity.portfolio_head_name = txtName.Text; 
            entity.portfolio_head_code = txtCode.Text;
            entity.portfolio_head_desc = txtDesc.Text;

            grdBaseHead.DataSourceDataSet = ServiceProvider.PortfolioHeadService.GetGridPortfolioHead(entity); 

            grdBaseHead.DataKeyName = new string[] { DataKeyID };
            grdBaseHead.HiddenColumnName = new List<string>() { "ID" };
        }
 private void grdBase_onSelectedDataRow(object sender, Control.GridView.RowEventArgs e)
 {
     object result = base.OpenPopup<InPopupSelectWarehouse>();
     if (result != null)
     {
         Dictionary<string, object> dataKey = (Dictionary<string, object>)sender;
         PortfolioHead entity = new PortfolioHead();
         entity.portfolio_head_id = dataKey[DataKeyID].ToLong();                
         DataSet dsPortfolioDetail = ServiceProvider.PortfolioDetailService.GetGridPortfolioDetail(entity);
         ComboBoxDTO dto = (ComboBoxDTO)result;
         if(dsPortfolioDetail.Tables.Count > 0){
             foreach (DataRow dr in dsPortfolioDetail.Tables[0].Rows) { 
                 dr["warehouse_id"] = dto.Value.ToLong();
                 dr["warehouse_name"] = dto.Display;
             }
         }
         this.ClosePopup(dsPortfolioDetail);
     }
 }