您的位置:程序门 -> .net技术 -> asp.net



使用detailviews,我是自定义的数据源


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


使用detailviews,我是自定义的数据源
发表于:2007-02-08 12:47:07 楼主
使用detailviews,我是自定义的数据源(使用datasource\databind),如何进行编辑、删除、插入等操作,这写应当写在什么事件里,谁有代码让小弟研究下,谢谢。
发表于:2007-02-08 12:52:371楼 得分:0
你以前用过datagrid吗?如果用过就像那个一样.
发表于:2007-02-08 14:38:402楼 得分:0
该回复于2007-12-21 20:51:52被管理员或版主删除
发表于:2007-02-08 14:48:043楼 得分:0
commandfield   field   =   new   commandfield();
                        field.showdeletebutton   =   true;
                        thisgrid.columns.add(field);

commandfield     field   =   new   commandfield();
                        field.showeditbutton   =   true;
                        thisgrid.columns.add(field);

protected   void   grid_rowcommand(object   sender,   gridviewcommandeventargs   e)
        {
                try
                {
                        int   index   =   int.parse(e.commandargument.tostring());
                        if   (grid.rows.count   >   0)
                        {
                                if   (e.commandname   ==   "edit ")
                                {
                                }
                                else   if   (e.commandname   ==   "delete ")
                                {
                                }
                        }
                        else
                        {
                                return;
                        }
                }
                catch   {   }
        }


快速检索

最新资讯
热门点击