Wednesday, June 22, 2011

RequireField Validator in gridview template feild(fire all validators when i click button in each row)


 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
   TextBox t1= (TextBox)e.Row.FindControl("t1");
                CompareValidator cv = (CompareValidator)e.Row.FindControl("cv");
                Button btn = (Button)e.Row.FindControl("btn");

                if (t1 != null)
                {
                    t1.ValidationGroup = e.Row.RowIndex.ToString();
                    cv.ValidationGroup = e.Row.RowIndex.ToString();
                    btn.ValidationGroup = e.Row.RowIndex.ToString();
}
}
}
 

Name start with D came first, although i used ascending order

There was a space character in the name feild in the database. That was the reason for D came first :)

TinyMCE Insert/Edit link not editable

 To fix this add  e.stopImmediatePropagation()  as below. $(document).on('focusin', function (e) {             if ($(e.target).close...