How to get Current selected row from TableLayoutPanel ?

Solution :

When you click on any control of the windows form then that control is activated at that time.

If you want to get the current row of the selected control of the tablelayoutpanel then you have to write 2 lines of code . That is Control ctrlactive = this.ActiveControl;

            TableLayoutPanelCellPosition celpos = tlp.GetCellPosition(ctrlactive);

 

If any problem then comment here.

About the Author

avatar