I am getting error on Insert/Update in Radgrid.
Validators are does not works or
only works after post back in grid with editmode inplace or editforms.
the page works fine on local PC(windows XP) but after uploading on server (Windows 2003) it fires validators only after once page is postback.
Validators are does not works or
only works after post back in grid with editmode inplace or editforms.
the page works fine on local PC(windows XP) but after uploading on server (Windows 2003) it fires validators only after once page is postback.
3 Answers, 1 is accepted
0
Hi Shahejad,
Could you please elaborate what is the error you receive? Any further information about your scenario is also welcome. You can refer to this online example for illustration of validation in a Grid's edit field.
Greetings,
Pavel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Could you please elaborate what is the error you receive? Any further information about your scenario is also welcome. You can refer to this online example for illustration of validation in a Grid's edit field.
Greetings,
Pavel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Legalia
Top achievements
Rank 1
answered on 22 Jan 2009, 05:36 AM
hi...
i am placing my code here..
ASPX file....
and code of CS file..
i have nothing more than this in my page. it works fine in my local PC. but it does not firing validators on server.
thanks.
i am placing my code here..
ASPX file....
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> | |
<AjaxSettings> | |
<telerik:AjaxSetting AjaxControlID="dgMyGrid"> | |
<UpdatedControls> | |
<telerik:AjaxUpdatedControl ControlID="dgMyGrid" /> | |
</UpdatedControls> | |
</telerik:AjaxSetting> | |
</AjaxSettings> | |
</telerik:RadAjaxManager> | |
<telerik:RadGrid ID="dgMyGrid" Width="97%" AllowSorting="True" AllowPaging="True" | |
PageSize="15" runat="server" AllowMultiRowSelection="false" AllowMultiRowEdit="false" | |
AllowAutomaticUpdates="false" AutoGenerateColumns="false" ShowStatusBar="true" | |
AutoGenerateEditColumn="true" AutoGenerateDeleteColumn="true" AllowFilteringByColumn="True" | |
ShowGroupPanel="false" OnNeedDataSource="dgMyGrid_NeedDataSource"> | |
<PagerStyle Mode="Slider" /> | |
<MasterTableView CommandItemDisplay="Top" DataKeyNames="code" EditMode="InPlace" | |
Width="100%"> | |
<CommandItemTemplate> | |
<div style="padding: 10px 0px;"> | |
<asp:LinkButton ID="lnkInsert" runat="server" CommandName="InitInsert" Visible='<%# !dgMyGrid.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Grid/AddRecord.gif" /> Add new Item</asp:LinkButton> | |
</div> | |
</CommandItemTemplate> | |
<Columns> | |
<telerik:GridTemplateColumn HeaderText="Name" SortExpression="description" UniqueName="description" | |
EditFormColumnIndex="1" DataField="description"> | |
<HeaderStyle Width="170px" /> | |
<ItemTemplate> | |
<asp:Label runat="server" ID="lblDescription" Text='<%#Eval("description")%>' /> | |
</ItemTemplate> | |
<EditItemTemplate> | |
<asp:TextBox runat="server" Width="120px" ID="txtDescription" MaxLength="50" Text='<%# Bind("description") %>' /> | |
<span class="reqChar">*</span> | |
<asp:RequiredFieldValidator ID="rfvDescription" ControlToValidate="txtDescription" | |
ErrorMessage='Description required.' runat="server" Display="None" /> | |
<asp:ValidationSummary runat="server" ID="valSummary" ShowMessageBox="true" ShowSummary="false" | |
DisplayMode="BulletList" /> | |
</EditItemTemplate> | |
</telerik:GridTemplateColumn> | |
</Columns> | |
</MasterTableView> | |
</telerik:RadGrid> |
and code of CS file..
protected void dgMyGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) | |
{ | |
BindData(); | |
} | |
void BindData() | |
{ | |
dgMyGrid.DataSource = GetPersonData(); //-- 'GetPersonData' returns data table. | |
} |
i have nothing more than this in my page. it works fine in my local PC. but it does not firing validators on server.
thanks.
0
Accepted
Paresh
Top achievements
Rank 1
answered on 22 Jan 2009, 06:05 AM
hi...
i got the solution...
the problem is due to framework version. installing service pack it will work.
thanks..
i got the solution...
the problem is due to framework version. installing service pack it will work.
thanks..