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

推荐订阅源

www.infosecurity-magazine.com
www.infosecurity-magazine.com
D
DataBreaches.Net
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
F
Full Disclosure
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
Help Net Security
Help Net Security
L
LangChain Blog
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
Google Online Security Blog
Google Online Security Blog
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
B
Blog RSS Feed
N
Netflix TechBlog - Medium
N
News | PayPal Newsroom
TaoSecurity Blog
TaoSecurity Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Vulnerabilities – Threatpost
B
Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
I
Intezer
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
AI
AI
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyberwarzone
Cyberwarzone
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
G
GRAHAM CLULEY
Vercel News
Vercel News
罗磊的独立博客
MyScale Blog
MyScale Blog
Last Week in AI
Last Week in AI
博客园 - 司徒正美
C
CERT Recently Published Vulnerability Notes
GbyAI
GbyAI
Scott Helme
Scott Helme
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Troy Hunt's Blog
A
About on SuperTechFans
P
Privacy International News Feed

博客园 - 真的很菜

用户中心 - 博客园 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怎么去掉,请指导下,谢谢!