C
Charlie@CBFC
Hi:
I'm using the Repeater control to display one-to-many relationship between
Customer, Orders and Order Items. To do this, I bind the control to
Customer table to show customer data, then call a function from item
template to generate Order and Order items which are returned as a string
containing HTML markup tags.
Since the Orders and Order items tables are not bound to Repeater I can't
add a button template. The button will have as it's command argument the
invoice number I'll use to take some action. So- it appears I'll have to
add button programmitcally in function like so...
System.Web.UI.WebControls.Button btn = new Button();
btn.Text = "Finalize Order";
btn.CommandArgument = child["invoice_no"].ToString();
Repeater1.Controls.Add(btn);
this correctly adds control to page but doesn't get wired up to Repeater's
Item_Command. How do you get it wired to Item_Command event so I can catch
the command argument?
Thanks,
Charlie
I'm using the Repeater control to display one-to-many relationship between
Customer, Orders and Order Items. To do this, I bind the control to
Customer table to show customer data, then call a function from item
template to generate Order and Order items which are returned as a string
containing HTML markup tags.
Since the Orders and Order items tables are not bound to Repeater I can't
add a button template. The button will have as it's command argument the
invoice number I'll use to take some action. So- it appears I'll have to
add button programmitcally in function like so...
System.Web.UI.WebControls.Button btn = new Button();
btn.Text = "Finalize Order";
btn.CommandArgument = child["invoice_no"].ToString();
Repeater1.Controls.Add(btn);
this correctly adds control to page but doesn't get wired up to Repeater's
Item_Command. How do you get it wired to Item_Command event so I can catch
the command argument?
Thanks,
Charlie