Hello,
I'm having trouble removing the border from RadListBoxes inside of my RadGrid's GridTemplateColumn. If anybody knows how to achieve this, please let me know. The below code is what I have tried - it worked to alter the height of the listbox, but not the border style or color.
Any assistance would be appreciated!
Thanks,
Casey
GridTemplateColumn definitions:
Code Behind in RadGrid's ItemDataBound event:
I'm having trouble removing the border from RadListBoxes inside of my RadGrid's GridTemplateColumn. If anybody knows how to achieve this, please let me know. The below code is what I have tried - it worked to alter the height of the listbox, but not the border style or color.
Any assistance would be appreciated!
Thanks,
Casey
GridTemplateColumn definitions:
<telerik:GridTemplateColumn HeaderText="Assigned Departments" UniqueName="TemplateColumn"> |
<ItemTemplate> |
<telerik:RadListBox ID="rlbMyDepts" runat="server" Width="250px" BorderStyle="None" |
DataKeyField="DEPT_CD" DataTextField="DESC"> |
</telerik:RadListBox> |
<br /> |
<asp:LinkButton ID="lbChangeAssignedDepts" runat="server" CommandName="ChangeAssignedDepts" |
OnClientClick='<%#Eval("USER_ID", "return ShowDeptsForm(\"{0}\")")%>'>Change</asp:LinkButton> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn HeaderText="Assigned Object Classes" UniqueName="TemplateColumn1"> |
<ItemTemplate> |
<telerik:RadListBox ID="rlbMyObjects" runat="server" Width="250px" BorderStyle="None" |
DataKeyField="OBCL_CD" DataTextField="OBCL_CD"> |
</telerik:RadListBox> |
<br /> |
<asp:LinkButton ID="lbChangeAssignedObjects" runat="server" CommandName="ChangeAssignedObjects" |
OnClientClick='<%#Eval("USER_ID", "return ShowObjectsForm(\"{0}\")")%>' EnableViewState="True" BorderStyle="None">Change</asp:LinkButton> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
Code Behind in RadGrid's ItemDataBound event:
if (e.Item is GridDataItem) |
{ |
GridDataItem d = e.Item as GridDataItem; |
RadListBox myDepts = d.FindControl("rlbMyDepts") as RadListBox; |
myDepts.BorderStyle = BorderStyle.None; |
myDepts.BorderColor = System.Drawing.Color.White; |
myDepts.Height = Unit.Pixel(50); |
RadListBox myObjects = d.FindControl("rlbMyObjects") as RadListBox; |
myObjects.BorderStyle = BorderStyle.None; |
myObjects.BorderColor = System.Drawing.Color.White; |
myObjects.Height = Unit.Pixel(50); |
} |