Bump? Really need some guidance having a hard time finding related info in forum
--- In vantage@yahoogroups.com, "Anon" <epicor-team@...> wrote:
>
> I am using the part bin adapter to bring back parts and their lots for me and attaches it to the datasource of a custom grid. How can i have it that a user can click a row then the data from the grid returns to the native data view. Below is what I have with no errors, but at run time I get index of array errors. Is there another way I should be setting the dataview values.
>
> private void GetPartTranDetails()
> {
> // Get required keys
> PartBinSearchAdapter adpPartBin = new PartBinSearchAdapter(oTrans);
> adpPartBin.BOConnect();
> string partNum = edvIM.dataView[edvIM.Row]["PartNum"].ToString();
> string whseCode = "Main";
>
> // Peform lookup
> DataSet dsPartBin = adpPartBin.GetFullBinSearch(partNum, whseCode);
>
> // Set to EpiDataGrid
> grdLotNums.DataSource = dsPartBin.Tables[0];
>
> // Clean Up
> adpPartBin.Dispose();
>
> }
>
> private void edvIM_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
> {
> // ** Argument Properties and Uses **
> // view.dataView[args.Row]["FieldName"]
> // args.Row, args.Column, args.Sender, args.NotifyType
> // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
> // EpiMessageBox.Show(args.NotifyType.ToString());
> if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
> {
> if ((args.Row > -1))
> {
> if (view.dataView[args.Row]["PartNum"] != "")
> {
> GetPartTranDetails();
> }
> }
> }
> }
>
> private void grdLotNums_AfterRowActivate(object sender, System.EventArgs args)
> {
> // Set the lotNum and qty fields from grid
> edvIM.dataView[edvIM.Row]["LotNum"] = grdLotNums.Selected.Rows[0].Cells["LotNum"].Value.ToString();
> edvIM.dataView[edvIM.Row]["TranQtyNum"] = grdLotNums.Selected.Rows[0].Cells["OnHandQty"].Value.ToString();
> }
>