惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
Project Zero
Project Zero
T
Tailwind CSS Blog
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Heimdal Security Blog
博客园 - 【当耐特】
W
WeLiveSecurity
J
Java Code Geeks
Latest news
Latest news
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
博客园 - Franky
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
PCI Perspectives
PCI Perspectives
博客园_首页
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
P
Palo Alto Networks Blog
I
InfoQ
Security Latest
Security Latest
Hacker News: Ask HN
Hacker News: Ask HN
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
F
Full Disclosure
Cyberwarzone
Cyberwarzone
D
DataBreaches.Net
The Cloudflare Blog
S
Securelist
美团技术团队
C
Cybersecurity and Infrastructure Security Agency CISA
AI
AI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events

博客园 - 真的很菜

用户中心 - 博客园 C++Builder 2007 一个JS的问题,请帮下忙! 对谷歌输入发的一点疑虑 开始练习VS2003了 VC++.NET编译的问题 SQL查询结果的合并问题 Visual studio 2005 sdk 安装引起的后果 几个微软的好东西! SQL 查询,请帮忙 Visual studio 已安装模版错误怎么解决? 想学ASP建站,有几个问题,请帮忙解决,谢谢! Win2003 IIS配置asp的问题 不要轻易删除/windows/install下文件 xp下安装sqlserver2000提示有挂起 Daemon Tools手工完全卸载方案 [转]将visual studio 2005 SP1补丁整合到安装文件 转:FTP命令全集(收藏) TurboTweaks-解除Turbo Explorer限制
求助:DataGrid加行号的问题
真的很菜 · 2007-07-01 · via 博客园 - 真的很菜

我的数据是fname,lname

private void Page_Load(object sender, System.EventArgs e)
        
{
            
if(!IsPostBack)
            
{
                myConnection
=new SqlConnection("server=127.0.0.1;uid=sa;pwd=sa;database=qqq;");
                strSQL
="SELECT fname AS [First Name], lname AS [Last Name FROM Employee";
                myCommand
=new SqlDataAdapter(strSQL,myConnection);
                myCommand.Fill(ds,
"Employee");
                ds.Tables[
0].Columns.Add("No");
                DataGrid1.DataSource
=ds.Tables["Employee"].DataSet;

                
for   (int   i=0;i<ds.Tables[0].Rows.Count;i++)   
                
{   
                    ds.Tables[
0].Rows[i]["No"]=i+1;   
                }
 
                DataGrid1.DataBind();
            }

        }

但是显示时候结构是No,First Name,Last Name,No,最后这个No怎么去掉,请指导下,谢谢!