This is a migrated thread and some comments may be shown as answers.
EditMode="PopUp" with TextBox MultiLine when press Enter
8 Answers 116 Views
This is a migrated thread and some comments may be shown as answers.
kh0ngminh
Top achievements
Rank 1
kh0ngminh asked on 05 Jun 2009, 04:52 AM
When i press Enter in Textbox txtHistory2 so update data
My mind is: I do not want to press enter in the textbox txtHistory2 the event update. I just want people to click on button Update to update data
<EditFormSettings EditFormType="Template"
                    <FormTemplate >                     
                        <table cellspacing="1" cellpadding="1" Width="100%" border="0"
                            <tr> 
                                <td> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td width="100"
                                    Description</td> 
                                <td> 
                                    <asp:TextBox ID="txtHistory2" runat="server" Rows="10" SkinID="TextHistory" Text='<%#Bind("HistoryText")%>' 
                                        TextMode="MultiLine" ValidationGroup="Gro_History_GV" ></asp:TextBox><br /> 
                                    <asp:RegularExpressionValidator ID="txtConclusionValidator_GV" runat="server" ControlToValidate="txtHistory2" 
                                        Display="Dynamic" EnableClientScript="False" SetFocusOnError="True" Text="very long" 
                                        ValidationExpression="^[\s\S]{0,3500}$" ValidationGroup="Gro_History_GV"></asp:RegularExpressionValidator><br /> 
                                </td> 
                            </tr> 
                        </table> 
                        <table style="width: 100%"
                            <tr> 
                                <td align="right" colspan="2"
                                    <asp:Button ID="cmdUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' ValidationGroup="Gro_History_GV"
                                    </asp:Button>&nbsp; 
                                    <asp:Button ID="cmdClose" Text="Close" runat="server" CausesValidation="False" CommandName="Cancel"
                                    </asp:Button>                                     
                                </td> 
                            </tr> 
                        </table>                         
                    </FormTemplate>                     
                      <PopUpSettings Modal="True" Width="600px"   /> 
                </EditFormSettings> 

8 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Jun 2009, 05:34 AM
Hi Khongminh,

Telerik RadGrid provides rich server API for inserting new data, updating existing data and deleting data directly from the specified data source (AccessDataSource, SqlDataSource or ObjectDataSource).

Additionally, please note that FormTemplate custom edit form is not supported with simple data-binding (calling DataBind()). See the Simple data binding demo for more info about the limitations of this binding mode.

