<telerik:RadGridView x:Name="RadGridView1" ShowGroupPanel="False" CanUserResizeColumns="False" CanUserFreezeColumns="False" ItemsSource="{Binding Items, Source={StaticResource model}, Mode=OneWay}" IsReadOnly="True" AutoGenerateColumns="false" DataLoadMode="Asynchronous" IsFilteringAllowed="False" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Col2}" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Col3}" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Col4}" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Col5}" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Col6}" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Col7}" /> </telerik:RadGridView.Columns> </telerik:RadGridView><DataGrid ItemsSource="{Binding Items, Source={StaticResource model}}" RowHeight="25" CellStyle="{StaticResource Test}" />
I have managed to set up a PRISM region within the radRibbonView.RadRibbonTab which then has radRibbonGroup's loaded in from the modules containing the buttons for that module. All good so far, however the modules donot load in the order which the radribbongroups need to appear in the tab.
I have tried using the radOrderedwrappanel in conjunction with the groupvariant priority as per snippit below to provide a solution with no luck. Is there a way of doing this or will I have to look into custom loading order of the modules?
I ahve also added a custom regionAdaptor which seems to be working fine to allow the radribbongroups to be loaded into the orderedwrappanel. However the ordering and sizing didnt work - it started wrapping after 3 ribbonGroups and it didnt order the groups correctly.
<telerik:RadRibbonGroup Header=" Order Search "> <telerik:RadRibbonGroup.Variants> <telerik:GroupVariant Priority="2" Variant="Large"/> </telerik:RadRibbonGroup.Variants> <telerik:RadOrderedWrapPanel> <telerik:RadRibbonButton LargeImage="/Icons/48/Search.png" Size="Large" telerik:ScreenTip.Title="Order Search"/> </telerik:RadOrderedWrapPanel> </telerik:RadRibbonGroup>--- OnRowDragOvervar details = DragDropPayloadManager.GetDataFromObject(e.Data, "DropDetails") as DropIndicationDetails;--- OnDropvar draggedItem = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedItem");var details = DragDropPayloadManager.GetDataFromObject(e.Data, "DropDetails") as DropIndicationDetails;private void SetMergeFieldReadOnly(MergeField field, RadRichTextBox richTextBox, bool isReadonly) { var fieldEnd = richTextBox.Document.EnumerateChildrenOfType<FieldRangeEnd>() .FirstOrDefault(fs => (fs.FieldRangeStart.Field is MergeField) && (((MergeField)fs.FieldRangeStart.Field).PropertyPath == field.PropertyPath)); if (fieldEnd != null) { var fieldStart = fieldEnd.FieldRangeStart; var posFieldStart = new DocumentPosition(richTextBox.Document); var posFieldEnd = new DocumentPosition(richTextBox.Document); posFieldStart.MoveToInline(fieldStart); posFieldEnd.MoveToInline(fieldEnd); if (isReadonly) // add readonlyrange { richTextBox.Document.Selection.Clear(); richTextBox.Document.Selection.SetSelectionStart(posFieldStart); richTextBox.Document.Selection.AddSelectionEnd(posFieldEnd); richTextBox.InsertReadOnlyRange(); } else // remove readonlyrange { // 1st method - doesn't work. //richTextBox.Document.Selection.Clear(); //richTextBox.Document.Selection.SetSelectionStart(posDebField); //richTextBox.Document.Selection.AddSelectionEnd(posFinField); //richTextBox.DeleteReadOnlyRange(); // <-- no error but the field is still readonly after that. // 2nd method - works but not properly var readOnlyRangeStarts = richTextBox.Document.EnumerateChildrenOfType<ReadOnlyRangeStart>(); var posDebReadOnly = new DocumentPosition(richTextBox.Document); var posFinReadOnly = new DocumentPosition(richTextBox.Document); foreach (var readOnlyRangeStart in readOnlyRangeStarts) { if (readOnlyRangeStart.End != null) { posDebReadOnly.MoveToInline(readOnlyRangeStart); posFinReadOnly.MoveToInline(readOnlyRangeStart.End); if ((posFinReadOnly >= posFieldStart) && (posDebReadOnly <= posFieldEnd)) { richTextBox.DeleteReadOnlyRange(readOnlyRangeStart); // remove the protection on ALL the readonly range !!! } } } } } }