Hello,
I want to change the cell position of the panel at runtime through programmatically, I have Used TableLayoutPanel And for inserting the records into cell i have used panel in each cell.
Here is my code
- Dim c1 As New Control
- Dim c2 As New Control
- MainTableLayoutPanel1 = TryCast(c1.Parent, TableLayoutPanel)
- If MainTableLayoutPanel1 Is c2.Parent Then
- Dim PosC1 As TableLayoutPanelCellPosition = MainTableLayoutPanel1.GetCellPosition(c1)
- Dim PosC2 As TableLayoutPanelCellPosition = MainTableLayoutPanel1.GetCellPosition(c2)
- MainTableLayoutPanel1.GetCellPosition(PnlLinegraph)
- MainTableLayoutPanel1.GetCellPosition(PnlDoughnutChart)
- c1 = PnlLinegraph
- c2 = PnlDoughnutChart
- MainTableLayoutPanel1.SetCellPosition(c2, PosC1)
- MainTableLayoutPanel1.SetCellPosition(c1, PosC2)
- End If
does any one have better solution on it....?
I have got an error (Object Reference not set to an instance of the object)