I need to set the CommandArgument to a comma seperated value. I've attempted
CommandArgument='<%# Convert.ToString(Eval("Column1")) + "," + Convert.ToString(Eval("Column2")) %>'
and get a notice that you cannot bind to this control. I've attempted in the OnExternalDataBound event and can debug and see the actual CommandArgument is being set but it always returns the first column
case "setcommandargument":
object param = null;
if (parameter is System.Web.UI.WebControls.GridViewRow)
{
param = ((System.Web.UI.WebControls.GridViewRow)parameter).DataItem;
}
else if (parameter is System.Data.DataRowView)
{
param = parameter;
}
int acctCode = ValidationHelper.GetInteger(((System.Data.DataRowView)param).Row["RS_ACCTCODE"], 0);
int confirmNumber = ValidationHelper.GetInteger(((System.Data.DataRowView)(param)).Row["RS_CONFIRM"], 0);
ImageButton btn = ((ImageButton)sender);
btn.CommandArgument = acctCode.ToString() + "|" + confirmNumber.ToString();
return btn;
and failed, it looks like it always returns the first column of the dataset. How else can I use this and pass in a composite primary key?
I've also discovered since I have this control in a jquery dialog (control is shown with click of link) the OnAction event isn't fired after the dialog is opened, why?