public partial class FrmAttributeTable : Form
{
private AxMapControl m_MapCtl;
public FrmAttributeTable(AxMapControl pMapCtl)
{
InitializeComponent();
m_MapCtl = pMapCtl;
} private void FrmAttributeTable_Load(object sender, EventArgs e)
{
ILayer pLayer = m_MapCtl.get_Layer(0);
IFeatureLayer pFLayer = pLayer as IFeatureLayer;
IFeatureClass pFC = pFLayer.FeatureClass; IFeatureCursor pFCursor = pFC.Search(null, false);
IFeature pFeature = pFCursor.NextFeature(); DataTable pTable = new DataTable(); DataColumn colName = new DataColumn("ID");
colName.DataType = System.Type.GetType("System.String");
pTable.Columns.Add(colName); DataColumn pBSM = new DataColumn("BSM");
pBSM.DataType = System.Type.GetType("System.String");
pTable.Columns.Add(pBSM); DataColumn colArea = new DataColumn("TBMJ");
colArea.DataType = System.Type.GetType("System.String");
pTable.Columns.Add(colArea); int indexOfID = pFC.FindField("ID");
int indexOfBSM = pFC.FindField("BSM");
int indexOfTBMJ = pFC.FindField("TBMJ"); while (pFeature != null)
{
string id = pFeature.get_Value(indexOfID).ToString();
string bsm = pFeature.get_Value(indexOfBSM).ToString();
string TBMJ = pFeature.get_Value(indexOfTBMJ).ToString();
DataRow pRow = pTable.NewRow();
pRow[0] = id;
pRow[1] = bsm;
pRow[2] = TBMJ;
pTable.Rows.Add(pRow);
pFeature = pFCursor.NextFeature();
}
dataGridView1.DataSource = pTable;
}
}

ae_datagridview显示属性的更多相关文章

  1. 使用shape来定义控件的一些显示属性

    Android中常常使用shape来定义控件的一些显示属性,今天看了一些shape的使用,对shape有了大体的了解,稍作总结 先看下面的代码: <shape> <!-- 实心 -- ...

  2. NX二次开发-UFUN获取对象的显示属性(图层,颜色,空白状态,线宽,字体,高亮状态)UF_OBJ_ask_display_properties

    NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_obj.h> UF_initialize( ...

  3. [ html canvas globalCompositeOperation ] canvas绘图属性 设置合成图像如何显示 属性演示

    <!DOCTYPE html> <html lang='zh-cn'> <head> <title>Insert you title</title ...

  4. AngularJS的ng-repeat显示属性名和属性值

    代码下载:https://files.cnblogs.com/files/xiandedanteng/AngularJSAuthorRepeat.rar 代码: <!DOCTYPE HTML P ...

  5. display显示属性理解

    display属性设置一个元素应如何显示,是我们在前端开发中常常使用的一个属性,其中,最常见的有: 目录 display:none;表示此元素将不被显示. display:block;将元素显示为块元 ...

  6. JSP——JSTL定制标签 - 递归标签显示属性结构

    编写定制标签分为三个步骤:编写标签处理器.配置标签.使用标签. 1.标签处理器 标签处理器和标签是一一对应的关系 package com.oolong.utils.customtags;   impo ...

  7. [显示属性]-自定义桌面里没有IE选项

    1楼 哈哈,我来告诉你原因,微软为了应对欧盟的反垄断调查,在 SP3 的“自定义桌面”里去掉了 Internet Explorer 选项. 如果桌面 IE 图标被误删除,但是又想恢复,而不是建立快捷方 ...

  8. JavaScript中如何给按钮设置隐藏与显示属性

    */ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:text.html * 作者:常轩 * 微信公众号:Worldh ...

  9. JSTL定制标签 - 递归标签显示属性结构

随机推荐

  1. CSS选择器的一些记录

    选择器 例子 例子描述 CSS .class .intro 选择 class="intro" 的所有元素. 1 #id #firstname 选择 id="firstna ...

  2. 漫谈可视化Prefuse(五)---一款属于我自己的可视化工具

    伴随着前期的基础积累,翻过API,读过一些Demo,总觉得自己已经摸透了Prefuse,小打小闹似乎已经无法满足内心膨胀的自己.还记得儿时看的<武状元苏乞儿>中降龙十八掌最后一张居然是空白 ...

  3. Android安装BusyBox(三星N7108)

    近期公司安卓app测试,分配任务为监控APP内存.CPU占用率.因安卓是基于linux开发,故很容易就联想使用Linux监控相关的命令.想法总是美好的,现实总是残酷的,使用三星 Galaxy Note ...

  4. Windows Azure Virtual Machine (1) IaaS用户手册

    <Windows Azure Platform 系列文章目录> Azure IaaS用户手册  - Azure IaaS相关技术- Azure虚拟机成本分析- 创建Azure虚拟机- 使用 ...

  5. Azure PowerShell (1) PowerShell整理

    <Windows Azure Platform 系列文章目录> 把之前Azure ASM的PowerShell都整理好了. https://github.com/leizhang1984/ ...

  6. SQL Server代理(10/12):使用代理账号运行作业

    SQL Server代理是所有实时数据库的核心.代理有很多不明显的用法,因此系统的知识,对于开发人员还是DBA都是有用的.这系列文章会通俗介绍它的很多用法. 在这一系列的上一篇,你查看了msdb库下用 ...

  7. vim黏贴自动增加tab的毛病

    vim在ctrl + p的时候有可能会自动给你增加了个tab 很是郁闷   解决方法如下: :set noautoindent :set nosmartindent

  8. 基于HTML5的3D网络拓扑自动布局

    上篇将HT for Web的3D拓扑弹力布局的算法运行在Web Workers后台(http://www.hightopo.com/blog/70.html),这篇我们将进一步折腾,将算法运行到真正的 ...

  9. Android Studio快捷键每日一练(4)

    原文地址:http://www.developerphil.com/android-studio-tips-of-the-day-roundup-4/ 33.分析数据流到当前位置 苹果/Windows ...

  10. 打开IE错误解决方法

    1. 502.1 Internal Server Error Handle svc-Integraged has a bad module ManagedPipelineHandle解决方法:此种情况 ...