PDA

View Full Version : [CLOSED] Text area is not being fit inline inside a gridview column.



arjunrvasisht
Dec 23, 2014, 8:51 AM
I want the text area to be inline with the column once it becomes editable. Please find the image attached.

http://forums.ext.net/attachment.php?attachmentid=17652&stc=1



<ext:GridPanel ID="GrdTechnicalIndicatorsForT3" runat="server" EnableColumnMove="false" EnableColumnResize="false" ButtonAlign="Center" Height="489px" Width="1220">
<Plugins>
<ext:CellEditing ID="ceTechIndicators" ClicksToEdit="1" runat="server" />
</Plugins>
<Store>
<ext:Store ID="StoreTechIndicatorTier3" runat="server" PageSize="10" IsPagingStore="true" WarningOnDirty="false">
<Model>
<ext:Model runat="server" IDProperty="TectIndicatorFor12">
<Fields>
<ext:ModelField Name="IsRestricted" />
<ext:ModelField Name="Keycode" SortType="AsInt" />
<ext:ModelField Name="ProgramId" />
<ext:ModelField Name="ProgramName" />
<ext:ModelField Name="ProgramPE" Type="String" />
<ext:ModelField Name="R" />
<ext:ModelField Name="Y" />
<ext:ModelField Name="G" />
<ext:ModelField Name="RemarkId" />
<ext:ModelField Name="Remarks" />
<ext:ModelField Name="Remarks_Copy" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column runat="server" DataIndex="IsRestricted" Text="IsRestricted" Width="60" MenuDisabled="true"
Sortable="true" Resizable="true" Align="Left" ID="GrdTechnicalIndicatorsForT3_IsRestricted" Hideable="true"
Hidden="true">
</ext:Column>
<ext:Column runat="server" DataIndex="Keycode" Text="Keycode" Align="Left" Width="60" MenuDisabled="true"
Sortable="true" Resizable="true" Css="text-align:center;background:#FFFFFF;"
ID="GrdTechnicalIndicatorsForT3_Keycode">
<Renderer Fn="anchorIndicator_Renderer" />
</ext:Column>
<ext:Column runat="server" DataIndex="ProgramName" Text="Program Name" Width="225" MenuDisabled="true"
Sortable="true" Resizable="true" Css="text-align:left;background:#FFFFFF;" Align="Left"
ID="GrdTechnicalIndicatorsForT3_ProgramName">
<Renderer Fn="techIndicator_Renderer" />
</ext:Column>
<ext:Column runat="server" DataIndex="ProgramPE" Text="Program PE" Width="180" MenuDisabled="true"
Sortable="true" Resizable="true" Css="text-align:left;background:#FFFFFF;" ID="GrdTechnicalIndicatorsForT3_ProgramPE">
<Renderer Fn="techIndicator_Renderer" />
</ext:Column>
<ext:Column runat="server" DataIndex="R" Text="R" Width="61" MenuDisabled="true" Sortable="true"
Resizable="true" Css="text-align:right;color:white;background:#FF0000;" ID="GrdTechnicalIndicatorsForT3_Red">
<Renderer Fn="techIndicator_Renderer" />
</ext:Column>
<ext:Column runat="server" DataIndex="Y" Text="Y" Width="62" MenuDisabled="true" Sortable="true"
Resizable="true" ID="GrdTechnicalIndicatorsForT3_Yellow" Css="text-align:right;color:black;background:#FFFF00;">
<Renderer Fn="techIndicator_Renderer" />
</ext:Column>
<ext:Column runat="server" DataIndex="G" Text="G" Width="64" MenuDisabled="true" Sortable="true"
Resizable="true" Css="text-align:right;color:white;background:#008000;" ID="GrdTechnicalIndicatorsForT3_Green">
<Renderer Fn="techIndicator_Renderer" />
</ext:Column>
<ext:Column runat="server" DataIndex="Remarks" Text="Remarks(80 char max)" Width="511" Sortable="false"
MenuDisabled="true" Resizable="false" Css="background:#FFFFFF;" ID="Remarks">
<Editor>
<ext:TextField ID="txtaTechIndicatorT3Remark" EmptyText="Insert remarks" runat="server"
MaxLength="80" MaskRe="[^<>]" StyleSpec="position:absolute;">
</ext:TextField>
</Editor>
<Renderer Fn="techIndiRemark_Render" />
</ext:Column>
</Columns>
</ColumnModel>
<View>
<ext:GridView ID="gvTechnicalIndicatorsForT3" runat="server" MarkDirty="false" TrackOver="false" StripeRows="false" />
</View>
<BottomBar>
<ext:PagingToolbar ID="GrdTechnicalIndicatorsForT3Paging" runat="server" HideRefresh="true" EmptyMsg="<%$ Resources:WebResource,GeneralMsg_NoRecordsFound %>">
<Items>
<ext:Label ID="Label20" runat="server" Text="Page size:" />
<ext:ToolbarSpacer ID="ToolBarSpacer11" runat="server" Width="10" />
<ext:ComboBox ID="ComboBox2" runat="server" Width="80" SelectedIndex="0">
<Items>
<ext:ListItem Text="20" Value="20" />
<ext:ListItem Text="50" Value="50" />
<ext:ListItem Text="100" Value="100" />
</Items>
<SelectedItems>
<ext:ListItem Index="0" />
</SelectedItems>
<Listeners>
<Select Handler="#{GrdTechnicalIndicatorsForT3Paging}.store.pageSiz e = parseInt(this.getValue(), 10); #{GrdTechnicalIndicatorsForT3Paging}.store.reload( );" />
</Listeners>
</ext:ComboBox>
</Items>
</ext:PagingToolbar>
</BottomBar>
<Listeners>
<%--<BeforeEdit Fn="setReadonlyRemarks" />--%>
<BeforeEdit Handler="{ if (e.record.data['IsRestricted'] ==='1') { #{txtaTechIndicatorT3Remark}.disabled = true; } else { #{txtaTechIndicatorT3Remark}.disabled = false; } }" />
</Listeners>
<SelectionModel>
<ext:CellSelectionModel ID="csmTechIndT3" runat="server" />
</SelectionModel>
</ext:GridPanel>

Daniil
Dec 23, 2014, 10:14 AM
Hi @arjunrvasisht,

Please remove this setting of TextArea.

StyleSpec="position:absolute;"

arjunrvasisht
Dec 23, 2014, 11:04 AM
Thanks daniil, issue got fixed with your solution. Thread can be closed.