Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
137 views

I have a user control that contains a radio list that on SelectIndexChanged it updates a drop down.

I put together a basic page and add the user control to the page it works fine but when I move the control to inside a radgrid it doesn't work, it will post back but never call the SelectIndexChanged event.


Working code

working.aspx

<TT:ToolTipControl ID="ToolTipEdit" runat="server" />

working.aspx.cs

protected void Page_Load(object sender, EventArgs e)
{
    ToolTipEdit.getEditToolTip("POL_TERM_CD", "DataPolTermDropDownlistEdit");
}

User Control


userControl.ascx.cs

public void getEditToolTip(string fieldName, string ddlName)
{
     DataPolTermRadioListBox ccPolTermRadioListBox = new DataPolTermRadioListBox(); //custom radio list
     ccPolTermRadioListBox.ID = "PolTermRadioListBox";
     ccPolTermRadioListBox.AutoPostBack = true;
     ccPolTermRadioListBox.SelectedIndexChanged += new System.EventHandler(updateParent);
     ToolTip.Controls.Add(ccPolTermRadioListBox);
}


Broken Code

brokenPage.aspx

<telerik:RadGrid ID="rgState" Skin="WebBlue" runat="server" OnNeedDataSource="rgState_NeedDataSource"
     AutoGenerateColumns="False" OnPreRender="rgState_PreRender">
     <MasterTableView DataKeyNames="wrtnStPolId" AllowAutomaticUpdates="false" AllowAutomaticDeletes="true"
         AllowAutomaticInserts="false" CommandItemDisplay="Top" AllowMultiColumnSorting="True"
         EditMode="InPlace" GroupLoadMode="Server" Caption="State(s) and Exposure(s)">
         <Columns>
             <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Pol Type Nstd" SortExpression="nonStdPolTypeCd"
                 UniqueName="nonStdPolTypeCd">
                 <ItemTemplate>
                     <asp:Label ID="lblNonStdPolTypeCd" runat="server" align="center" Text='<%#DataBinder.Eval(Container.DataItem, "nonStdPolTypeCd")%>' />
                        
                 </ItemTemplate>
                 <EditItemTemplate>
                     <cc1:DataNonStdTypeCdDropDownList ID="ddlNonStdTypeCd" runat="server" ClientIDMode="Predictable">
                     </cc1:DataNonStdTypeCdDropDownList>
                     <TT:ToolTipControl ID="ttcNonStdPolTypeCdEdit" runat="server" />
                 </EditItemTemplate>
             </telerik:GridTemplateColumn>
         </Columns>
     </MasterTableView>
 </telerik:RadGrid>


brokenPage.aspx.cs

protected void rgState_PreRender(object sender, EventArgs e)
        {
  
            RadGrid rgExpMod = (RadGrid)sender;
  
            foreach (GridDataItem row in rgExpMod.Items)
            {
  
                    GridDataItem gdiItem = (GridDataItem)row;
  
                    if (row.FindControl("ttcNonStdPolTypeCdEdit") != null)
                    {
  
                        DropDownList ddl = (DropDownList)row.FindControl("ddlNonStdTypeCd");
                        ddl.ID += row.RowIndex;
                        ddl.SelectedIndex = 2;
  
                        NCCI.PDC.Web.Controls.ucToolTip ttcNonStdPolTypeCdEdit = (NCCI.PDC.Web.Controls.ucToolTip)row.FindControl("ttcNonStdPolTypeCdEdit");
                        ttcNonStdPolTypeCdEdit.getEditToolTip("non_std_pol_type_cd", ddl.ID);
                          
                    }
            }
  
        }

Milena
Telerik team
 answered on 29 Oct 2012
3 answers
314 views
I'm new to Telerik.  In this case I'm not quite sure what I'm looking for.

I have a bit of ASP.Net sample code that allows me to upload Word docs and stick them into a varbinary(max) field in a SQL Server database.  (I am aware that there's a RadAsyncUpload control but I don't think that's what I'm looking for.)

