View Full Version : [CLOSED] Label.IconAlign and ReRender

Feb 26, 2014, 2:16 PM
I was attempting to change the IconAlign value of a label in behind code and notice that I needed to ReRender the label for it to take. Is that correct or should it automatically occur?

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<script runat="server">
protected void ResetIcon(object sender, EventArgs e)
LabelIcon.Text = "Label has been reset.";
LabelIcon.IconAlign = Alignment.Right;
LabelIcon.Icon = Icon.BulletCross;

<head id="Head1" runat="server">
<title>IconAlign Issue</title>
<ext:ResourceManager runat="server" ScriptMode="Development" />
<ext:Label ID="LabelIcon" runat="server" Text="Label" Icon="BulletTick" IconAlign="Left" />
<ext:Button runat="server" Text="Reset Icon" OnDirectClick="ResetIcon" />

Feb 26, 2014, 8:15 PM
Hi Chris,

I think the re-render is required right now because to change the Icon position requires the html elements to be rendered in a different position.

We probably could add a client-side and the related server-side helper to make this swap, although I'd prefer to avoid. Let me know what you think.

Hope this helps.