I want to access UserControl element ex: textbox, checkbox, combobox...etc on ItemCommand event. I found some topic say can't do it. But, I hope someone can solve this. Thank all!
P/s: I have 4 button with custom command in usercontrol edit form. ItemCommand can do command, but can't access UserControl to retrieve value from control in it.
Hi,
I see this happening.
Markup is shown properly in the HTML view of the RadEditor, but is stripped when rendered on the page.
Here is my HTML as shown in the RadEditor:
<
p
><
img
alt
=
"the other"
src
=
"/PublishingImages/Signing-4730x.jpg"
/></
p
>
<
p
><
img
alt
=
"the other"
src
=
"/PublishingImages/Signing-4730x.jpg"
></
p
>
Also see this old post from 2009
Is this issue still applicable on the latest version of the RADEditor?
Ps. I know the <img> tag is a self closing tag, so the latter html is still valid. see here
Thanks!
Regards,
John
Hi,
I used a sample demo for the scheduler that was posted in the forums that works with sql datasource. Everything works great but for some reason the Advanced Edit form will not register a click to Save or Cancel once the modal popup is open. The .aspx is bellow and i am not sure if im missing something.
Thanks
body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
</div>
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End"
DataKeyField="ID" DataRecurrenceField="RecurrenceRule" AdvancedForm-Modal="true" AdvancedForm-Enabled="true"
DataRecurrenceParentKeyField="RecurrenceParentID" DataSourceID="SchedulerDataSource"
DataDescriptionField="Description"
Height="700px"
DataStartField="Start" DataSubjectField="Subject" Skin="Silk">
<AdvancedForm Modal="true" />
<TimelineView UserSelectable="false" />
<ResourceTypes>
<telerik:ResourceType DataSourceID="RoomsDataSource" ForeignKeyField="RoomID"
KeyField="ID" Name="Room" TextField="RoomName" />
</ResourceTypes>
<ResourceStyles>
<telerik:ResourceStyleMapping Type="Room" ApplyCssClass="rsCategoryOrange" Text="Room 101" />
<telerik:ResourceStyleMapping Type="Room" ApplyCssClass="rsCategoryGreen" Text="Room 102" />
<telerik:ResourceStyleMapping Type="Room" ApplyCssClass="rsCategoryPink" Text="Room 201" />
<telerik:ResourceStyleMapping Type="Room" ApplyCssClass="rsCategoryViolet" Text="Room 202" />
</ResourceStyles>
</telerik:RadScheduler>
<asp:SqlDataSource ID="SchedulerDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @ID"
InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Description], [RoomID]) VALUES (@Subject, @Start, @End, @RecurrenceRule, @RecurrenceParentID, @Description, @RoomID)"
SelectCommand="SELECT [ID], [Subject], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Description], [RoomID] FROM [Appointments]"
UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Description] = @Description, [RoomID] = @RoomID WHERE [ID] = @ID">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Subject" Type="String" />
<asp:Parameter Name="Start" Type="DateTime" />
<asp:Parameter Name="End" Type="DateTime" />
<asp:Parameter Name="RecurrenceRule" Type="String" />
<asp:Parameter Name="RecurrenceParentID" Type="Int32" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="RoomID" Type="Int32" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Subject" Type="String" />
<asp:Parameter Name="Start" Type="DateTime" />
<asp:Parameter Name="End" Type="DateTime" />
<asp:Parameter Name="RecurrenceRule" Type="String" />
<asp:Parameter Name="RecurrenceParentID" Type="Int32" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="RoomID" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>
<telerik:RadAjaxManager runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadScheduler1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<asp:SqlDataSource ID="RoomsDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
SelectCommand="SELECT [ID], [RoomName] FROM [Rooms]"></asp:SqlDataSource>
</form>
</body>
I've got a RadGantt that is both an AjaxControl and an AjaxUpdatedControl in a RadAjaxManager.
The control and the Ajax Updates work fine for everything except for deleting a task.
Sometimes a delete works fine, but about 90% of the time I get a javascript error when the page is attempting to update.
'Unable to get property 'oldUpdatePanelIDs' of undefined or null reference'
is coming from function _getPageLoadingEventArgs.
I don't understand why this doesn't happen all the time (or at all really), or why only on deletes. What would be different about the call or returned values based on the function? Anyone else seeing this behavior.
So, I have a grid databound in my code behind. It loads fine, and I built a detail button that works fine. But when I click on edit, I get: "JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Selection out of range Parameter name: value" and when I disable Ajax I can see:
[ArgumentOutOfRangeException: Selection out of range
Parameter name: value]
Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) +191
Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) +509
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +1296
Telerik.Web.UI.RadComboBox.PerformSelect() +37
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
Telerik.Web.UI.RadComboBox.DataBind() +71
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
Telerik.Web.UI.GridEditFormItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +414
Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +998
Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +211
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +2173
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +865
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +123
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
Telerik.Web.UI.GridTableView.PerformSelect() +38
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
Telerik.Web.UI.GridTableView.DataBind() +382
Telerik.Web.UI.GridTableView.Rebind() +108
Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +383
Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +210
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +147
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +121
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +156
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9665314
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
I've been beating my head against this and I can't see a thing wrong with the values I'm getting back from my queries.
My ASPX is:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
CellSpacing="0" GridLines="None" AllowPaging="True"
DataMember="ID"
onneeddatasource="RadGrid1_NeedDataSource"
OnUpdateCommand="RadGrid1_UpdateCommand" PageSize="20"
onitemcommand="RadGrid1_ItemCommand">
<MasterTableView DataKeyNames="status,charity,make,model,year,vin,date,id,salePrice,bid,note"
EditMode="EditForms">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridButtonColumn CommandName="History" Text="History" UniqueName="detailBtn" HeaderText="History" HeaderButtonType="PushButton" AutoPostBackOnFilter="True">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn HeaderText="Charity" ItemStyle-Width="140px" FilterControlAltText="Filter column2 column"
UniqueName="column3" DataType="System.String" DataField="charity" ReadOnly="True">
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="VIN" ItemStyle-Width="140px" FilterControlAltText="Filter column6 column"
UniqueName="column7" DataType="System.String" DataField="vin" >
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Year" ItemStyle-Width="140px" FilterControlAltText="Filter column2 column"
UniqueName="column2" DataType="System.Int32" DataField="year">
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Make" ItemStyle-Width="140px" FilterControlAltText="Filter column column"
UniqueName="column" DataType="System.String" DataField="make">
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Model" ItemStyle-Width="140px" FilterControlAltText="Filter column1 column"
UniqueName="column1" DataType="System.String" DataField="model">
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Last Update" ItemStyle-Width="140px" FilterControlAltText="Filter column1 column"
UniqueName="column5" DataType="System.DateTime" DataField="date" ReadOnly="True">
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Min. Bid" ItemStyle-Width="140px" FilterControlAltText="Filter column1 column"
UniqueName="column8" DataType="System.Decimal" DataField="bid" DataFormatString="{0:C}" >
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Sale Price" ItemStyle-Width="140px" FilterControlAltText="Filter column1 column"
UniqueName="column6" DataType="System.Decimal" DataField="salePrice" DataFormatString="{0:C}" Display="False">
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Notes" ItemStyle-Width="140px" FilterControlAltText="Filter column1 column"
UniqueName="unsoldNotesColumn" DataType="System.String" DataField="note" Display="True">
<ItemStyle Width="140px"></ItemStyle>
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Latest Status" ItemStyle-Width="240px" AutoPostBackOnFilter="True">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "Status")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox RenderMode="Lightweight" runat="server" ID="updateComboBox" DataTextField="Status"
DataValueField="ID" DataSourceID="LinqDataSource1" SelectedValue='<%#Bind("ID") %>'
>
</telerik:RadComboBox>
</EditItemTemplate>
<ItemStyle Width="240px"></ItemStyle>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn"
HeaderText="Edit" HeaderStyle-Width="100px" UpdateText="Update">
<HeaderStyle Width="100px"></HeaderStyle>
</telerik:GridEditCommandColumn>
</Columns>
<EditFormSettings EditColumn-DataType="System.String">
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
And I'm calling my query in the "need data source" event.
I'd be very very grateful for any advice!
Hi
I am currently trying to export multiple Radgrids all which contain different schemas to excel.
Radgrid 1 does a count status
Radgrid 2 does a count on phases in each status
Radgrid 3 does a detail of each each status and phase
So i want to export all 3 grids to one excel sheet is it possible through Telerik export?
Hi
Saw below link, in this page OnAjaxRequest="RadAjaxManager1_AjaxRequest" is called
My goal is to show loading image in RadTreeList when page loads
OnAjaxRequest="RadAjaxManager1_AjaxRequest" is in master page , how can i use this in ascx page
But in my environment i have like below
<telerik:RadAjaxManagerProxy ID="proxyManager" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadTreeList">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="sectionID" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadTreeList ID="taskTreeList" runat="server"></telerik:RadTreeList>
Is there any other workaround?
Senthil