<
telerik:RadGrid ID="gvSort" runat="server" >
<
telerik:GridTemplateColumn HeaderText="Column" HeaderStyle-Width="180px">
<ItemTemplate>
<telerik:RadComboBox runat="Server" Width="175px" ID="ColName" CssClass="ddlClass" AutoPostBack="true" EnableViewState="true"/>
</ItemTemplate>
<HeaderStyle Width="180px"></HeaderStyle>
</telerik:GridTemplateColumn>
<telerik:RadGrid >
Dim Cmb As New Telerik.Web.UI.RadComboBox
Cmb =
CType(gvSort.FindControl("ColName"), RadComboBox)
Hi,
I use RadUpload to implement a upload files feature in my application.
I found a strange behavior in the component.
When I try to upload an empty file, the event "ValidatingFile" is not fired and the number of select files is 0.
How can I solve this problem?
Thanks.
Best regards,
Paulo Silva
| .RadGrid_Web20 .rgRow td, .RadGrid_Web20 .rgAltRow td, .RadGrid_Web20 .rgEditRow td, .RadGrid_Web20 .rgFooter td |
| { |
| padding-bottom:1px !important; |
| padding-top:2px !important; |
| } |
| .RadGrid_Web20 .rgRow td, .RadGrid_Web20 .rgAltRow td, .RadGrid_Web20 .rgSelectedRow td, .RadGrid_Web20 .rgActiveRow td, .RadGrid_Web20 .rgHoveredRow td, .RadGrid_Web20 .rgEditRow td |
| { |
| border-left: 1px solid #CFD9E7 !important; |
| border-right: 0px none #CFD9E7 !important; |
| padding-left:4px !important; |
| padding-right:4px !important; |
| } |
| .RadGrid_Web20 .rgRow td, .RadGrid_Web20 .rgAltRow td, .RadGrid_Web20 .rgEditRow td, .RadGrid_Web20 .rgFooter td, .RadGrid_Web20 .rgFilterRow td, .RadGrid_Web20 .rgHeader, .RadGrid_Web20 .rgResizeCol, .RadGrid_Web20 .rgGroupHeader td |
| { |
| padding-left:3px !important; |
| padding-right:3px !important; |
| } |
| .RadGrid_Web20 .rgRow > td:first-child, .RadGrid_Web20 .rgAltRow > td:first-child |
| { |
| border-left: 0 none !important; |
| } |
Recentally I updated my Rad controls.
I drag and drop a RadAjaxManager on to the page and use the Configure Ajax manager API to set up the control and this is what is automaticaly generate:
<telerik:RadAjaxManager ID="ramCreateMessage" runat="server">
<AjaxSettings>
<telerik.web.ui.ajaxsetting ajaxcontrolid="chkPriorityMessage"><updatedcontrols>
<telerik.web.ui.ajaxupdatedcontrol controlid="chkReadReceipt"></telerik.web.ui.ajaxupdatedcontrol>
</updatedcontrols>
</telerik.web.ui.ajaxsetting>
<telerik.web.ui.ajaxsetting ajaxcontrolid="btnSendMessage"><updatedcontrols>
<telerik.web.ui.ajaxupdatedcontrol controlid="lblRecipientError"></telerik.web.ui.ajaxupdatedcontrol>
</updatedcontrols>
</telerik.web.ui.ajaxsetting>
</AjaxSettings>
</telerik:RadAjaxManager>
The telerik.web.ui.ajaxsetting Tag is causing this error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Telerik.Web.UI.AjaxSettingsCollection must have items of type 'Telerik.Web.UI.AjaxSetting'. 'telerik.web.ui.ajaxsetting' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.
Source Error:
Line 111:<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
Line 112: <AjaxSettings>
Line 113: <telerik.web.ui.ajaxsetting ajaxcontrolid="chkPriorityMessage"><updatedcontrols>
Line 114:<telerik.web.ui.ajaxupdatedcontrol controlid="chkReadReceipt"></telerik.web.ui.ajaxupdatedcontrol>
Line 115:</updatedcontrols>
I can edit the client side code and correct the issue by doing this
<telerik:RadAjaxManager ID="ramCreateMessage" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="chkPriorityMessage">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="chkReadReceipt" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btnSendMessage">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="lblRecipientError" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
This is how the Configure Ajax manager API should be generating the code, I would like to use the Configure Ajax manager API
And NOT have to always modify my code. How do I fix this????? This Just happened after I updated my controls, PLEASE HELP.
| <td align="right" colspan="2"> |
| <asp:Button ID="btnUpdate" runat="server" CssClass="form-button" |
| CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' |
| Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' |
| /> |
| |
| <asp:Button ID="btnCancel" runat="server" CausesValidation="False" CssClass="form-button" |
| CommandName="Cancel" Text="Cancel" /> |
| </td> |
| protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) |
| { |
| ... |
| if (id == 0) |
| // if (result != null) |
| { |
| SqlDataSource2.UpdateParameters["Program"].DefaultValue = combo.SelectedItem.Text; |
| e.Canceled = false; |
| } |
| else |
| { |
| string user = "John Doe";
string stlocation = "Your Location"; |
| RadAjaxPanel1.ResponseScripts.Add(string.Format("alert('Location already exists for the selected user');")); |
| e.Canceled = true; |
| } |
| } |
I would like to show:
John Doe, Location already exists for the selected user from: Your Location. .
As you will notice, I stored John Doe in string user and Your Location in stlocation..
Is it possible this can be done via a Javscript Function and this whole string "John Doe, Location already exists for the selected user from: Your Location" can be pass as argument or parameter. This way I can call the same Function over and over from other events just by passing the parameter.
Thanks
GC_0620

| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGridTest3.aspx.cs" Inherits="RadGridTest3" %> |
| <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <title>Test Radgrids</title> |
| </head> |
| <body> |
| <form runat="server" id="mainForm" method="post"> |
| <div style="width:300px"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> |
| <!-- content start --> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" OnColumnCreated="RadGrid1_ColumnCreated" |
| OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound"> |
| <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" AllowSorting="true" |
| DataKeyNames="EmployeeID, ReportsTo" Width="100%"> |
| <SelfHierarchySettings ParentKeyName="ReportsTo" KeyName="EmployeeID" /> |
| </MasterTableView> |
| <HeaderStyle width="300px"/> |
| <ClientSettings AllowExpandCollapse="true"> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="1"> |
| </Scrolling> |
| </ClientSettings> |
| </telerik:RadGrid> |
| </div> |
| <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" |
| ProviderName="System.Data.SqlClient" SelectCommand="SELECT EmployeeID, LastName, FirstName, Title, ReportsTo FROM Employees" |
| runat="server"></asp:SqlDataSource> |
| </form> |
| </body> |
| </html> |