Hi,
As per my requirement , I need to apply specific style for Cell.
Once you applied style, Cell will have Value, Border Color and image depends on the collection set it in binding.
To achieve above requirement..which Targettype need to be used to apply Style?
Thanks,
Chandra
Hi Yanko,
Have you got a chance to look into the issue?
Could you please help me with sample
Thanks in advance,
Regards,
Thanks for your email..
>>
I have been looking into your last post and if you want to set ‘BorderBrush’ property when applying the ‘CellValuePresenter’ style, you can try to check the coming value from ColumnInfo.CellInfo by some ‘if’ state.
<<
Yes. The BorderBrush property need to be set from ColumnInfo.CellInfo class(BorderColor) property.and it need to apply to cell when CellValuePresenterstyle is applied.
Could you please help me,how can achieve the above scenario.
Thank you,
Hello,
Thank you for your reply. I have been looking into your last post and if you want to set ‘BorderBrush’ property when applying the ‘CellValuePresenter’ style, you can try to check the coming value from ColumnInfo.CellInfo by some ‘if’ state.
Let me know, if I cannot understand your scenario completely.
I am binding Xamdatagrid to DataTable but BorderColor is not column in DataTable. In my case, DataTable columns are Name, Description,SRLoLimit,Status,Value
c1 = new ColumnInfo("Name", DisplayType.TextBlock, new CellInfo(Brushes.Purple),false);
c2 = new ColumnInfo("Description", DisplayType.TextBlock);
c3 = new ColumnInfo("SRLoLimit", DisplayType.Button);
c4 = new ColumnInfo("Status", DisplayType.ComboBox, MyProperty);
c5 = new ColumnInfo("Value", DisplayType.TextBox);
And 2nd Parameter for ColumnInfo is UI Type. and 3rd parameter is BorderColor
And I am updating DataRows information from RowInfo class as below
RowInfo row2 = new RowInfo();
row2.rowData.Add("CV002");
row2.rowData.Add("Sample Description CV002");
row2.rowData.Add("0");
row2.rowData.Add("InActive");
row2.rowData.Add("200");
rows.Add(row2);
foreach (RowInfo rowItem in Rows) {
dr = dt.NewRow();
for (int i = 0; i < Columns.Count; i++)
{ dr[Columns[i].Name] = rowItem.rowData[i];
}
dt.Rows.Add(dr);
Consider, I want to apply the BorderColor property to BorderBrush and the BorderColor value is getting from ColumnInfo.CellInfo and it should be applicable only to value "CV002".
So Could you please let me how can I achieve the above mentioned in Style of CellValuePresenter.
Hello Chandra,
I am just checking if you require any further assistance on the matter.