Hi,
how can i do increase Textbox width and validation in automatic editmode alongwith i am using custom template mode for insert
previously i used like this but its not working now
i have also attached image ,look it for reference
Thanks
how can i do increase Textbox width and validation in automatic editmode alongwith i am using custom template mode for insert
previously i used like this but its not working now
i have also attached image ,look it for reference
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode))
{
//-------------Find TextBox In EditMode And Apply Css To Them------------
//GridEditableItem edititem = (GridEditableItem)e.Item;
//TextBox TxtEntityName = (TextBox)edititem["EntityName"].Controls[0];
//TextBox TxtEntityType = (TextBox)edititem["EntityType"].Controls[0];
//TextBox TxtEntityPath = (TextBox)edititem["EntityPath"].Controls[0];
//TextBox TxtDescription = (TextBox)edititem["Description"].Controls[0];
//TextBox TxtFileName = (TextBox)edititem["FileName"].Controls[0];
//TxtEntityName.CssClass = "riEditFormTextBox";
//TxtEntityType.CssClass = "riEditFormTextBox";
//TxtEntityPath.CssClass = "riEditFormTextBox";
//TxtDescription.CssClass = "riEditFormTextBox";
//TxtFileName.CssClass = "riEditFormTextBox";
}
//Validations For Textbox In Insert And Edit Mode
if ((e.Item is GridEditableItem && e.Item.IsInEditMode) || (e.Item is GridEditFormInsertItem && e.Item.OwnerTableView.IsItemInserted))
{
GridEditableItem item = e.Item as GridEditableItem;
GridTextBoxColumnEditor editor = (GridTextBoxColumnEditor)item.EditManager.GetColumnEditor("EntityName");
TableCell cell = (TableCell)editor.TextBoxControl.Parent;
RequiredFieldValidator validator = new RequiredFieldValidator();
validator.ControlToValidate = editor.TextBoxControl.ID;
validator.ErrorMessage = " * Required";
validator.Font.Bold = true;
cell.Controls.Add(validator);
}