C# DEV GridView总结

从实际工作中总结的

 1         /// <summary>
 2         /// 省份Grid上焦点行改变时
 3         /// </summary>
 4         /// <param name="sender"></param>
 5         /// <param name="e"></param>
 6         private void GVProvince_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 7         {
 8             //焦点行号
 9             int intRow = e.FocusedRowHandle;
10             if (intRow > -1)
11             {
12                 //从焦点行号上,获取具体列的值
13                 strProID = GVProvince.GetRowCellValue(intRow, "PRO_ID").ToString();
14                 FrmProvinceHandle.StrProvinceID = strProID;
15             }
16             string strCityModel = WebLockConfig.Instance.webProvince.GetCityDSByProvince(strProID);
17             DataSet ds = Newtonsoft.Json.JsonConvert.DeserializeObject<DataSet>(strCityModel);
18 
19             GCCity.DataSource = ds.Tables[0];
20         }

 

posted @ 2012-12-22 10:32  杨斌_济南  阅读(1873)  评论(0编辑  收藏  举报