RadGrid hide column in export
RadGrid1.MasterTableView.Columns.FindByUniqueName("ABC").Visible = false;
Achievement provides the only real pleasure in life
RadGrid1.MasterTableView.Columns.FindByUniqueName("ABC").Visible = false;
Posted by SF at 3:13 pm 0 comments
my code that has problem sorting template columns:
the instruction says "the SortExpression value should match the data field you want to sort on (typically the field a control in the template is bound to)". I made sure this rule is applied but the problem remained. Then I removed the HeaderTemplate components, instead I added value to HeaderText property in the GridTemplateColumn level. This solved the problem, not sure why though.....
the new code looks like:
...........
.......
Posted by SF at 2:11 pm 0 comments
protected void ABC_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e){if (e.CommandName == "PerformInsert"){//make sure the insert user control closes automatically after insertede.Item.OwnerTableView.IsItemInserted = false;}}
Posted by SF at 2:06 pm 0 comments
* Delete the .designer.cs file
* convert the .aspx or ascx file into a webapplication by right clicking on it
Posted by SF at 5:45 pm 0 comments
Checked=' < % # DataBinder.Eval( Container, "DataItem.Active" ) % >'
Posted by SF at 4:22 pm 0 comments
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
//enter the code here
}
}
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridEditFormInsertItem && RadGrid1.MasterTableView.IsItemInserted)
{
GridEditFormInsertItem insertItem = (GridEditFormInsertItem)e.Item;
(insertItem["abc"].Controls[0] as TextBox).Text = "hello world";
}
}
Posted by SF at 9:23 am 0 comments