All,
My grid's tablelayout is set to Auto and the grid show up fine after the initial load. During "Add mode", the column headers' shrink down to the size of the "Edit Form". When I hit "Cancel", the column headers' shrink down to the width of the header text.
I am at a lost as to how to fix this. I tried to emulate the examples on this site but have not found the right combination. I am new at using this grid so any and all recommendations are welcome!
Thanks!
-Brian
Here is the grid source. Please let me know what kind of addition information is needed!
My grid's tablelayout is set to Auto and the grid show up fine after the initial load. During "Add mode", the column headers' shrink down to the size of the "Edit Form". When I hit "Cancel", the column headers' shrink down to the width of the header text.
I am at a lost as to how to fix this. I tried to emulate the examples on this site but have not found the right combination. I am new at using this grid so any and all recommendations are welcome!
Thanks!
-Brian
Here is the grid source. Please let me know what kind of addition information is needed!
<telerik:RadGrid ID="RadGrid1" runat="server" | |
AllowPaging="True" CellPadding="1" CellSpacing="1" | |
DataSourceID="ODGDb" GridLines="Horizontal" Width="100%" | |
oninsertcommand="RadGrid1_InsertCommand"> | |
<MasterTableView | |
AutoGenerateColumns="False" BorderWidth="1px" CommandItemDisplay="TopAndBottom" | |
DataKeyNames="FrequentlyAskedQuestionID" DataSourceID="ODGDb" | |
GridLines="Horizontal"> | |
<RowIndicatorColumn Visible="false"> | |
<HeaderStyle Width="20px"></HeaderStyle> | |
</RowIndicatorColumn> | |
<ExpandCollapseColumn Visible="false" Resizable="false"> | |
<HeaderStyle Width="20px"></HeaderStyle> | |
</ExpandCollapseColumn> | |
<Columns> | |
<telerik:GridEditCommandColumn> | |
</telerik:GridEditCommandColumn> | |
<telerik:GridBoundColumn DataField="FrequentlyAskedQuestionID" | |
DataType="System.Int64" HeaderText="FrequentlyAskedQuestionID" ReadOnly="True" | |
SortExpression="FrequentlyAskedQuestionID" | |
UniqueName="FrequentlyAskedQuestionID" Display="False"> | |
</telerik:GridBoundColumn> | |
<telerik:GridBoundColumn DataField="PractitionerID" DataType="System.Int64" | |
HeaderText="PractitionerID" SortExpression="PractitionerID" | |
UniqueName="PractitionerID" Display="False" ReadOnly="True"> | |
</telerik:GridBoundColumn> | |
<telerik:GridBoundColumn DataField="ConsultantID" DataType="System.Int32" | |
HeaderText="ConsultantID" ReadOnly="True" SortExpression="ConsultantID" | |
UniqueName="ConsultantID" Display="False"> | |
</telerik:GridBoundColumn> | |
<telerik:GridTemplateColumn EditFormHeaderTextFormat="{0}" | |
UniqueName="QuestionTemplate" DataField="Question" HeaderText="Question" | |
Resizable="False"> | |
<EditItemTemplate> | |
<telerik:RadTextBox ID="questionTextBox" Runat="server" | |
EmptyMessage="Enter a question" InvalidStyleDuration="100" Rows="3" | |
SelectionOnFocus="CaretToBeginning" Text='<%# Bind("Question") %>' | |
TextMode="MultiLine" Width="500px"> | |
</telerik:RadTextBox> | |
<br /> | |
</EditItemTemplate> | |
<ItemTemplate> | |
<asp:Label ID="questionLabel" runat="server" Text='<%# Eval("Question") %>'></asp:Label> | |
<br /> | |
</ItemTemplate> | |
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" Wrap="True" /> | |
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Wrap="True" /> | |
</telerik:GridTemplateColumn> | |
<telerik:GridTemplateColumn DataField="Answer" HeaderText="Answer" | |
UniqueName="AnswerTemplate" Resizable="False"> | |
<EditItemTemplate> | |
<telerik:RadTextBox ID="answerTextBox" Runat="server" | |
EmptyMessage="Enter an answer" InvalidStyleDuration="100" Rows="5" | |
Text='<%# Bind("Answer") %>' TextMode="MultiLine" Width="500px"> | |
</telerik:RadTextBox> | |
</EditItemTemplate> | |
<ItemTemplate> | |
<asp:Label ID="answerLabel" runat="server" Text='<%# Eval("Answer") %>'></asp:Label> | |
</ItemTemplate> | |
</telerik:GridTemplateColumn> | |
<telerik:GridButtonColumn CommandName="Delete" Text="Delete" | |
UniqueName="column"> | |
</telerik:GridButtonColumn> | |
</Columns> | |
<EditFormSettings> | |
<FormTableItemStyle Wrap="False"></FormTableItemStyle> | |
<FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" Width="100%" /> | |
<FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" /> | |
<FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> | |
<EditColumn ButtonType="ImageButton" | |
InsertText="Insert Order" UpdateText="Update record" UniqueName="EditCommandColumn1" CancelText="Cancel edit"> | |
</EditColumn> | |
<FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> | |
<%-- <EditColumn UniqueName="EditCommandColumn1"> | |
</EditColumn> | |
--%> </EditFormSettings> | |
</MasterTableView> | |
<ClientSettings> | |
<Scrolling AllowScroll="True" UseStaticHeaders="True" /> | |
</ClientSettings> | |
</telerik:RadGrid> |