Hi Robert,
Thanks for
the patience.
We have
analyzed your query. You can set the properties of a control in a Template from
the QueryCellInfo event as follows.
Code snippet [C#]:
void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs
e)
{
CellUIElements
cell=dataGrid.Model.CurrencyManager.CurrentCell.Grid.GetCellUIElements(e.Style.RowIndex,
e.Style.ColumnIndex);
if (cell != null)
{
Console.WriteLine(cell.UIElements.Count);
if (cell.UIElements.Count
> 0)
{
GridCell gridcell = cell.UIElements[0] as GridCell;
if (gridcell != null)
{
ContentPresenter myContentPresenter =
FindVisualChild<ContentPresenter>(gridcell);
DataTemplate myDataTemplate =
myContentPresenter.ContentTemplate;
var checkval = myDataTemplate.FindName("customersCombo", myContentPresenter);
if (checkval != null)
{
ComboBox combo = checkval as ComboBox;
if (combo != null)
{
// set properties for combobox
combo.Background
= Brushes.LightPink;
combo.FontStyle = FontStyles.Italic;
}
}
}
}
}
}
|
We
have prepared a sample based on this. You can find the sample under the
following location.
Please
let us know if you have any queries.
Regards,
Thangapriya
Hi Robert,
We have modified the sample to work with the version
9.404.0.62. Please find the sample in the
following location.
Please let us know if you have any
queries.
Regards,
Thangapriya
Hi Robert,
The file you are looking for is not available due to
a server failure at one of our hosting sites. We are making every effort to
retrieve this file and other files that are unavailable as a result of this
outage. We regret this inconvenience. We will inform you when the file has been
recovered. Please contact us for further assistance.
However we have attached the sample and please find
the sample in the following location.
Regards,
Thangapriya