Hi,
I want to create a Data Template at runtime and add it to the XamGrid HeaderTemplate. I am creating the Columns from codebehind, what I want ist one TextBlock and one Button and One image in the Column Header. and On Click of Button I want to change the Image url. and TextBlock Text. Please let me know how to do this as early as possible.
Thanks
I am new to silverlight and started learning a week ago . I am wondering of how to do the following task.
I have a datagrid defined in the silverlight XAML file and whose datasource is bound to the observalbecollection at runtime in the code behind file. Now I want to add a checkbox for each row being generated at runtime and when the uses selects this checkbox and I want to make sure that all the columns in theat row have content entered.
Dear,
I already tried like that. But It was throwing an exception "Can't add to the datatemplate".
I will explain the problem in detail below,
This is how I defined the datagrid in xaml file.
When it comes to the code behind file, I have done the following things
datagrid.Columns.Clear();
AddColumn("Id", "AuthorID");
AddColumn("bod", "BOD");
In addcolumn method I am actually creating the datagridtextcolumn and adding it to the dagagrid.
Binding binding = new Binding { Converter = convert, ConverterParameter = name, Mode = BindingMode.TwoWay, Path = new PropertyPath("Data") };
At some part in the code I am assigning datagrid.Itemsource=list
Could you please now tell me where I can add a checkbox.