Beispiel #1
0
        private void ugrdSession_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                //figure out where the cursor is, get the UI element it clicked on
                Point cursor = new Point(e.X, e.Y);
                Infragistics.Win.UIElement clicked = ((UltraGrid)sender).DisplayLayout.UIElement.ElementFromPoint(cursor);

                //try to get the cell if one was clicked on
                UltraGridCell cell = clicked.GetContext(typeof(UltraGridCell)) as UltraGridCell;

                if (cell != null) //Assuming we actually clicked a cell
                {
                    miInactive.Text = "Make " + cell.Row.Cells["Session Name"].Text + " Inactive";
                    miInactive.Tag  = cell.Row.Cells["id"].Text;
                    mnSessionRightClick.Show(ugrdSession, cursor);
                    cell.Row.Selected = true;
                }
            }
        }
        private void grdDataEPP_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataEPP.Rows[row.Index].Selected = true;
                    _TypeofEEPId = grdDataEPP.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataEPP.Rows[row.Index].Selected = true;
                    contextMenuTypeEPP.Items["modificarToolStripMenuItem"].Enabled = true;
                    _TypeofEEPName   = grdDataEPP.Selected.Rows[0].Cells[3].Value.ToString();
                    _Percentage      = double.Parse(grdDataEPP.Selected.Rows[0].Cells[4].Value.ToString());
                    _TypeofEEPId     = grdDataEPP.Selected.Rows[0].Cells[0].Value.ToString();
                    _objTypeOfEEPamc = _TempTypeOfEEPList.FindAll(p => p.v_TypeofEEPId == _TypeofEEPId).FirstOrDefault();
                    _IndexListEPP    = _TempTypeOfEEPList.FindIndex(p => p.v_TypeofEEPId == _TypeofEEPId);
                }
                else
                {
                    contextMenuTypeEPP.Items["modificarToolStripMenuItem"].Enabled = false;
                }
            }
        }
        private void grdDataDangers_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataDangers.Rows[row.Index].Selected = true;
                    _WorkstationDangersId = grdDataDangers.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
        }
Beispiel #4
0
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    _strProductId = grdData1.Selected.Rows[0].Cells["v_ProductId"].Value.ToString();
                    BindGridGrdData1andGrdData2(_strProductId);
                }
            }
        }
        private void grdDataPeople_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                System.Drawing.Point       point     = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                // Capturar valor de una celda especifica al hace click derecho sobre la celda k se quiere su valor
                Infragistics.Win.UltraWinGrid.UltraGridCell cell = (Infragistics.Win.UltraWinGrid.UltraGridCell)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridCell));
                Infragistics.Win.UltraWinGrid.UltraGridRow  row  = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataPeople.Rows[row.Index].Selected = true;
                    _IndexgrdDataPeople = row.Index;
                }
            }
        }
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            Point point = new System.Drawing.Point(e.X, e.Y);

            Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

            if (uiElement == null || uiElement.Parent == null)
            {
                return;
            }

            // Capturar valor de una celda especifica al hace click derecho sobre la celda k se quiere su valor
            Infragistics.Win.UltraWinGrid.UltraGridCell cell = (Infragistics.Win.UltraWinGrid.UltraGridCell)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridCell));
            Infragistics.Win.UltraWinGrid.UltraGridRow  row  = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

            if (row != null)
            {
                grdData.Rows[row.Index].Selected = true;
                contextMenuGrdData.Items["removerToolStripMenuItem"].Enabled = true;
                _rowIndex = row.Index;
            }
            else
            {
                contextMenuGrdData.Items["removerToolStripMenuItem"].Enabled = false;
            }
        }
Beispiel #7
0
        private void grdDataMedicalExamFields_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    _RowIndexgrdDataMedicalExamFields = row.Index;
                    grdDataMedicalExamFields.Rows[row.Index].Selected = true;
                    contextMenuMedicalExamFields.Items["mnuGridNewMedicalExamField"].Enabled    = true;
                    contextMenuMedicalExamFields.Items["mnuGridEditMedicalExamField"].Enabled   = true;
                    contextMenuMedicalExamFields.Items["mnuGridDeleteMedicalExamField"].Enabled = true;
                    contextMenuMedicalExamFields.Items["importarToolStripMenuItem"].Enabled     = true;
                }
                else
                {
                    if (grdDataMedicalExam.Selected.Rows.Count != 0)
                    {
                        contextMenuMedicalExamFields.Items["mnuGridNewMedicalExamField"].Enabled = true;
                        contextMenuMedicalExamFields.Items["importarToolStripMenuItem"].Enabled  = true;
                    }
                    else
                    {
                        contextMenuMedicalExamFields.Items["mnuGridNewMedicalExamField"].Enabled = false;
                        contextMenuMedicalExamFields.Items["importarToolStripMenuItem"].Enabled  = false;
                    }

                    contextMenuMedicalExamFields.Items["mnuGridEditMedicalExamField"].Enabled   = false;
                    contextMenuMedicalExamFields.Items["mnuGridDeleteMedicalExamField"].Enabled = false;
                }
            }
        }
        private void grdDataCommponentField_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    btnDeleteCommponent.Enabled = true;
                    grdDataCommponentField.Rows[row.Index].Selected = true;
                    _ComponentFieldId = grdDataCommponentField.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataCommponentField.Rows[row.Index].Selected = true;
                    contextMenuImport.Items["modificarToolStripMenuItem"].Enabled = true;
                    _GroupName             = grdDataCommponentField.Rows[0].Cells[2].Value.ToString();
                    _ComponentFieldId      = grdDataCommponentField.Selected.Rows[0].Cells[0].Value.ToString();
                    _objComponentFieldsamc = _TempComponentFieldsList.FindAll(p => p.v_ComponentId == _ComponentId && p.v_ComponentFieldId == _ComponentFieldId).FirstOrDefault();
                    _IndexList             = _TempComponentFieldsList.FindIndex(p => p.v_ComponentId == _ComponentId && p.v_ComponentFieldId == _ComponentFieldId);
                }
                else
                {
                    contextMenuImport.Items["modificarToolStripMenuItem"].Enabled = false;
                }
            }
        }
Beispiel #9
0
        private void grdDataUserExternal_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    btnDelete.Enabled = true;
                }
                else
                {
                    btnDelete.Enabled = false;
                }
            }
        }
Beispiel #10
0
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            Point point = new System.Drawing.Point(e.X, e.Y);

            Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);


            if (uiElement == null || uiElement.Parent == null)
            {
                return;
            }

            Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));
            if (e.Button == MouseButtons.Left)
            {
                if (row != null)
                {
                    _ServicioId         = grdData.Selected.Rows[0].Cells["ServicioId"].Value.ToString();
                    _RutaLarga          = grdData.Selected.Rows[0].Cells["RutaLarga"].Value.ToString();
                    _Paciente           = grdData.Selected.Rows[0].Cells["Paciente"].Value.ToString();
                    _PersonId           = grdData.Selected.Rows[0].Cells["PersonId"].Value.ToString();
                    _ProtocolId         = grdData.Selected.Rows[0].Cells["ProtocolId"].Value.ToString();
                    btnArchivo1.Enabled = true;
                    btnAgregar.Enabled  = true;
                }
            }
            else
            {
                btnArchivo1.Enabled = false;
                btnAgregar.Enabled  = false;
            }
        }
        private void grd_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grd.Rows[row.Index].Selected = true;
                    _protocolId = row.Cells["v_ProtocolId"].Value.ToString();
                    cmProtocol.Items["Edit"].Enabled   = true;
                    cmProtocol.Items["Clonar"].Enabled = true;
                }
                else
                {
                    cmProtocol.Items["Edit"].Enabled   = false;
                    cmProtocol.Items["Clonar"].Enabled = false;
                }
            }
        }
Beispiel #12
0
        private void grdDataPeopleAuthoritation_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataPeopleAuthoritation.Rows[row.Index].Selected = true;
                    _AuthorizedPersonId = grdDataPeopleAuthoritation.Rows[row.Index].Cells["v_AuthorizedPersonId"].Value.ToString();

                    if (grdDataPeopleAuthoritation.Rows[row.Index].Cells["d_EntryToMedicalCenter"].Value != null)
                    {
                        //contextMenuStrip1.Items["mnuGridCancelar"].Enabled = true;
                        btnCancelPersonAuthoritation.Enabled = true;
                    }
                    else
                    {
                        //contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                        btnCancelPersonAuthoritation.Enabled = false;
                    }
                }
                else
                {
                    //contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                    btnCancelPersonAuthoritation.Enabled = false;
                }
            }
        }
