or
<telerik:RadGrid runat="server" ID="grdControl" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GridLines="None"> <MasterTableView AutoGenerateColumns="False" EditMode="EditForms" DataKeyNames="ControlId, StepId" CommandItemDisplay="Bottom"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <Columns> <telerik:GridButtonColumn ButtonType="LinkButton" Text="Select" CommandName="Select" UniqueName="Select"> </telerik:GridButtonColumn> <telerik:GridEditCommandColumn UniqueName="Edit"> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete"> </telerik:GridButtonColumn> <telerik:GridDropDownColumn DataField="ControlName" HeaderText="Control Type" UniqueName="ControlName"> </telerik:GridDropDownColumn> <telerik:GridBoundColumn DataField="MaxLength" HeaderText="Max Length" UniqueName="MaxLength"> </telerik:GridBoundColumn> <telerik:GridDropDownColumn DataField="TextMode" HeaderText="Text Mode" UniqueName="TextMode" /> <telerik:GridDropDownColumn DataField="ListSource" HeaderText="List Source" UniqueName="ListSource"> </telerik:GridDropDownColumn> <telerik:GridBoundColumn DataField="EmptyListText" HeaderText="Empty List Text" UniqueName="EmptyListText"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <FilterMenu> </FilterMenu> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"> </HeaderContextMenu></telerik:RadGrid> Private Sub grdControl_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grdControl.ItemDataBound If TypeOf e.Item Is GridEditableItem Then Dim item As GridEditableItem = e.Item Dim control As FormControlInfo Dim ffc As New FlexFormController() If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then If e.Item.OwnerTableView.IsItemInserted Then control = New FormControlInfo() Else control = e.Item.DataItem End If Dim editor As GridDropDownListColumnEditor Dim cbo As RadComboBox 'ControlName dropdown Dim path As String = Server.MapPath("~/DesktopModules/Dotcom.FlexForm/Components/FormControls/") Dim files As String() = IO.Directory.GetFiles(path, "*.ascx") For i = 0 To files.Length - 1 files(i) = IO.Path.GetFileName(files(i)).Replace(".ascx", String.Empty) Next editor = item.EditManager.GetColumnEditor("ControlName") editor.DataSource = files editor.DataBind() editor.SelectedValue = control.ControlName 'ListSource dropdown editor = item.EditManager.GetColumnEditor("ListSource") Dim controller As New Lists.ListController() Dim list As Lists.ListInfoCollection If String.IsNullOrEmpty(control.ParentKey) Then list = controller.GetListInfoCollection() editor.DataTextField = "DisplayName" editor.DataValueField = "Key" Else list = controller.GetListInfoCollection(Nothing, control.ParentKey.Replace(":", ".")) editor.DataTextField = "Name" editor.DataValueField = "Name" End If editor.DataSource = list editor.DataBind() cbo = editor.ComboBoxControl cbo.Items.Insert(0, New RadComboBoxItem(Localization.GetString("EmptyListItem", Definition.SharedResources), String.Empty)) If Not String.IsNullOrEmpty(control.ListSource) Then editor.SelectedValue = control.ListSource End If 'TextMode dropdown editor = item.EditManager.GetColumnEditor("TextMode") editor.DataSource = [Enum].GetNames(GetType(TextBoxMode)) editor.DataBind() cbo = editor.ComboBoxControl cbo.Items.Insert(0, New RadComboBoxItem(Localization.GetString("EmptyListItem", Definition.SharedResources), String.Empty)) Else control = e.Item.DataItem item("ControlName").Text = control.ControlName item("ListSource").Text = control.ListSource item("EmptyListText").Text = Server.HtmlEncode(control.EmptyListText) item("ParentControlId").Text = control.ParentId If control.TextMode.HasValue Then item("TextMode").Text = control.TextMode.Value.ToString End If End If End If End Sub01.<telerik:RadRotator ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="Up"02. ScrollDuration="4000" runat="server" Width="714"03. ItemWidth="695" Height="260px" ItemHeight="70" FrameDuration="1" InitialItemIndex="-1"04. CssClass="rotator" OnItemClick="RadRotator1_ItemClick">05. <ItemTemplate>06. <div class="itemTemplate" style="background-image: url('IMAGES3/<%# this.GetDayOfWeek(XPath("pubDate").ToString()) %>.png');">07. <div class="dateTime">08. <div class="time">09. <%# (this.GetTimeOnly(XPath("pubDate").ToString())) %>10. </div>11. <div class="date">12. <%# (this.GetDateOnly(XPath("pubDate").ToString()))%>13. </div>14. </div>15. <div class="title">16. <span>17. <%# System.Web.HttpUtility.HtmlEncode(XPath("title").ToString())%>18. </span>19. </div>20. <div class="buttonDiv">21. <asp:Button ID="Button1" class="button" runat="server" Text="View" OnClientClick="OnClick" />22. <asp:HiddenField id="rssLink" runat="server" value='<%= System.Web.HttpUtility.HtmlEncode(XPath("link").ToString()%>' />23. 24. </div>25. <div class="description">26. <span>27. <%# System.Web.HttpUtility.HtmlEncode(XPath("description").ToString())%>28. </span>29. </div>30. </div>31. </ItemTemplate>32. </telerik:RadRotator>Hi,
As i upload image or document, it is added before p tag
I want to set focus in paragraph tag so that image is inserted in p tag.
eg current scenario <img src=''/><p></p>
i want it like this <p><img src=""></p>
Thanks