For more information about how to retrieve the values on update, please refer to the following articles:
Help topic
PopUp Edit Form
Demo - Form Template

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
kh0ngminh
Top achievements
Rank 1
answered on 05 Jun 2009, 06:19 AM
Sorry, I may explain a bit hard to understand
If txtHistory2 with TextMode = MultiLine, when I hit enter in the txtHistory2 it dont down the new line
Sorry my bad english
<telerik:RadGrid id="RadGrid_Tracking" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource_History" GridLines="None" OnItemCommand="RadGrid_Tracking_ItemCommand" OnItemDataBound="RadGrid_Tracking_ItemDataBound" Skin="Vista" AllowAutomaticUpdates="True"
        <MasterTableView DataKeyNames="DataStoreHistoryID" DataSourceID="SqlDataSource_History" EditMode="PopUp">     
            <Columns> 
                <telerik:GridTemplateColumn HeaderText="STT" UniqueName="colSTT"
                    <ItemStyle CssClass="RadGrid_STT"  /> 
                    <ItemTemplate> 
                        <b><%# Container.DataSetIndex + 1 %>.</b> 
                        <asp:HiddenField id="hdf_CreateUserID" runat="server" Value='<%#Eval("CreateUserID")%>'></asp:HiddenField> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                <telerik:GridTemplateColumn HeaderText="Ng&#224;y" UniqueName="colDates"
                <HeaderStyle Width="100px" />                 
                <ItemStyle Width="100px" VerticalAlign="Top"></ItemStyle> 
                <ItemTemplate> 
                    <span style="font-weight:bolder;"><%#Eval("Username")%></span><br /> 
                    <%#Eval("Dates","{0:dd/MM/yyyy HH:mm}")%> 
                </ItemTemplate> 
                </telerik:GridTemplateColumn>                 
                <telerik:GridTemplateColumn HeaderText="Nội dung" UniqueName="TemplateColumn1"
                <ItemTemplate> 
                    <asp:Label id="LabelHistoryText" runat="server" Text='<%#Eval("HistoryText")%>'></asp:Label> 
                    <asp:HiddenField id="hdf_LastModifyUsername" runat="server" Value='<%#Eval("LastModifyUsername")%>'></asp:HiddenField> 
                    <asp:HiddenField id="hdf_LastModifyDate" runat="server" Value='<%#Eval("LastModifyDate","{0:dd/MM/yyyy HH:mm}")%>'></asp:HiddenField> 
                </ItemTemplate>                 
                </telerik:GridTemplateColumn> 
                <telerik:GridTemplateColumn HeaderText="Chức năng" UniqueName="colAction"
                    <HeaderStyle Width="70px"  /> 
                    <ItemTemplate>                         
                        <asp:LinkButton ID="lnk_Edit" runat="server" CausesValidation="False" CommandName="Edit" 
                             Text="Sửa"></asp:LinkButton>                             
                        <asp:LinkButton ID="lnk_Delete" runat="server" CausesValidation="False" CommandName="Delete" 
                            OnClientClick="return AskDelete();" Text="Xóa"></asp:LinkButton> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
                  <EditFormSettings EditFormType="Template"
                    <FormTemplate >                     
                        <table cellspacing="1" cellpadding="1" Width="100%" border="0"
                            <tr> 
                                <td> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td width="100"
                                    Nội dung</td> 
                                <td> 
                                    <asp:TextBox ID="txtHistory2" runat="server" Rows="10" SkinID="TextHistory" Text='<%#Bind("HistoryText")%>' 
                                        TextMode="MultiLine" ValidationGroup="Gro_History_GV" ></asp:TextBox><br /> 
                                    <asp:RegularExpressionValidator ID="txtConclusionValidator_GV" runat="server" ControlToValidate="txtHistory2" 
                                        Display="Dynamic" EnableClientScript="False" SetFocusOnError="True" Text="Vượt quá 3500 ký tự" 
                                        ValidationExpression="^[\s\S]{0,3500}$" ValidationGroup="Gro_History_GV"></asp:RegularExpressionValidator><br /> 
                                </td> 
                            </tr> 
                        </table> 
                        <table style="width: 100%"
                            <tr> 
                                <td align="right" colspan="2"
                                    <asp:Button ID="cmdUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Cập nhật" %>' 
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' ValidationGroup="Gro_History_GV"
                                    </asp:Button>&nbsp; 
                                    <asp:Button ID="cmdClose" Text="Đóng" runat="server" CausesValidation="False" CommandName="Cancel"
                                    </asp:Button>                                     
                                </td> 
                            </tr> 
                        </table>                         
                    </FormTemplate>                     
                      <PopUpSettings Modal="True" Width="600px"   /> 
                </EditFormSettings> 
        </MasterTableView> 
    </telerik:RadGrid> 

0
kh0ngminh
Top achievements
Rank 1
answered on 05 Jun 2009, 01:25 PM
I know why.
When i use Telerik version 2009.1.402 i can hit enter normal in textbox multiline, but when i upgradeTelerik version 2009.1.527 i can't hit enter in textbox multiline again
how to fix hit enter in version 2009.1.527
Thanks
0
Pavlina
Telerik team
answered on 08 Jun 2009, 04:08 PM
Hello Kh0ngminh,

Indeed you are right and the behavior of hit enter in multiline textbox version 2009.1.527 is different.
I have notified our developers about it and they will look into it.

Please excuse us for the temporary inconvenience.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
kh0ngminh
Top achievements
Rank 1
answered on 13 Jun 2009, 02:59 AM
thanks for reply

0
Muhammad Zaheeruddin
Top achievements
Rank 1
answered on 18 Jun 2009, 03:28 PM
Any update on this issue?

Thanks,
Zaheer
0
Pavlina
Telerik team
answered on 19 Jun 2009, 03:07 PM
Hi Muhammad,

Indeed we are already aware of this issue and you can find it  fixed in Q2 2009 release.
Let me know if any questions arise.

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Muhammad Zaheeruddin
Top achievements
Rank 1
answered on 19 Jun 2009, 03:11 PM
Ok, I'll be looking forward from you.

Thanks,
Zaheer
Tags
Grid
Asked by
kh0ngminh
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
kh0ngminh
Top achievements
Rank 1
Muhammad Zaheeruddin
Top achievements
Rank 1
Share this question
or