Handle Button Click in WinForm DataRepeater C # Power Pack
1 answer
In the visual studio designer, double click on the button, and then you will get an empty event handler method. Add code there.
You can get the current item via CurrentItem or CurrentItemIndex to get the button clicked ...
private void button1_Click(object sender, EventArgs e)
{
Console.WriteLine("DEBUG: CurrentItem: " + dataRepeater1.CurrentItem);
Console.WriteLine("DEBUG: CurrentItemIndex: " + dataRepeater1.CurrentItemIndex);
}
+4
source to share