摘要:        
ASPxGridView之Master-DetailASPxGridView之Master-Detail参考页面官方demo:http://demos.devexpress.com/ASPxGridViewDemos/MasterDetail/MasterDetail.aspxMaster-Detail能够使主表与子表的信息在同一页面展示,无须新建子表页面。一直用一个grid,点击每行的详细按钮或链接,转到子表页面。今天尝试使用ASPxGridView中的Master-Detail完成了一个列表页面,下面是我的制作步骤及其经验总结:1、在aspx页面上拖放2个控件。aspxgridview和O    阅读全文
posted @ 2012-09-12 23:23
小锋神
阅读(2076)
评论(1)
推荐(0)
        
            
        
        
摘要:        
父控件中一定要邦定主键,KeyFieldName="sheet_no";接下来就是后台邦定代码了,如何邦定我父控件,前面都说过了,接下来,我们看如何邦定子控件,因为子控件在后台调不出来,所以,我再加一个SqlDataSource控件,用它来邦定子控件,这个邦定要动态的去,在展开行事件中写 private void NewMethod(int i) {//得到主键值 object var = this.grid.GetRowValues(i, new string[] { "sheet_no" }); this.SqlDataSource1.DataSou    阅读全文
posted @ 2012-09-12 23:19
小锋神
阅读(483)
评论(0)
推荐(0)
        
            
        
        
摘要:        
private void bindASPxNavBar() { DataTable dt = DB.FillDataTable_Pro("select item_clsname,item_clsno from bi_t_item_cls where item_flag=0 and len(item_clsno)=2"); this.ASPxNavBar1.Groups.Clear(); DevExpress.Web.ASPxNavBar.NavBarGroup group = new DevExpress.Web.ASPxNavBar.NavBarGroup(); for     阅读全文
posted @ 2012-09-12 23:16
小锋神
阅读(721)
评论(1)
推荐(0)
        
            
        
        
摘要:        
后台帮定代码:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;public partial class Default2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { Datagrid(); } private void Datagrid    阅读全文
posted @ 2012-09-12 23:15
小锋神
阅读(5115)
评论(1)
推荐(0)
        
            
        
        
摘要:        
一文,我有的地方说错了,子项邦定数据,是完全可以动态的,昨天才研究出来,//邦定数据方法 private void NewMethod(int i) { ASPxGridView subGrid = (ASPxGridView)this.grid.FindDetailRowTemplateControl(i, "subGrid");//得到子项控件的名称 object var = this.grid.GetRowValues(i, new string[] { "sheet_no" });//得到点击行的主键, DataTable data = ...    阅读全文
posted @ 2012-09-12 23:13
小锋神
阅读(522)
评论(1)
推荐(0)
        
            
        
        
摘要:        
ASPxGridView1没有自带的单击,双击事件,所以要自己写, <script language="javascript" type="text/javascript"><!-- function OnGridFocusedRowChanged() { var t = grid.GetRowValues(grid.GetFocusedRowIndex(), 'sheet_no', OnGetRowValues); } function OnGetRowValues(values) { ...    阅读全文
posted @ 2012-09-12 23:12
小锋神
阅读(2272)
评论(1)
推荐(1)
        
                    
                
浙公网安备 33010602011771号