Help with removing data in C1TrueDBGrid

Posted by: Victor.m.charles.civ on 5 February 2020, 5:35 am EST

    • Post Options:
    • Link

    Posted 5 February 2020, 5:35 am EST

    Hello,

    How do I remove , (2) from rows in my Grid?

    For example if my Grid contains multiple rows with: This is a test (2) Notify your parents

    I want to see: This a test; Notify your parents. By removing (2) and replace it with “;” before Notify.

    Thanks,

    Victor

  • Posted 5 February 2020, 3:43 pm EST

    Hi Victor,

    Use the code snippet given below to remove “(2)” and replace it with “;” in the 5th column :

    For i As Integer = 0 To C1TrueDBGrid1.Splits(0).Rows.Count - 1
       Dim str As String = C1TrueDBGrid1(i, 5).ToString()
       If Not String.IsNullOrEmpty(str) Then
           str = str.Replace("(2) ", ";")
       End If
     C1TrueDBGrid1(i, 5) = str
    Next
    

    You can do it similarly for other columns.

    Regards,

    Prabhat Sharma.

  • Posted 6 February 2020, 1:01 am EST

    Thank You.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels