Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
289 views
I'm trying to use RadAlert in my .Net 4.0 web form/app and have found that trying to display certain text makes the window fail to appear.
I was trying to put a html table in mine and when I do the alert doesn't ever show up when called. Using the same code I can make the window display with no html tags involved. From what I have read html should be allowed, right?

If my message is "Testing 123" the window pops up.

If my message is a html table, the window doesn't pop up, like this:
"<table>
    <tr>
        <td>
            Label:
        </td>
        <td>
            Value
        </td>
    </tr>
</table>"

But a simpler html snippet like this does pop up:
Label:   <i>value</i> <br />

Is there a resource that will show me exactly what is or isn't allowed? Or is it a length restriction? Thanks!
Kevin
Top achievements
Rank 2
 answered on 30 Nov 2011
2 answers
219 views
Hello,

I want to add a div to a RadPane. This Div is target of a LoadingPanel because the content of the div is dynamic.

This is the div:
HtmlGenericControl contentDiv = new HtmlGenericControl("div");
contentDiv.Style.Add("width", "100%");
contentDiv.Style.Add("height", "100%");

This is the RadPane:
RadPane pane2 = new RadPane();
pane2.ID = "Pane2";
pane2.Height = new Unit(100, UnitType.Percentage);
pane2.Width = new Unit(100, UnitType.Percentage);
pane2.Controls.Add(contentDiv);

The RadSplitter also has a height of 100%. The parent container has a fixed width.
The height of the RadPanes is ok, but the contentDiv doesn't fill the whole RadPane, because this is rendered:

<div id="RAD_SPLITTER_PANE_CONTENT_Pane2" style="overflow-x: auto; overflow-y: auto; height: 598px; width: 1210px; ">
<div id="ContentPanel1Panel" style="display: block; ">
<div id="ContentPanel1" style="width:100%;height:100%;"></div>

As you can see, the contentDiv produces 2 divs when it gets added to the RadPane. The first div has no width/height set, so the next div doesn't work as expected. What can I do that the automatically generated "ContentPanel1Panel" also has height/width = 100%?

Thanks!
JP
Top achievements
Rank 1
 answered on 30 Nov 2011
4 answers
131 views
Hey,

I'm trying to dynamically create various levels of detail tables for a project I'm working on. I have almost everything working now (in terms of display anyway) thanks to help from this forum, but there's just one more problem. I'm trying to reference the controls in various edit/insert sections but I've hit something of a problem.

At the top level I've added a hardcoded template in the front-end code, like so:
<EditFormSettings EditFormType="Template">
  <EditColumn UniqueName="EditCommandColumn1">
  </EditColumn>
  <FormTemplate>
    <asp:Panel ID="pnlZForm" runat="server">
      <div id="divZEdit">
        <asp:Label ID="lblMerchantCode" Width="150px" runat="server" Text="Merchant Code:" />
        <telerik:RadTextBox ID="rtxtMerchantCode" Runat="server" Width="150px" />
        <br />
        <asp:Label ID="lblAccountName" Width="150px" runat="server" Text="Account Name:" />
        <telerik:RadTextBox ID="rtxtAccountName" Runat="server" Width="150px" />
        <br />
        <asp:Label ID="lblSharedSecret" Width="150px" runat="server" Text="Shared Secret:" />
        <telerik:RadTextBox ID="rtxtSharedSecret" Runat="server" Width="150px" />
        <br />
        <telerik:RadButton ID="btnUpdate" runat="server" Text="Update" />
        <telerik:RadButton ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" />
      </div>
    </asp:Panel>
  </FormTemplate>
</EditFormSettings>

Now I can access these controls (or could on Friday when I was trying to get it to work) in the code by trying to access them in the ItemDataBound. However when I tried to create a template, use that for the form instead in the code and then access control from there it no longer seems to work. The code I'm using to assign the template is as follows (cut down for convenience to just the relevant code):
Private Sub rgdNewRadGrid_DetailTableDataBind(ByVal source As Object, ByVal e As GridDetailTableDataBindEventArgs) Handles rgdNewRadGrid.DetailTableDataBind
  Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
  
  Select Case e.DetailTableView.Name
    Case "myDetailTable"
      Dim myTrackingGUID As Guid = New Guid(dataItem.Item("MerchantTrackingGUID").Text)
      Dim myDataSet As New DataSet
  
      '===Get the DetailTable data===
      myDataSet = *get dataset from database*
  
      e.DetailTableView.DataSource = myDataSet
      e.DetailTableView.CommandItemDisplay = GridCommandItemDisplay.Top
      e.DetailTableView.CommandItemSettings.AddNewRecordImageUrl = "../Img/AddRecord.gif"
      e.DetailTableView.CommandItemSettings.AddNewRecordText = "Add New Details"
      e.DetailTableView.CommandItemSettings.ShowRefreshButton = False
      e.DetailTableView.EditFormSettings.EditFormType = GridEditFormType.Template
      e.DetailTableView.EditFormSettings.FormTemplate = LoadTemplate("Templates/myNewAdd.ascx")
  End Select
End Sub

