In measured document of Word-inspired project we have to use IDocument interface. How do I add a new paragraph to document and set its text alignment without having to know the alignment of previous paragraph? ChangeParagraphTextAlignment method behaves differently based on the current paragraph alignment. If current is Center, and we "change" to Center the result is Left. If current is Left and we "change" to Left the result is Justify. The method really really wants to change the alignment.
So in my code I do InsertParagraph(), not knowing how the previous paragraph was aligned. How to center-align this new paragraph?
I suppose I can use ClearAllFormatting, but now here's the followup question. How to reuse all other paragraph properties from previous paragraph, like indentation and spacing, and just set text alignment to Center?
I could make two calls, "change" to Justify, and then to Center. Whatever was the starting state we should reach Center, but this looks like a hack to me. In case we want to set the alignment to Left we would have to make three calls to make sure we actually reach Left state (for instance "change" to Right, then Justify, then Left).I feel this should not be so complicated.
Hi
Is it possible to capture/export the display of the map tool as a pdf or jpg?
Eg A method along the lines of save as xxx.pdf
thanks
Good afternoon,
I wasn't sure if this question belongs in the WaitingBar thread or RadLayoutControl, but here is the problem.
I have a standard C# UserControl, with a RadLayoutControl that is docked to the parent(UserControl). The layoutcontrol has several items in it and that part works well. What I would *like* to be able to do is on creation of the user control, have a waiting bar of the spin variety show over the LayoutControl until a few items that need to retrieve data are ready to be shown. The smart tag will let me assign the WaitingBar.AssociatedControl to the RadLayoutControl, but if I call the waitBar.StartWaiting(), I can't see the bar.
I can seem to successfully have the WaitingBar appear over any of the components within the LayoutControl, but I would really like it to go over the entire LayoutControl if possible.
I hope that makes sense, and thanks for any help you might have.
Mike
Hello
I have a databound gridview in which I change two columns from standard cell to dropdown cells
So far everything is fine, when I select a value in the dropdownlist, the grid is properly updated.
However I need to validate the user's selection from the dropdown list and cancel the change if not authorized based on various conditions.
I have tried various methods, such as using the callvalidating or cellvaluechanged events but I have not managed to cancel the change when not authorized. Moreover in some cases the dropdown is no longer available.
As a workaround I perform the check in the cellvaluechanged event reload completely the grid when the change is not authorized but this is far from being efficient.
Herebelow the code snipet of the celvaluechanged event
----------------------------------------------------------------------------------------------------------------------------------------------
Select Case e.Column.Name
Case "Ctrldd"
Dim mEntry As New mEntry(MyConnectionString)
mEntry.UpdateCtrl(context, theEntry.idEntry, e.Value)
ShowEntryDetails(theEntry.idEntry)
Case "HCdd"
Dim mEntry As New mEntry(MyConnectionString)
If mEntry.CheckHCChange(theEntry, theCompetition.Label.Scope) Then
mEntry.UpdateHC(context, theEntry.idEntry, e.Value)
ShowEntryDetails(theEntry.idEntry)
Else
MessageBox.Show(My.Resources.Entry.ChangeHCNotAllowed, My.Resources.Main.WarningMsg, MessageBoxButtons.OK, MessageBoxIcon.Information)
'request a reload of the grid
RaiseEvent RefreshRequired()
End If
End Select
----------------------------------------------------------------------------------------------------------------------------------------------
Thanks in advance for any advice
Pierre-Jean
Hello
I have added a Clear Button in a Rad TextBoxCOntrol
However it shows up at the left of the text box and my understanding is that it should appear at the far right.
I have not found a property that specifiys the Clear Button Position.
Thanks in advance
Pierre-Jean
Hi, which control can I use to connect to sql server and get a list of database names (without manual implementation)? Currently I have to use manual code to get the database + table name then add to the some controls like treeview and listbox respectively
(I think I should use treeview because maybe I need to list database then whole table in the database but I'm not sure whether it supports this)
Thanks in advance!