Select to view content in your preferred language

ArcGIS Windows Mobile Populate WorkList Page programmatically

670
0
05-04-2013 02:18 AM
MichaelSalahoris
Emerging Contributor
How can I populate the WorkList Page programmatically with features selected using a queryfilter?
The code below does not populate the DisplayName and the EditState.

ESRI.ArcGIS.Mobile.FeatureCaching.FeatureDataReader fDreader = mCache.FeatureSources[3].GetDataReader(qFilter, null);
ESRI.ArcGIS.Mobile.FeatureCaching.FeatureType feattype = FindFeatureTypeByName(lName);
            while (fDreader.Read())
            {
                 ESRI.ArcGIS.Mobile.Client.Feature lFeat = new Feature(feattype, null);
                for (int i = 0; i < fDreader.FieldCount; i++)
                {
                    string colName = fDreader.GetName(i);
                    object ontot = fDreader.GetValue(i);

                    lFeat.FeatureDataRow[colName] = ontot;
                }
                taska.WorkList.AddFeature(lFeat);              
            }          
            fDreader.Close();
       


public static FeatureType FindFeatureTypeByName(string name)
        {
            foreach (FeatureSourceInfo fsinfo in MobileApplication.Current.Project.EnumerateFeatureSourceInfos())
            {
               
                foreach (FeatureType featureType in fsinfo.FeatureTypes)
                {
                        if (featureType.Name.ToLower() == name.ToLower())
                        return featureType;
                }

            }
            return null;
        }

Any answer will be appreciated
Thank you in advance
0 Kudos
0 Replies