Help with placing multiple FlexGrids on a scrollable Panel in ASP.NET MVC App

Posted by: Victor.m.charles.civ on 7 September 2019, 11:41 am EST

    • Post Options:
    • Link

    Posted 7 September 2019, 11:41 am EST

    Hello,

    Unlike the Windows version of my application, I’m unable to drag and drop multiple C1TrueDBGrids in a scrollable panel and manipulate their hights based on selcection from a Combobox as shown in code below. How I achieve the same in my ASP.NET MVC App?

    If ComboBox3.SelectedIndex = 0 Then

    C1AOP5.Height = C1AOP5.RowHeight * (C1AOP5.Splits(0).Rows.Count + 2) + (C1AOP5.Splits(0).Rows.Count * 1.3)

    End If

    If ComboBox3.SelectedIndex = 1 Then

    C1AOP5.Height = 150 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 2 Then

    C1AOP5.Height = 250 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 3 Then

    C1AOP5.Height = 350 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 4 Then

    C1AOP5.Height = 450 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 5 Then

    C1AOP5.Height = 620 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    'AOP-8

    If ComboBox3.SelectedIndex = 0 Then

    ’ C1Screen1.Height = 194 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    C1AOP8.Height = C1AOP8.RowHeight * (C1AOP8.Splits(0).Rows.Count + 2) + (C1AOP8.Splits(0).Rows.Count * 1.3)

    End If

    If ComboBox3.SelectedIndex = 1 Then

    C1AOP8.Height = 150 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 2 Then

    C1AOP8.Height = 250 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 3 Then

    C1AOP8.Height = 350 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 4 Then

    C1AOP8.Height = 450 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 5 Then

    C1AOP8.Height = 620 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    'AOP-29

    If ComboBox3.SelectedIndex = 0 Then

    ’ C1Screen1.Height = 194 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    C1AOP29.Height = C1AOP29.RowHeight * (C1AOP29.Splits(0).Rows.Count + 2) + (C1AOP29.Splits(0).Rows.Count * 1.3)

    End If

    If ComboBox3.SelectedIndex = 1 Then

    C1AOP29.Height = 150 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 2 Then

    C1AOP29.Height = 250 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 3 Then

    C1AOP29.Height = 350 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 4 Then

    C1AOP29.Height = 450 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    If ComboBox3.SelectedIndex = 5 Then

    C1AOP29.Height = 620 'C1Screen1.Rows.Count * (C1Screen1.Rows.Count + 2) + 10

    End If

    Thanks,

    Victor

  • Posted 8 September 2019, 10:32 pm EST

    Hi Victor,

    If we understand correctly, you would like to set the FlexGrid height dynamically on ComboBox index changed.

    If yes, you may accomplish this by handling the selectedIndex and set the FlexGrid host element height as follows;

    var cmb= wijmo.Control.getControl("#cmb");
    cmb.selectedIndexChanged=function(s,e){
    	if(s.selectedIndex==1){
                  wijmo.Control.getControl("#grid1").hostElement.style.height ="500px";
            }
    }
    

    Hope it help!

    Regards,

    Manish Gupta

  • Posted 11 September 2019, 5:47 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