user1938080
user1938080

Reputation: 1

How can I access content of a XamGrid Column

I have created a XamGrid in a silverlight page in WCF. in which I have a column called "status" . It has three values which are : complete, start, ongoing. for these values I want to set add an image beside the text. How can I access XamGrid column contents from Code behind. I have used something like:

XamGrid1.column.[2].key

but it is returning me the column name. and I want the value in that column.. Please someone help me do this?

Upvotes: 0

Views: 596

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222582

Hi add a event Cellclicked to your datagrid

              if (this.Yourdatagrid.ActiveCell != null)
             {
                Custom.DuoInventory.Dealer OBJ= new YourObject();
                if (((List<Yourdatasource>)Yourdatagrid.ItemsSource).Count == 0) return;
                OBJ = (YourObject)Yourdatagrid.ActiveCell.Row.Data;
              }

then you can access your each member.

Upvotes: 0

Related Questions