Beispiel #13
0
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdData.Rows[row.Index].Selected = true;
                    _CalendarId = grdData.Rows[row.Index].Cells["v_CalendarId"].Value.ToString();
                    _DocNumber  = grdData.Rows[row.Index].Cells["v_DocNumber"].Value.ToString();
                    _PersonId   = grdData.Rows[row.Index].Cells["v_PersonId"].Value.ToString();
                    if (grdData.Rows[row.Index].Cells["i_CalendarStatusId"].Value.ToString() == ((int)CalendarStatus.Ingreso).ToString())
                    {
                        contextMenuStrip1.Items["mnuGridCancelar"].Enabled = true;
                    }
                    else
                    {
                        contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                    }
                }
                else
                {
                    contextMenuStrip1.Items["mnuGridCancelar"].Enabled = false;
                }
            }
        }
        private void grdServiciosAnteriores_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdServiciosAnteriores.Rows[row.Index].Selected = true;
                    _serviceIdByWiewServiceHistory = grdServiciosAnteriores.Selected.Rows[0].Cells["v_ServiceId"].Value.ToString();
                    //cmVerServicioAnterior.Items["mnuVerServicio"].Enabled = true;
                }
                else
                {
                    //cmVerServicioAnterior.Items["mnuVerServicio"].Enabled = false;
                }
            }
        }
Beispiel #15
0
        private void grdData_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdData.Rows[row.Index].Selected = true;
                    contextMenuStrip1.Items["mnuGridNuevo"].Enabled              = true;
                    contextMenuStrip1.Items["mnuGridModificar"].Enabled          = true;
                    contextMenuStrip1.Items["eliminarToolStripMenuItem"].Enabled = true;
                }
                else
                {
                    contextMenuStrip1.Items["mnuGridNuevo"].Enabled              = true;
                    contextMenuStrip1.Items["mnuGridModificar"].Enabled          = false;
                    contextMenuStrip1.Items["eliminarToolStripMenuItem"].Enabled = false;
                }
            }
        }
Beispiel #16
0
        private void grdDataRecommendation_MouseDown(object sender, MouseEventArgs e)
        {
            Point point = new System.Drawing.Point(e.X, e.Y);

            Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

            if (uiElement == null || uiElement.Parent == null)
            {
                return;
            }

            // Capturar valor de una celda especifica al hace click derecho sobre la celda k se quiere su valor
            Infragistics.Win.UltraWinGrid.UltraGridCell cell = (Infragistics.Win.UltraWinGrid.UltraGridCell)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridCell));
            Infragistics.Win.UltraWinGrid.UltraGridRow  row  = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

            if (row != null)
            {
                grdDataRecommendation.Rows[row.Index].Selected = true;
                contextMenuRecommendation.Items["mnuRemoveRecommendation"].Enabled = true;
                _rowIndexRecommendation = row.Index;

                if (grdDataRecommendation.Selected.Rows[0].Cells[0].Value != null)
                {
                    _ComponentFieldValuesRecommendationId = grdDataRecommendation.Selected.Rows[0].Cells[0].Value.ToString();
                }
            }
            else
            {
                contextMenuRecommendation.Items["mnuRemoveRecommendation"].Enabled = false;
            }
        }
Beispiel #17
0
        private void grdDataMedicalExam_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataMedicalExam.Rows[row.Index].Selected = true;
                    contextMenuMedicalExam.Items["mnuGridNewMedicalExam"].Enabled    = true;
                    contextMenuMedicalExam.Items["mnuGridEditMedicalExam"].Enabled   = true;
                    contextMenuMedicalExam.Items["mnuGridDeleteMedicalExam"].Enabled = true;
                }
                else
                {
                    contextMenuMedicalExam.Items["mnuGridNewMedicalExam"].Enabled    = true;
                    contextMenuMedicalExam.Items["mnuGridEditMedicalExam"].Enabled   = false;
                    contextMenuMedicalExam.Items["mnuGridDeleteMedicalExam"].Enabled = false;
                }
            }
            if (e.Button == MouseButtons.Left)
            {
                Point point = new System.Drawing.Point(e.X, e.Y);
                Infragistics.Win.UIElement uiElement = ((Infragistics.Win.UltraWinGrid.UltraGridBase)sender).DisplayLayout.UIElement.ElementFromPoint(point);

                if (uiElement == null || uiElement.Parent == null)
                {
                    return;
                }

                Infragistics.Win.UltraWinGrid.UltraGridRow row = (Infragistics.Win.UltraWinGrid.UltraGridRow)uiElement.GetContext(typeof(Infragistics.Win.UltraWinGrid.UltraGridRow));

                if (row != null)
                {
                    grdDataMedicalExam.Rows[row.Index].Selected = true;
                    strMedicalExamId = grdDataMedicalExam.Selected.Rows[0].Cells[0].Value.ToString();
                    _ComponentName   = grdDataMedicalExam.Selected.Rows[0].Cells[1].Value.ToString();
                    BindGridMedicalExamFields(strMedicalExamId);
                }
            }
        }