Passing command arguments to a checkboxAdd batch printing functionality to an application
I needed to add batch printing functionality to an application.
I added a Gridview to a page and handled the GridView OnRowDataBound event.I added a TemplateField ItemTemplate to the Columns collection with a checkbox (to include in batch printing job).I added a batch print button and handled the OnClick event:protected void GridView1_OnRowDataBound(object sender, GridViewRowEventArgs e)
In the batch print OnClick event, I added:string args = checkbox.Attributes["CommandArgument"].Split(',');
Posted 17 Jun '10 2:45 AM
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
| ||||||||||||||||||||||