I have a GridTemplateColumn with a RadComboBox in its EditItemTeplate as follows :
<telerik:GridTemplateColumn HeaderText="Requestor" UniqueName="Requestor"
SortExpression="FullName">
<ItemTemplate>
<asp:Label ID="lblRequestor" Width="100px" runat="server" Text='<%#Bind("RequestorID") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox AutoPostBack="true" DataTextField="FullName" EmptyMessage="-- Select Requestor --" AppendDataBoundItems="true" DataValueField="EmployeeUserId"
ID="RadComboBox1" runat="server" SelectedValue='<%#Bind("RequestorID") %>'>
</telerik:RadComboBox>
<asp:CustomValidator ID="CustomValidator1" ControlToValidate="RadComboBox1" OnServerValidate="ValidateRequestor" runat="server" ErrorMessage="Select Requestor"></asp:CustomValidator>
</EditItemTemplate>
<ItemStyle Width="100px" />
<HeaderStyle Width="100px" />
</telerik:GridTemplateColumn>
Now, in grid OnItemCreated="RadGrid1_ItemCreated" event handler, based on some condition(permissions), I'm setting the above RadComboBox Enabled property to false as follows :
if (Page.User.Identity.IsAuthenticated)
{
GridTableRow tblRowForInsert = formItem[
"Requestor"].Parent as GridTableRow;
tblRowForInsert.Enabled =
false;
}
It works fine with postbacks, but, if I use AJAX, the disabled RadComboBox's borders are not shown at the bottom and the control seems to look like as if bottom half is cut.
I tried getting the RadComboBox control using the FindControl Method of GridEditableItem and then setting its Enabled property to false , but that also gives the same results with AJAX enabled.
Can you please let me know how to fix this or if there's a workaround.
Thanks
-Raj