Hi
You can write during RowDataBind event of GridView
GridView1_RowDataBinding(...)
{
DropDownList drp = (DropDownList e.Row.FindControl("DropDownList1");
drp.Attributes.Add("onblur","checkValidation(this);");
}
in java script you should define chcekValidation function like
function chcekValidation(_this)
{
if(_this.value=='Please select' || if(_this.value=='' )
{
alert('Please select item from list');
return false;
}
return true;
}
Please do let me know, if you have any doubt.
Please provide
Vote if this would be helpful to you.
Thanks,
Imdadhusen