I have a Rad gridview that databinds and popluates date according to a seacrh. There is a linkbutton that i want to be able to change on column from saying false to true or vice-versa. Please help
protected void rgUsers_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem dataItem = (GridDataItem)e.Item;
LinkButton btn1 = (LinkButton)dataItem["btnChange"].Controls[0];
btn1.Click += new EventHandler(btn1_Click);
}
}
protected void rgUsers_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem dataItem = (GridDataItem)e.Item;
LinkButton btn1 = (LinkButton)dataItem["btnChange"].Controls[0];
btn1.CommandArgument = string.Format("return Click(' {0}';", (e.Item as GridDataItem)
["CustomID"].Text);
}
}
void btn1_Click(object sender, EventArgs e)
{
var btnChange = (LinkButton)sender;
}