The code for myNewAdd.ascx is just simply as follows, and it DISPLAYS absolutely fine on the form.
<%@ Control Language="VB" ClassName="myNewAdd" %>
<asp:Panel ID="pnlNewForm" runat="server">
  <div id="divNewEdit">
    <asp:Label ID="lblTerminalUserGroupID" Width="150px" runat="server" Text="TerminalUserGroupID:" />
    <telerik:RadComboBox ID="rcbxTerminalUserGroupID" Width="200px" runat="server" />
    <br />
    <telerik:RadButton ID="btnDetailUpdate" runat="server" Text="Update" />
    <telerik:RadButton ID="btnDetailCancel" runat="server" Text="Cancel" CommandName="Cancel" />
  </div>
</asp:Panel>

I'm aware the update button doesn't do anything at the moment, but at the moment I haven't gotten that far quite frankly. I'm more concerned with getting this code to work. So, I set that template as the template and it works, but when I try to access the control it doesn't work. I'm trying to access it in the ItemDataBound. Maybe I'm trying to access things in the wrong order and it's already run ItemDataBound before it's bound the template or something, in which case where do I bind the template? But here's the code I'm trying to use:
Protected Sub rgdNewRadGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgdNewRadGrid.ItemDataBound
  If e.Item.IsInEditMode AndAlso e.Item.OwnerTableView.Name = "myDetailTable" Then
    Dim editItem As GridEditFormItem = e.Item
    Dim rcbxTerminalUserGroupID As RadComboBox = editItem.FindControl("rcbxTerminalUserGroupID")
    Dim myDataSet As Data.DataSet
  
    myDataSet = *get data from database*
  
    For Each row As DataRow In myDataSet.Tables(0).Rows
      Dim myItem As New RadComboBoxItem
      myItem.Text = row.Item("NAME").ToString
      If Not rcbxTerminalUserGroupID Is Nothing Then
        rcbxTerminalUserGroupID.Items.Add(myItem)
      End If
    Next
  End If
End Sub

The reason I have "If Not rcbxTerminalUserGroupID Is Nothing Then" is because I was continuously getting a NullReferenceException because evidently it couldn't find the control, even though the control blatantly displays on the page. Like I said above, I'm going to assume this is because of the way that the RadGrids run the procedures possibly, or something else related to the template, but it's immensely annoying and I really want to get this working.

If anyone can help I'll be massively grateful.
Pete
Top achievements
Rank 1
 answered on 30 Nov 2011
2 answers
144 views
Hello telerik members;

Pease can you help on the below;

I have a grid with an edit item command that loads a user control form like:http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx 
I need to close the edit form (user control) when the user clicks back on the edit item command just like clicking cancel button on the user control. 

Best Regards
Amjad
Top achievements
Rank 1
 answered on 30 Nov 2011
2 answers
129 views
Hi there, 

I have an ascx control where I have a timer, a few textboxes and a datagrid in an AJAX panel.

Every 10 seconds, the timer calls a module that builds an SQL query depending on the textboxes given, then fetches the data and binds it to the grid.

My problem is that sometimes it loses its scroll position. It does not necessarily scroll to the top, sometimes it even scrolls to the bottom or middle of the page (This means it is not doing a full page refresh... which is good).

My suspicion is that it scrolls to the control that is focused on.

Anyway to stop this?

Thanks!

K
Kevin Cauchi
Top achievements
Rank 1
 answered on 30 Nov 2011
3 answers
92 views
This was with regards to supporting large data, with radtree and radgrid controls. Do you have any inbuilt virtualization functionality like in silverlight for supporting huge data on the client, or any plans to have it incorporated in future? 
Radoslav
Telerik team
 answered on 30 Nov 2011
1 answer
167 views

Hi,

I have a page with the radgrid ,which is coded as below:

<
telerik:RadGrid ID="rgSchool" ShowGroupPanel="false" ShowStatusBar="true" AllowCustomPaging="true"

            RegisterWithScriptManager="true" runat="server" AutoGenerateColumns="False" AllowSorting="True"

            GridLines="Vertical" OnSortCommand=" rgSchool _SortCommand" AllowMultiRowSelection="False"

            AllowPaging="True" Skin="Vista" OnNeedDataSource=" rgSchool _NeedDataSource"

            OnPageIndexChanged=" rgSchool _PageIndexChanged" OnPageSizeChanged=" rgSchool _PageSizeChanged"

            OnItemDataBound=" rgSchool _ItemDataBound" OnGroupsChanging=" rgSchool _GroupChanging"

            OnColumnHiding=" rgSchool _ColumnHidden">

            <SortingSettings EnableSkinSortStyles="false" />

            <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true"></PagerStyle>

            <MasterTableView Width="100%" DataKeyNames="SerialNumber, StudId,Status" ClientDataKeyNames="SerialNumber, StudId,Status"

                AllowMultiColumnSorting="false" EnableHeaderContextMenu="true" AutoGenerateColumns="false"

                TableLayout="auto">

                <Columns>

 

                    <telerik:GridBoundColumn DataField="DateJoin" HeaderText="Date Of Joining" SortExpression="DateReceived"

                        Visible="true" DataFormatString="{0:MM/dd/yyyy}" />

                    <telerik:GridBoundColumn DataField="SerialNumber" HeaderText="Serial #" SortExpression="SerialNumber"

                        Visible="true" DataFormatString="{0:N0}" />

                    <telerik:GridBoundColumn DataField=" StudId " HeaderText="Student ID #" SortExpression=" StudId "

                        Visible="true" />

                    <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"

                        Visible="true" />

                    </telerik:GridBoundColumn>

                </Columns>

            </MasterTableView>

            <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" EnableRowHoverStyle="true">

                <Scrolling AllowScroll="false" SaveScrollPosition="true" UseStaticHeaders="true" />

                <Resizing AllowColumnResize="true" EnableRealTimeResize="false" ResizeGridOnColumnResize="false"

                    ClipCellContentOnResize="false" AllowResizeToFit="true" />

                <Selecting AllowRowSelect="true" />

                <ClientEvents OnRowDblClick="RowDblClick" OnRowSelected="RowSelected" OnRowContextMenu="onRowContextMenu"

                    OnColumnHidden=" rgSchoolColumnHidden" OnColumnShown=" rgSchoolColumnShown" />

            </ClientSettings>

            <HeaderContextMenu EnableScreenBoundaryDetection="true" EnableAutoScroll="true" />

        </telerik:RadGrid>

