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 position a toolbar on the 2nd row, through code?

Hi, In my application I''m not setting up my toolbars at design time. Instead, I''m instantiating the toolbars in code. For the most part, this works fine. However, all of my toolbars are appearing on the same row. There is only one row of toolbars, and it''s very crowded now -- it is so crowded that all of the toolbars are compressed. I would prefer to have half of my toolbars appear on the next row down. How can I specify a toolbar''s row position, using the API ? Again, we''re not setting up our toolbars in design mode (that''s a project requirement). Thanks

2 Replies

AD Administrator Syncfusion Team October 12, 2005 01:12 PM UTC

Hi Dave, The toolbars can be arranged in different rows using the RowIndex and RowOffset property of CommandBar.I have attached a sample that illustrates this.Let me know if this meets your requirement. We appreciate your cooperation. Regards, Ebenezer.P

Toolbar0.zip


DS Dave Smith October 12, 2005 08:33 PM UTC

Well, that helped a little. That does show me the syntax to use. If I can get the RowIndex and RowOffset properties to work correctly, then they will do what I need. Unfortunately, the sample code that you posted does not always run correctly. I downloaded your code, built that project and ran it (I ran it from within Visual Studio). I saw all the toolbars on the same row. Then I ran the project again (I didn''t modify anything, I just pressed Ctrl-F5 again) and that time, it did what it was supposed to do -- the second time I ran it, the code caused two of the toolbars to move down onto a new row. But the first time the application is run, the toolbars do not move as intended, so something is clearly not working. If you copy the project into a new directory, and build and run the project from there, then you will see that the first time you run it all the toolbars will be on the same row. In my own application, I''m finding that those properties work sometimes, and sometimes they have no effect. I have 5 toolbars currently. By setting the positioning properties, I have been able to specify the positions of 4 out of my 5 toolbars. The fifth toolbar insists on being placed at the end of the 2nd row of toolbars. It simply does not move to the first row of toolbars. Can you suggest any other things I should check? Is it possible I''m trying to set these RowIndex and RowOffst properties too early, or too late?

Loader.
Live Chat Icon For mobile
Up arrow icon