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
close icon

How to show a scrollbar in a ListControlPart




I bind a datatalbe to a GridGroupingControl's GridColumnDescriptor

DataTable table=new DataTable();

GridColumnDescriptor c =Data_GridGroupingControl.TableDescriptor.Columns[0];
 c.Appearance.AnyRecordFieldCell.DataSource =table;
                    c.Appearance.AnyRecordFieldCell.DisplayMember = "c1";
                    c.Appearance.AnyRecordFieldCell.ValueMember = "c1";
                    c.Appearance.AnyRecordFieldCell.DropDownStyle = GridDropDownStyle.Exclusive;





 Data_GridGroupingControl.TableControlCurrentCellShowingDropDown += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventHandler(Data_GridGroupingControl_TableControlCurrentCellShowingDropDown);




 private void Data_GridGroupingControl_TableControlCurrentCellShowingDropDown(object sender, GridTableControlCurrentCellShowingDropDownEventArgs e)
        {


      if (e.TableControl.CurrentCell.Renderer is GridDropDownGridListControlCellRenderer)
            {
                GridDropDownGridListControlCellRenderer renderer = e.TableControl.CurrentCell.Renderer as GridDropDownGridListControlCellRenderer;

                renderer.ListControlPart.ItemHeight = 30;

                renderer.ListControlPart.Grid.Width = 700;
    

               
           ////////////////// //How to show the scroolbar??

      

            }
}



Thanks!

3 Replies

PM Piruthiviraj Malaimelraj Syncfusion Team October 21, 2016 12:05 PM UTC

Hi ligyste, 

Thanks for your interest in Syncfusion products. 
We have analyzed your query and created simple sample as per your requirement. As per your scenario, you are using Metro theme for GridGroupingControl in your application . To enable the scroll bar in GridListControl cell of your application, you can use Office2007ScrollBars property of GridDropDownGridListControlCellRenderer. Please make use of below code, 
Code example 
GridDropDownGridListControlCellRenderer renderer = (GridDropDownGridListControlCellRenderer)this.gridGroupingControl1.TableControl.CellRenderers["GridListControl"]; 
renderer.ListControlPart.Grid.Office2007ScrollBars = true
renderer.ListControlPart.Grid.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Metro; 
 
 
 
Sample link 
 
Regards, 
Piruthiviraj 



LI ligyste October 22, 2016 01:25 AM UTC

Thank you very much!I have resolved the  problem.



MG Mohanraj Gunasekaran Syncfusion Team October 24, 2016 04:21 AM UTC

Hi ligyste, 
 
We are glad to know that your reported problem has resolved. Please let us know, if you need any further assistance. 

Regards, 
Mohanraj G. 


Loader.
Up arrow icon