Dim
editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
Tahir
I have the following code on a simple .aspx page:
| <telerik:RadAjaxPanel id="rap1" runat="server"> |
| <!-- This gives an error saying 'RadToolTipManager' is not a known element. --> |
| <telerik:RadToolTipManager runat="server" id="tipManager" /> |
| </telerik:RadAjaxPanel> |
Hi
I am using full featured MOSS Rad Editor in list items. It is perfect. I want to use MOSS Rad Editor to display the contents on home page.
I am using MOSS RadEditor in my web part.
Telerik.SharePoint.
MOSSRadEditor radEditor;
protected override void CreateChildControls()
{
base.CreateChildControls();
radEditor =
new MOSSRadEditor();
radEditor.ID =
"contentDisplay";
radEditor.RadControlsDir =
"~/_layouts/RadControls";
this.Controls.Add(radEditor);
}
I can see the editor in the web part and contents also but I have two problems:
1. I want the editor should be view mode only. It should not allow user to modify contents. Right now when I click inside the editor, it turns into edit mode.
2. The editor does not show Flash files and media files.
Please look into this and let me know the solution asap.
Thanks in advance
Umesh
I've got a Window as an Editor for a RadGrid and I'm converting it from the regular controls to the Prometheus versions. Everything works ok except the grid doesn't refresh itself after the window closes. I've got the following code:
Main Page:
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function ShowEditForm(id, rowIndex) |
| { |
| var grid = $find("<%= ScheduleEditRadGrid.ClientID %>"); |
| var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); |
| grid.get_masterTableView().selectItem(rowControl, true); |
| window.radopen("assignments_edit.aspx?sid=" + id, "EditAssignmentsDialog"); |
| return false; |
| } |
| function refreshGrid(arg) |
| { |
| if(!arg) |
| { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); |
| } |
| else |
| { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate"); |
| } |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function CloseAndRebind() |
| { |
| GetRadWindow().close(); |
| GetRadWindow().BrowserWindow.refreshGrid(null); |
| } |
| function GetRadWindow() |
| { |
| var oWindow = null; |
| if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog |
| else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well) |
| return oWindow; |
| } |
| function CancelEdit() |
| { |
| GetRadWindow().close(); |
| } |
| </script> |
| </telerik:RadCodeBlock> |
Hello!
I need to update several RadAjaxPanels from javascript. I tried to use somethink like this:
function Update()
{
<%= RadAjaxPanel1.GetAjaxEventReference("") %>;
<%= RadAjaxPanel2.GetAjaxEventReference("") %>;
}
But in this case, second one panel will be updated only.
The same situation i have when try to update RadAjaxPanel and do RadComboBox requestItems method.
I think all of this linked with limit of simultaneous HTTP requests.
Can anybody help me?
| <rad:RadGrid ID="rgOrder" runat="server" AllowPaging="False" AllowSorting="True" width="400" AllowAutomaticUpdates="true" OnItemCreated="rgItemCreated" OnItemDataBound="rgItemDataBound" OnNeedDataSource="rgNeedDataSource" AllowMultiEdit="True" |
| ShowFooter="false" CssClass="radGrid" EnableEmbeddedSkins="false" ShowHeader="true" AutoGenerateColumns="false" AllowMultiRowEdit="true"> |
| <MasterTableView EditMode="InPlace" DataKeyNames="ID"> |
| <ItemStyle CssClass="rgRow" /> |
| <FooterStyle CssClass="rgFooter"></FooterStyle> |
| <Columns> |
| <rad:GridBoundColumn DataField="ID" Display="false" /> |
| <rad:GridTemplateColumn HeaderText="Image" HeaderStyle-HorizontalAlign="left" HeaderStyle-Width="30" ItemStyle-Width="30" AllowFiltering="false"> |
| <ItemTemplate> |
| <img src="/images/demo_image_for_oc.jpg" alt="demo image"> |
| </ItemTemplate> |
| </rad:GridTemplateColumn> |
| <rad:GridBoundColumn readonly="true" DataField="Description" HeaderText="Description" HeaderStyle-Width="50" ItemStyle-Width="50" SortExpression="Description" HeaderStyle-HorizontalAlign="Left" AllowSorting="true" /> |
| <rad:GridTemplateColumn UniqueName="Quantity" HeaderText="Quantity" HeaderStyle-HorizontalAlign="left" HeaderStyle-Width="60" ItemStyle-Width="60" AllowFiltering="false"> |
| <ItemTemplate> |
| <asp:DropDownList runat="server" ID="ddlQuantity" DataTextField="Quantity" DataValueField="Quantity" DataSourceID="dataQuantity"> |
| </asp:DropDownList> |
| <asp:ObjectDataSource TypeName="Oser.Order" ID="dataQuantity" runat="server" SelectMethod="GetAllQuantities"> |
| </asp:ObjectDataSource> |
| </ItemTemplate> |
| </rad:GridTemplateColumn> |
| <rad:GridBoundColumn readonly="true" DataField="Price" HeaderText="Price" HeaderStyle-HorizontalAlign="left" HeaderStyle-Width="35" ItemStyle-Width="35" SortExpression="Price" AllowSorting="true" /> |
| <rad:GridBoundColumn readonly="true" DataField="QuantityPerUnit" HeaderStyle-HorizontalAlign="left" HeaderText="PerUnit" HeaderStyle-Width="40" ItemStyle-Width="40" SortExpression="PerUnit" AllowSorting="true" /> |
| <rad:GridEditCommandColumn ButtonType="ImageButton" ItemStyle-CssClass="btnEdit" EditImageUrl="~/images/btn_edit.jpg" HeaderStyle-Width="35" ItemStyle-Width="35" /> |
| <rad:GridTemplateColumn HeaderText="" HeaderStyle-Width="35" ItemStyle-Width="35" AllowFiltering="false"> |
| <ItemTemplate> |
| <asp:ImageButton ID="btnDelete" CssClass="btnDelete" OnClientClick="return confirm('Are you sure you want to delete this item?');" OnCommand="DeleteItem" CommandArgument='<%# Eval("ID") %>' ImageUrl="/images/btn_delete.jpg" runat="server" /> |
| </ItemTemplate> |
| </rad:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| </rad:RadGrid> |
| protected void rgItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
| { |
| Dictionary<int, int> orderItems = (Dictionary<int, int>)Session["orderItems"]; |
| if (orderItems != null && orderItems.Count > 0) |
| { |
| foreach (KeyValuePair<int, int> kvp in orderItems) |
| { |
| GridDataItem dataItem = e.Item as GridDataItem; |
| (DropDownList)dataItem["Quantity"].Controls[0]).SelectedValue = kvp.Value.ToString(); |
| } |
| } |
| } |