So,the users can sort,Hide,Group the columns.The sorting of the column will be done in the SP itself,based on the column(header selected).So,From the SP though get the correctly sorted data(i.e., though the DataSource is updated correctly),the grid is not STILL NOT showing the correctly sorted data.Please find the related server side code below :

protected void rgSchool_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

{

try

{

ViewState["CurrentPageIndex"] = rgSchool.CurrentPageIndex + 1;

 //Getting the sorted,......data through SP.and storing in response object.

  IEnumerable<rgSchoolReadRecord> response = WCFObj.Read(out recordCount, request);

rgSchool.DataSource = null;

rgSchool.DataSource = response;//DataSorce is updating correctly

rgSchool.VirtualItemCount = recordCount;

rgSchool.CurrentPageIndex = request.PageIndex - 1;

WCFObj.Close();

//Set the current paging and sorting in View state

ViewState["CurrentPageIndex"] = request.PageIndex;

ViewState["PageSize"] = request.PageSize;

ViewState["CurrentSort"] = request.OrderBy;

ViewState["SortDescending"] = request.Desc;

ViewState["rgSchoolSearchRequestObjet"] = request;

ViewState["recordCount"] = recordCount;

}}

Antonio Stoilkov
Telerik team
 answered on 30 Nov 2011
1 answer
354 views
More Information:
It is reproducible when run under IIS.  Works fine during development while running under VS2010.  Thanks.


I am getting InsecureExternalStyleSheetException while running Telerik's control in webform:

[InsecureExternalStyleSheetException: The style sheet '/Styles/Site.css' is not located in any of the 'Style Sheet' folders designated in the web.config.] 
Telerik.Web.UI.ExternalStyleSheetUtils.ResolveSecurePath(String styleSheetRelativePath) +386
Telerik.Web.UI.StyleSheetReference.GetScriptEntry() +363
Telerik.Web.UI.RadStyleSheetManager.RegisterValidStyleSheets(IList`1 styleSheets) +84
Telerik.Web.UI.RadStyleSheetManager.Page_PreRenderComplete(Object sender, EventArgs e) +172
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4543


Below is the app setting in my web.xml:
    <appSettings>
        <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" />
        <add key="Telerik.StyleSheetManager.TelerikCdn" value="Auto" />
        <add key="Telerik.Web.UI.StyleSheetFolders" value="~/Styles/;~" />
        <add key="Telerik.EnabledEmbedSkins" value="false" />
        <add key="Telerik.Skin" value="AuraGlass"/>
    </appSettings>

Simon
Telerik team
 answered on 30 Nov 2011
1 answer
74 views
Hi all,

We have a requirement based on 'network bussiness' where the all registered users structure should be  in Tree View such as i attached below screen shot.
For each Main(parent) user two sub users(child) Left & Right, and for each left user should have again 2 users, right user should have 2 users same left and right, All this i need dynamically.
For Eg: If A user is registered in our site and 'A' user will refer two users like B & C, so that B & C users will be registered under 'A' user.
Hope you understood my scenario and reply me soon, for this type of requirement do we have any controls? How do i proceed ?
Please provide some me some stuff for my practice.

Thanks & Regards
SK.Suhail
Kate
Telerik team
 answered on 30 Nov 2011
3 answers
122 views
Hi,
    I am using rad tool tip manager to enable it in particular rad charts in the page. But it enables for all rad controls other than charts. My requirement is to set it enable only for few chart controls. I added my chart control IDs in the target controls collection of the tool tip manager. Now other controls stopped to response to the tool tip; But in rad charts, the tool tip is not populating correctly and it shows as small circle near the point. Also regular tool tip is displaying with this rad tool tip on mouse over. Is there any solution to get it clear ?
Regards
Shafi
Tsvetie
Telerik team
 answered on 30 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?