Are there any Telerik controls or techniques that could help?
Kate
Telerik team
 answered on 29 Oct 2012
7 answers
583 views
I use the following code to display member images:

                <asp:Repeater runat="server" id="Repeater1" DataSourceID="SqlDataSource1">
                    <ItemTemplate>
                        <fieldset class="chatter-picture">
                            <a href="#" onclick='selectChatter("<%#Eval("username") %>")'>
                                <telerik:radbinaryimage runat="server" id="RadBinaryImage1" DataValue='<%#Eval("ImageData") %>'
                                    AutoAdjustImageControlSize="false" Width="67px" Height="50px" ToolTip='<%#Eval("username") %>'
                                    AlternateText='<%#Eval("username") %>' />
                            </a>
                        </fieldset>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
            <asp:SqlDataSource id="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
                SelectCommand="select top 30 username, i.ImageData from aspnet_Users u join member_Image i on i.UserId=u.UserId"></asp:SqlDataSource>

This works fine on my local development machine. However, when I take the code to the production server, where the Telerik Rad Controls for AJAX have also been installed, the images do not show up. How do I troubleshoot this problem on the production server?

Thank you for your time.
Antonio Stoilkov
Telerik team
 answered on 29 Oct 2012
4 answers
415 views
We have found that if you zoom in (CTRL +) or use the zoom menu in Chrome to zoom the drag-n-drop functionality becomes unpredicatble - sometimes it will work and sometimes it won't. IE and Firefox don't seem to have this problem. 

I have been able to recreate this issue in this demo (as well as our app):
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx

If you drag an item to the recycle bin depending on where you drop it - the drop may or may not work. Specifically I have found that there is a point in the middle of the basket where it will fail consistently - when zoomed in a little. In the demo the cursor turns into a hand when the item is over the recycle bin and when that happens the drop usually works. However it seems if you are hovering over the bin and the cursor is still a standard arrow and you drop it - the drop fails and the item is not removed from the grid.

I don't know if this is something that Telerik or anyone other than the Chrome team can fix. Any thoughts, suggestions?
Pavlina
Telerik team
 answered on 29 Oct 2012
1 answer
85 views
Sorry, this belongs in Grid forum, not Editor forum. I'll repost it there.

I have a radGrid that is grouped by a certain text field. When GroupsDefaultExpanded is true (or not specified) clicking the Edit button open the popup form template correctly. But when I set GroupsDefaultExpanded to false, the Edit button no longer opens the editor popup. Clicking the Edit buttons posts back to the server, the ItemCommand event is executed with CommandName equal to "Edit", but then the group collapses itself, and the editor never appears! Clicking the AddItem link does open the editor successfully. If I change nothing more than the value of GroupsDefaultExpanded this behavior appears and disappears, so it is obviously related.
Daniel
Telerik team
 answered on 29 Oct 2012
3 answers
134 views
I've got a radEditor in a popup edit form template for a radGrid. I've set the editor's size like this:
<telerik:RadEditor ID="reItemText" Runat="server" Width="800" Height="300" AutoResizeHeight="false" EnableResize="false" ToolsWidth="800" ContentAreaMode="Div" Skin="WebBlue" Content='<%# DataBinder.Eval(Container, "DataItem.ItemText") %>'>
</telerik:RadEditor>

I've set the external style sheets in my master page like this (I did because the editor was initially coming up about 1000px wide!):
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server">
   <StyleSheets>
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css" />
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" />
      <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css" />
   </StyleSheets>
</telerik:RadStyleSheetManager>

The editor size is set exactly as I specified, but instead of the actual editing area being resized, I've got a bunch of empty space at the BOTTOM of the editor (see the attached image).

How can I get rid of the useless space at the bottom of the editor and make the editable area larger?

The screenshot is from IE 9. I'm using radControls for ASP.NET Ajax Q1 2012.

Rumen
Telerik team
 answered on 29 Oct 2012
