Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day,
I'm trying to use c # to find in the attribute table the text for which I only know the beginning and I would need to find all the values ​​that correspond to it.
The code itself is not a problem, I just don't know how to replace the part I don't know.


Thank you all for your advice.

What I have tried:

C#
protected override async void OnClick()
{
await QueuedTask.Run(() =>
{
FeatureLayer fl = MapView.Active.Map.FindLayers("O_Klad_ZTM10").First() as FeatureLayer;
QueryFilter qf = new QueryFilter();
string whereClause = "ZTM10_nom = '0602-***'"; //stars mean the part I don't know
qf.WhereClause = whereClause;

using (RowCursor rowCursor = fl.Search(qf))
{
while (rowCursor.MoveNext())
{
fl.Select(qf);
}
}
});
}


for example the text looks like: 0301-A-01,....., 0602-A-01,0602-A-02, ..., 0809-D-09
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900