We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

InsertTableCommand and ShowInsertTableDialogCommand

Hi,

I am using the SfRichTextBoxAdv component and I want to implement the InsertTableCommand in my UI.

You provide two Commands to insert the table. But I have two little questions.
With the ShowInsertTableDialogCommand, I obtain the generic form in English, but my customers are French. Is there a way to translate the form?

So I decided to create my own UI and use the InsertTableCommand, but I don't know what I need to pass to the parameter object to get my table with the number of columns and rows I want, So I just wanted to know how to pass the parameter for this command?

Thank you for your answer.

Regards,

Marvin 

3 Replies

VM Venkatesan Mani Syncfusion Team February 25, 2016 09:01 AM UTC

Hi Marvin,

Thank you for contacting Syncfusion support.

Regarding “ShowInsertTableDialog”:
Our SfRichTextBoxAdv WPF control provides localization support. You can localize every static text in the SfRichTextBoxAdv control to any desired language. Please find the sample from the following link.

Sample link:
Localization

Regarding “InsertTableCommand”:
In SfRichTextBoxAdv control, the InsertTableCommand inserts a 1x2 table by default. You can also specify the size of the table to be inserted using string or integer array as parameters. The following code example demonstrates how to specify the table size as parameter for InsertTableCommand.

<Grid>

    <Grid.RowDefinitions>

      <RowDefinition Height="Auto"/>

      <RowDefinition/>

    </Grid.RowDefinitions>

    <StackPanel Orientation="Horizontal">

      <!--Insert table without parameter.-->

      <Button Content="InsertTableCommand with empty parameter" Width="150" Height="40" Margin="5" Command="Syncfusion:SfRichTextBoxAdv.InsertTableCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}"></Button>

      <!--Insert table command with string parameter. The string specifies the row size and column size separated by comma.-->

      <Button Content="InsertTableCommand with string parameter"  Width="150" Height="40" Margin="5" Command="Syncfusion:SfRichTextBoxAdv.InsertTableCommand" CommandParameter="2,3" CommandTarget="{Binding ElementName=richTextBoxAdv}"></Button>

      <!--Insert table command with integer array parameter. Array contains 2 values row and column count respectively.-->

      <Button Content="InsertTableCommand with int array parameter" Width="150" Height="40" Margin="5" Command="Syncfusion:SfRichTextBoxAdv.InsertTableCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}">

        <Button.CommandParameter>

          <x:ArrayExtension Type="Sys:Int32">

            <Sys:Int32>2</Sys:Int32>

            <Sys:Int32>3</Sys:Int32>

          </x:ArrayExtension>

        </Button.CommandParameter>

      </Button>

    </StackPanel>

    <Syncfusion:SfRichTextBoxAdv x:Name="richTextBoxAdv" Grid.Row="1"/>
  </Grid>


We have also prepared a sample tried on our side to demonstrate the same. Please find the sample from following link.

Sample Link:
Sample.zip

Regards,
Venkatesan M.


AD Atlante Dev Team March 1, 2016 07:32 AM UTC

Hi,

Thank you, I chose the localization solution and it works well!

Regards,

Marvin


VM Venkatesan Mani Syncfusion Team March 2, 2016 04:16 AM UTC

Hi Marvin, 

Thank you for your update.

Please let us know if you require any further assistance. We will be happy to assist you.

Regards, 

Venkatesan M.

Loader.
Up arrow icon