Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell what column or cell is being edited
Message
De
26/02/2013 09:50:24
 
 
À
25/02/2013 12:59:32
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Divers
Thread ID:
01566855
Message ID:
01566932
Vues:
33
>>>>>e.Column.Header gives me "Invoice #", but if I then change the # to "Number" because that's what the client wants then my code breaks. I can't see anything in there that gives me "txtInv_Number"
>>>>
>>>>Don't know if you can get that. Bit ugly but could you depend on the binding? :
DataGridBoundColumn b = e.Column as DataGridBoundColumn;
>>>>            var v = b.Binding as System.Windows.Data.Binding;
>>>>            if (v.Path.Path == "crt_invfk")
>>>>            {
>>>>               //This is the column
>>>>            }
>>>
>>>thanks Viv, that works for me!
>>
>>Good. Bit of a kludge tho :-{
>>You could use a custom header but probably not worth it......
>
>A lot of what I've done feels like kludges :) so it fits right in. Why do you say this one is a kludge?

Just hoped there would be a cleaner way of implementing it - but since that doesn't seem to be the case then I guess it's OK :-}
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform