Posted 20 May 2018, 2:43 am EST
i use FlexGrid
and column data type is button
and event handle button_click
how to …
Forums Home / ComponentOne / WinForms Edition
Posted by: eploentham on 20 May 2018, 2:43 am EST
Posted 20 May 2018, 2:43 am EST
i use FlexGrid
and column data type is button
and event handle button_click
how to …
Posted 20 May 2018, 3:41 pm EST
Hello!
I am attaching a small sample application demonstrating the desired feature in the grid. Please refer the same.
Best regards,
Meenakshi
Posted 22 May 2018, 8:19 pm EST
thank yoy
Posted 23 October 2019, 8:57 am EST
Hello,
I am interested in a similar solution in that I want the button to show in the column for the user to click. In the given example the button is not visible until you click the cell. I would like to see the button with its button text in all the rows in col(0).
I also tried translating the HostControls demo to VB.Net and also adding all the buttons after I set c1fgBatch.DataSource = MyDataTable in my load event
Dim btnEditor As New Button
btnEditor.BackColor = Color.LightGray
btnEditor.Text = "Edit"
AddHandler btnEditor.Click, AddressOf btnEditor_Click
.Cols.Insert(0)
.Cols.Fixed = 0
.Cols.Frozen = 1
.Cols(0).Editor = btnEditor
_al.Clear()
For r As Integer = 2 To .Rows.Count - 1
_al.Add(New HostedControl(c1fgBatch, btnEditor, r, 0))
Next
Regards
Brian
Posted 23 October 2019, 10:08 pm EST
Hello Brian,
Here is the VB sample attached which uses HostControl product sample to show buttons in all the rows of col(0), please have a look.
In case if you have any doubt, please let us know.
Regards,
Prabhat Sharma.
FlexgridButtonDemo1.zip
Posted 26 October 2019, 7:45 am EST
Thank you very much.
Brian
Posted 26 October 2019, 8:21 am EST
Brilliant. This is exactly what I needed. I see what I was doing wrong.
Thanks again Mr Sharma