<syncfusion:GridTemplateColumn HeaderText="Product Name" syncfusion:FocusManagerHelper.WantsKeyInput="True"
MappingName="ProductName">
<syncfusion:GridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Center"
syncfusion:FocusManagerHelper.FocusedElement="True"
Text="{Binding ProductName}"
TextAlignment="Right" />
</DataTemplate>
</syncfusion:GridTemplateColumn.CellTemplate>
<syncfusion:GridTemplateColumn.EditTemplate>
<DataTemplate>
<ComboBox SelectedItem="{Binding ProductName}"
syncfusion:FocusManagerHelper.FocusedElement="True"
ItemsSource="{Binding Path=DataContext.ComboBoxItemsSource,ElementName=grid}"
IsDropDownOpen="{Binding Path=DataContext.IsDropDownOpen,ElementName=grid}"
/>
</DataTemplate>
</syncfusion:GridTemplateColumn.EditTemplate>
</syncfusion:GridTemplateColumn>
<syncfusion:GridTemplateColumn Width="100"
syncfusion:FocusManagerHelper.WantsKeyInput="True"
MappingName="SupplierID" >
<syncfusion:GridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Center"
Text="{Binding SupplierID}"
TextAlignment="Right" />
</DataTemplate>
</syncfusion:GridTemplateColumn.CellTemplate>
<syncfusion:GridTemplateColumn.EditTemplate>
<DataTemplate>
<syncfusion:DoubleTextBox
Text="{Binding SupplierID}"
syncfusion:FocusManagerHelper.FocusedElement="True">
</syncfusion:DoubleTextBox>
</DataTemplate>
</syncfusion:GridTemplateColumn.EditTemplate>
</syncfusion:GridTemplateColumn> |
Hi,
Thank you for your reply.
I tried to implement the code into my code but it seems that the binding still won't work.
Could you please help me implement the code from the attachment into the code you have created.?
Also,
I want to merge cell headers but when I use StackedHeaderRow I get the result (1) - how can I get the result (2) (Please see Example).
Regards,
Dov.
Query 1:
To implement the code into my code but it seems that the binding still won't work. Could you please help me implement the code from the attachment into the code you have created.?
|
We have checked your provided sample. In that sample you haven’t used SfDatGrid, Can you check and revert to us?
| ||
Query 2:
I want to merge cell headers but when I use StackedHeaderRow I get the result (1) - how can I get the result (2) (Please see Example).
|
You can achieve your requirement by handling QueryRowHeight event as show like below code,
Code Snippet: Xaml
Code Snippet: C#
Sample: http://www.syncfusion.com/downloads/support/forum/131223/ze/GridDropDownAndReadOnlyColumns-683357015
|