<telerik:RadGrid ID="rdTicketGrid" runat="server" Width="70%" AllowAutomaticUpdates="false" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowSorting="false" OnNeedDataSource="rdTicketGrid_NeedDataSource" AutoGenerateColumns="false" ShowFooter="true" OnInsertCommand="rdTicketGrid_InsertCommand" OnUpdateCommand="rdTicketGrid_UpdateCommand" OnItemCreated="rdTicketGrid_ItemCreated" OnDeleteCommand="rdTicketGrid_DeleteCommand" OnItemDataBound="rdTicketGrid_ItemDataBound"> <PagerStyle Mode="NextPrevAndNumeric" /> <MasterTableView DataKeyNames="TicketEntryID" CommandItemDisplay="Top" InsertItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="TicketEntryID" UniqueName="TicketEntryID" Display="false"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="NumOfTickets" HeaderText="Number of Tickets"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="NumberTicketsInSet" HeaderText="Number of Tickets per Set"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PriceOfTickets" HeaderText="Price of Tickets" DataFormatString="{0:C}"></telerik:GridBoundColumn> <telerik:GridCalculatedColumn HeaderText="Total Amount" UniqueName="TotalSetAmount" DataType="System.Double" DataFormatString="{0:C}" DataFields="NumOfTickets, NumberTicketsInSet, PriceOfTickets" Expression="{0}/{1}*{2}" FooterText="Total: " Aggregate="Sum" FooterAggregateFormatString="{0:C}"> </telerik:GridCalculatedColumn> <telerik:GridButtonColumn ConfirmText="Delete this ticket entry?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" /> </Columns> <EditFormSettings> <EditColumn ButtonType="ImageButton"></EditColumn> </EditFormSettings> </MasterTableView> <ClientSettings> <ClientEvents OnRowDblClick="rowDblClick" /> </ClientSettings> </telerik:RadGrid> <telerik:RadInputManager runat="server" ID="rdInputMgr" Enabled="true"> <telerik:NumericTextBoxSetting BehaviorID="TicketEntryIDTBSetting" Type="Number" AllowRounding="false" DecimalDigits="0"></telerik:NumericTextBoxSetting> <telerik:NumericTextBoxSetting BehaviorID="NumTicketsTBSetting" Type="Number" AllowRounding="false" DecimalDigits="0"></telerik:NumericTextBoxSetting> <telerik:NumericTextBoxSetting BehaviorID="PriceTicketsTBSetting" Type="Currency" AllowRounding="true" DecimalDigits="0"></telerik:NumericTextBoxSetting> <telerik:NumericTextBoxSetting BehaviorID="NumberTicketsInSetTBSetting" Type="Number" AllowRounding="true" DecimalDigits="0"></telerik:NumericTextBoxSetting> </telerik:RadInputManager>DataSet ds = new DataSet();DataTable dt = new DataTable();dt.Columns.Add("TicketEntryID");dt.Columns.Add("NumOfTickets", typeof(int));dt.Columns.Add("NumberTicketsInSet", typeof(int));dt.Columns.Add("PriceOfTickets", typeof(double));ds.Tables.Add(dt); Session["ticketGridSrc"] = ds;.protected void rdTicketGrid_DeleteCommand(object sender, GridCommandEventArgs e) { GridEditableItem editableItem = ((GridEditableItem)e.Item); try { int ticketEntryID = int.Parse(((GridDataItem)e.Item).GetDataKeyValue("TicketEntryID").ToString()); //Access the data stored in the session DataSet currentDataSrc = ((DataSet)Session["ticketGridSrc"]); if (currentDataSrc != null) { //build the select string we need to get the data from the table to delete String selectStmt = string.Format("TicketEntryID = '{0}'", ticketEntryID); //Get the row we are deleting from the source. DataRow[] updateRow = currentDataSrc.Tables[0].Select(selectStmt); updateRow[0].Delete(); currentDataSrc.AcceptChanges(); } Session["ticketGridSrc"] = currentDataSrc; } catch (Exception ex) { //TODO: Error Handling Here } }