Help with converting C1TrueDBGrid code to FlexGrid in ASP.NET application

Posted by: Victor.m.charles.civ on 7 September 2019, 8:04 am EST

  • Posted 7 September 2019, 8:04 am EST

    Hello,
    I'm using the code below to identify all records in C1AOP5 with the same data in fields selected in C1Box1. How do you modify the code below to accomplish the same using ASP.NET MVC application?


    If CBox1.SelectedItems.Count <> 0 Then
    For Each ColName As [String] In CBox1.SelectedItems
    Dim str As New StringBuilder
    str.Append("")
    For i As Integer = 0 To C1AOP5.Splits(0).Rows.Count - 1
    For j As Integer = i + 1 To C1AOP5.Splits(0).Rows.Count - 1

    If C1AOP5(i, ColName) = C1AOP5(j, ColName) Then
    If Not str.ToString.Contains(C1AOP5(i, ColName).ToString) Then
    str.Append(C1AOP5(i, ColName) + ",")
    End If
    Exit For
    End If

    Next
    Next
    C1AOP5.Columns(ColName).FilterMultiSelect = True
    C1AOP5.Columns(ColName).FilterSeparator = ","
    C1AOP5.Columns(ColName).FilterText = str.ToString().Remove(str.Length - 1, 1)
    TextBox11.Text = C1AOP5.RowCount
    If TextBox11.Text <> "" Then
    Panel1.Visible = True
    C1AOP5.Visible = True
    ' Label7.Visible = False
    End If
    Next
    For Each ColName As [String] In CBox1.SelectedItems

    C1AOP5.Splits(0).DisplayColumns(ColName).HeadingStyle.BackColor = Color.Blue
    C1AOP5.Splits(0).DisplayColumns(ColName).HeadingStyle.ForeColor = Color.White

    Next
    End If
  • Marked as Answer

    Replied 8 September 2019, 9:08 pm EST

    Hi,
    In MVC application, FlexGrid columns has visible property which can be set to true/false to show/hide the column respectively.

    Please refer to the following demo sample for reference:
    https://demos.componentone.com/ASPNET/LearnMvcClient/C1Mvc/WijmoShowPopup/1

    The column can be styled using the cssClass property which accepts the css class name to be applied.

    Please refer to the following demo sample for reference:
    https://demos.componentone.com/ASPNET/LearnMvcClient/C1FlexGrid/ColumnsStyling

    Hope it helps!

    Regards,
    Manish Gupta
  • Replied 11 September 2019, 10:07 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