I have the following method to set the visibility of a field in a ITable :
public void UpdateAttributeVisibility ( string name, bool visible )
{
try
{
IWorkspace workspace = Connect( Environment.MachineName, "5151", "sde", "sde", "sde", "DEFAULT", "SampleDataSet" );
if ( workspace != null )
{
IFeatureWorkspace featureWorkspace = ( IFeatureWorkspace )workspace;
string qualifiedName = GetQualifiedName( workspace, "LUPAP_NP_PARCEL" );
if ( !string.IsNullOrEmpty( qualifiedName ) )
{
ITable table = featureWorkspace.OpenTable( qualifiedName );
IStandaloneTable standaloneTable = new StandaloneTableClass();
standaloneTable.Table = table;
if ( table != null )
{
int index = ( ( ITableFields )standaloneTable ).FindField( name );
IFieldInfo info = ( ( ITableFields )standaloneTable ).get_FieldInfo( index );
info.Visible = visible;
//now how do I Commit these changes?????????????
}
}
}
}
catch ( Exception exc )
{
Log.Fail( exc.StackTrace );
throw exc;
}
}
the question is how can I set visibility of the desired column(field) so that this visibility is permanent in the ITable?
I would appreciate any help
regards.