Hi,
I am using a RadGrid programatically. I have a GridTemplateColumn :
which uses the following ItemTemplate :
The RadGrid is set up to allow grouping and all works ok. However, when the group node is collapsed, the contents disappear from the cell which contains the ItemTemplate data. The contents disappear even from cells that are not in the group which is being collapsed.
As a test, I set up the ItemTemplate in the .ascx file like this :
And it worked fine. The contents remained in the cells when the group was collapsed.
In the example I have used a RadCombo box, but the same occurs when using a simple Literal.
I need to be able to acheive this programmatically, have I missed something or is there a bug here?
Regards,
Sean Duffy
I am using a RadGrid programatically. I have a GridTemplateColumn :
GridTemplateColumn colState = new GridTemplateColumn(); |
colState.ItemTemplate = new StateControl(); |
colState.HeaderText = "State"; |
colState.Visible = false; |
which uses the following ItemTemplate :
public class StateControl : ITemplate |
{ |
public void InstantiateIn(System.Web.UI.Control container) |
{ |
RadComboBox radcomboState = new RadComboBox(); |
radcomboState.Skin = "Outlook"; |
radcomboState.ID = "radcomboState"; |
radcomboState.AllowCustomText = false; |
radcomboState.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(radcomboState_SelectedIndexChanged); |
radcomboState.AutoPostBack = true; |
radcomboState.Visible = true; |
container.Controls.Add(radcomboState); |
} |
} |
The RadGrid is set up to allow grouping and all works ok. However, when the group node is collapsed, the contents disappear from the cell which contains the ItemTemplate data. The contents disappear even from cells that are not in the group which is being collapsed.
As a test, I set up the ItemTemplate in the .ascx file like this :
<telerik:GridTemplateColumn HeaderText="State" Reorderable="true"> |
<ItemTemplate> |
<telerik:RadComboBox Skin="Outlook" runat="server" ID="radcomboState" AllowCustomText="false" |
OnSelectedIndexChanged="radcomboState_SelectedIndexChanged" AutoPostBack="true"> |
</telerik:RadComboBox> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
And it worked fine. The contents remained in the cells when the group was collapsed.
In the example I have used a RadCombo box, but the same occurs when using a simple Literal.
I need to be able to acheive this programmatically, have I missed something or is there a bug here?
Regards,
Sean Duffy