Esempio n. 1
0
        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count <= 0)
            {
                return;
            }

            object value = dataGridView1.SelectedRows[0].Cells[Table.OIDFieldName].Value;

            if (value == null || value == DBNull.Value)
            {
                return;
            }

            if (FeatLayer != null)
            {
                FeatureLocation?.Invoke(this, new FeatureLocationEventArgs(FeatLayer, $"{Table.OIDFieldName} = {value}"));
            }
        }