ITableView2 allows editing even when setting its property 'AllowEditing' to false.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM031460
已提交
January 18, 2008
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
编程语言
C#
修正版本
9.3
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
Close the 'Attribute table', create a new TableView object and show it in a Windows Form. Something like: ISet appWindows = ((IApplicationWindows)ArcMap).DataWindows; appWindows.Reset(); for( object dataWindow = appWindows.Next(); dataWindow != null; dataWindow = appWindows.Next()) { if(dataWindow is ITableWindow ) { ITableWindow tableWindow = (ITableWindow)dataWindow; IFeatureClass fClass = tableWindow.FeatureLayer.FeatureClass; if (WorkspaceIsEditable(fClass.FeatureDataset.Workspace)) { ITableControl control = tableWindow.TableControl; if (control != null ) { // create a new TableView object ITableView2 tv = new TableViewClass(); tv.Table = (ITable)tableWindow.FeatureLayer; // close the original ‘attribute table’ IDataWindow2 idw2; idw2 = tableWindow; idw2.Destroy(); // create a Windows Form to show the TableView object Form m_Form = new Form(); Size m_Size=new Size (710, 420); m_Form.Size=m_Size; m_Form.TopMost =true; m_Form.Show(); tagRECT tgr2; tgr2.left = 0; tgr2.top = 0; tgr2.right = 700; tgr2.bottom = 380; tv.Show ((int)m_Form.Handle, ref tgr2, true); } } } }