4 answers
264 views
I've got a radEditor in a popup form template of a radGrid as follows:
<EditFormSettings EditFormType="Template" CaptionFormatString="Edit News Item" >
  <PopUpSettings Height="500" Width="900" Modal="true" CloseButtonToolTip="Close" ScrollBars="Auto"/>
  <EditColumn></EditColumn>
  <FormTemplate>
    <table width="100%" border="0" cellpadding="0" cellspacing="6">
      <tr>
        <td valign="top"><b>Title:</b></td>
        <td valign="top">
          <telerik:RadTextBox ID="rtbTItle" runat="server" Width="400" TextMode="SingleLine" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>' Skin="WebBlue">
          </telerik:RadTextBox>
        </td>
      </tr>
      <tr>
        <td colspan="2" valign="top" style="">
          <b>Item Text:</b><br />
          <telerik:RadEditor ID="reItemText" runat="server" OnClientLoad="reItemText_OnClientLoad" OnClientModeChange="reItemText_OnClientModeChange" Width="800" Height="300" AutoResizeHeight="false" EnableResize="false" ToolsWidth="800" ContentAreaMode="Div" Skin="WebBlue" Content='<%# DataBinder.Eval(Container, "DataItem.ItemText") %>'>
          </telerik:RadEditor>
        </td>
      </tr>
    </table>
  </FormTemplate>
</EditFormSettings>

Because of initial size problems I've included the external style sheet files as recommended in another forum post like this:
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server">
  <StyleSheets>
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css" />
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" />
    <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css" />
  </StyleSheets>
</telerik:RadStyleSheetManager>

I've also got an OnClientLoad handler to set the size of the radEditor like this:
function reItemText_OnClientLoad(sender,args){
  sender.setSize( 800, 300 );
  var oElem = sender.get_element( );
  oElem.style.height = "300px";
  oElem.style.width = "800px";
}

This all works beautifully, until  you change the radEditor mode. Then the size of the radEditor changes. How it changes seems to depend on which order you change modes in, but it never does return to the size I originally set it to.

Here are two examples. I've attached screen captures showing the problem using Iconico's Screen Calipers to measure the size of the radEditor.

Example 1:
Initial size in Design mode - 300px (A1 Design.png)
Change to Preview mode - 294px (A2 Preview.png)
Change to HTML mode - 294px (A3 HTML.png)
Change to Design mode - 294px (A4 Design.png)
Change t HTML mode - 330px (A5 HTML.png)

Example 2:
Initial size in Design mode - 300px (B1 Design.png)
Change to HTML mode - 330px (B2 HTML.png)
Change to Preview mode - 324px (B3 Preview.png)
Change to HTML mode - 318px (B4 HTML.png)
Change to Design mode - 324px (B5 Design.png)

I tried adding an OnClientModeChange event handler to the radGrid to reset the size again (code identical to OnClientLoad handler) but that had no effect.
Rumen
Telerik team
 answered on 29 Oct 2012
1 answer
92 views
Hi,

I have a tree view control that loads on demand. When i click on one of the nodes, there is an ajax operation that fetches data from server side and populates child nodes for this tree view control. I am getting a "Stop running script" prompt when i attempt to expand the node. I tried the suggestions as per the link below:

http://www.telerik.com/help/aspnet-ajax/treeview-troubleshooting-treeview-script-causes-ie-run-slowly.html

Unfortunately this does not work, please suggest on how do i overcome this issue.

Thanks and regards,
Damodar
Plamen
Telerik team
 answered on 29 Oct 2012
1 answer
197 views
Can a RadGrid be setup to automatically scroll using jquery/javascript?  I have a requirement to display data but I need the data to continously scroll in a loop without user interaction. 

TIA
Eyup
Telerik team
 answered on 29 Oct 2012
1 answer
147 views
Hi,

I need to generate custom XML from RadTreeList control. Can you please help me how can I traverse the TreeList. 

Thanks
Marin
Telerik team
 answered on 29 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?