Question: I have a custom control which has non-dependency properties but I want to bind a list to the property. How can this be achieved?

The reason I cannot use dependency properties is because i am generating the data in a different thread to the UI.

Thanks in advance.

Answer: 
I might have not got this right from your question, but I think this should work. If you could show some sample data and expected output then we can definitely have a sure answer.

```
SELECT EmployeeID
    SUM(CASE WHEN DocIDErr > 1 THEN 0 ELSE 1 END)
FROM
(SELECT EmployeeID
   , Error1
   , ROW_NUMBER() OVER (PARTITION BY EmployeeID ORDER BY DocumentName) AS DocIDErr
FROM SubmittedDocuments) AS RS
GROUP BY EmployeeID

```
I don't think you want aggregation. I think you just want to select the first document for each name. 

If so, this may be what you want:

```
select sd.*,
       ((case when error1 = '0' then 1 else 0 end) +
        (case when error2 = '0' then 1 else 0 end) +
        (case when error3 = '0' then 1 else 0 end)
       ) as numerrors
from (select sd.*,
             row_number() over (partition by documentname order by submittedid) as seqnum
      from SumittedDocuments sd
     ) sd
where seqnum = 1;

```