Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
260 views
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If (Not IsPostBack) Then
    End If
End Sub
Private Sub LoadEPTexts(ByVal sChapters As String, ByVal sStandards As String, ByVal sEPs As String)
    Try
        Me.rgEPText.DataSource = ListEPTextByChapterAndStandard(sChapters, sStandards, sEPs, 2)
        Me.rgEPText.DataBind()
    Catch ex As Exception
        Throw ex
    End Try
End Sub
Private Sub rgEPText_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgEPText.ItemDataBound
    If (e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = GridItemType.AlternatingItem) Then
        Dim item As GridDataItem = CType(e.Item, GridDataItem)
        If (CInt(item("ReleaseId").Text) <> 2) Then
            item("StatusIndicator").Text = String.Empty
        End If
    End If
End Sub
Protected Function FormatText(ByVal s As String) As String
    Try
        If (s.Length > 210) Then
            Return s.Substring(0, 209) & "..."
        Else
            Return s
        End If
    Catch ex As Exception
        Throw ex
    End Try
End Function
Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
    Me.LoadEPTexts("<Chapters> <Chapter id='54'/> </Chapters>", "", "")
End Sub

 

 

<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
  
        function GridCreated(sender, args) {
            var scrollArea = sender.GridDataDiv;
            var dataHeight = sender.get_masterTableView().get_element().clientHeight;
            if (dataHeight < 350) {
                scrollArea.style.height = dataHeight + 17 + "px";
            }
        }
    </script>
</telerik:RadCodeBlock> 
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSubmit">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgEPText" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>         
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>    
  
   
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="WebBlue">
    </telerik:RadSkinManager>
    <div>
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
<telerik:RadGrid ID="rgEPText" runat="server" AllowSorting="False" AllowFilteringByColumn="false" AllowPaging="False" AutoGenerateColumns="false" 
    AlternatingItemStyle-HorizontalAlign="Center" AlternatingItemStyle-VerticalAlign="Top" ItemStyle-VerticalAlign="Top" 
    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowMultiRowSelection="false">
        <HeaderStyle Font-Names="Arial" />
        <ItemStyle Font-Names="Arial" />
        <AlternatingItemStyle Font-Names="Arial" />
        <MasterTableView DataKeyNames="EPTextId,StdReleaseId">
            <Columns>
                <telerik:GridBoundColumn DataField="StandardId" Visible="false" UniqueName="StandardId" />
                <telerik:GridBoundColumn DataField="EPTextId" Visible="false" UniqueName="EPTextId" />
                <telerik:GridBoundColumn DataField="StdReleaseId" Visible="false" UniqueName="ReleaseId" />
                <telerik:GridBoundColumn DataField="StandardCycleId" Visible="false" UniqueName="StandardCycleId" />
                <telerik:GridBoundColumn HeaderText="Release" DataField="ReleaseDate" HeaderTooltip="Release Date: Shows the most recent modified date of the EP text" DataFormatString="{0:d}" UniqueName="ReleaseDate" HeaderStyle-Width="50px" ItemStyle-Width="50px" />
                <telerik:GridBoundColumn HeaderText="Status" DataField="StatusIndicator" 
                        HeaderTooltip="Status Indicator: Shows the status (D:Closed, N:New, M:Modified) of the EP text" 
                        UniqueName="StatusIndicator"
                        HeaderStyle-Width="40px" ItemStyle-Width="40px" />
                <telerik:GridBoundColumn DataField="ProgramId" Visible="false" UniqueName="ProgramId" />
                <telerik:GridBoundColumn DataField="ChapterId" Visible="false" UniqueName="ChapterId" />
                <telerik:GridBoundColumn HeaderText="Prg" DataField="ProgramCode" HeaderTooltip="Program: Shows the program the EP text belongs to" UniqueName="Program"  HeaderStyle-Width="30px" ItemStyle-Width="30px"/>
                <telerik:GridBoundColumn HeaderText="Standard"  DataField="StandardLabel" HeaderTooltip="Standard Label: Shows the standard label" UniqueName="StandardLabel" HeaderStyle-Width="85px" ItemStyle-Width="85px" />
                <telerik:GridBoundColumn HeaderText="EP"  DataField="EPLabel" HeaderTooltip="EP: Shows the label for the EP Text" UniqueName="EPLabel" HeaderStyle-Width="20px" ItemStyle-Width="20px" />
                <telerik:GridBoundColumn DataField="ProjectId" Visible="false" UniqueName="ProjectId" />
                <telerik:GridTemplateColumn HeaderText="Element of Performance Text" AllowFiltering="false" HeaderTooltip="Element of Performance Text: Shows the EP text" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:Label ID="lblText" runat="server" Text='<%# FormatText(DataBinder.Eval(Container.DataItem, "EPText")) %>' ></asp:Label>
                        <telerik:RadBinaryImage ID="imgEP" runat="server" ImageUrl="~/Images/c.gif" ToolTip="Indicates that the COP-EP relation exists" Visible='<%# DataBinder.Eval(Container.DataItem, "copfl") %>' />
                        <telerik:RadBinaryImage ID="imgHT" runat="server" ImageUrl="~/Images/h.gif" ToolTip="Indicates that the history tracking exists" Visible='<%# DataBinder.Eval(Container.DataItem, "htfl") %>' />
                        <telerik:RadBinaryImage ID="imgAddendum" runat="server" ImageUrl="~/Images/a.gif" ToolTip="Indicates that the addendum exists" Visible='<%# DataBinder.Eval(Container.DataItem, "adnfl") %>' />
                    </ItemTemplate>                                    
                </telerik:GridTemplateColumn>                    
            </Columns>
            <NoRecordsTemplate>
                <div style="padding:5px;height:50px;text-align:center;vertical-align:middle;">
                    Please select valid EP's !!!
                </div>
            </NoRecordsTemplate>                    
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="True"></Selecting>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
    </telerik:RadGrid>    
    </div>
    </form>
</body>
</html>

I have this radgrid on my page that takes a long time to load. when i debugged i found that, it retrieves the data(990 rows to be exact) from the database in about 4 seconds, but then when it hits the line where it binds the data to the grid it takes more than 20 seconds. On average for the grid to load the data it takes 35 seconds. Could you please help me as soon as possible? Our users are complaining and i am not able to comeup witha  solution on this one.

Thank you.
- Ajay

Pavlina
Telerik team
 answered on 18 Aug 2010
1 answer
97 views
Hi,

I have a telerik grid which has lengthy axis text labels. Due to its length, a part of the text is not shown as described in the attachment. The AutoLayout of Chart is set to false. I tried to fit it within the available space by using the below code but it had no effect.

chart.PlotArea.XAxis[count].TextBlock.Appearance.Position.AlignedPosition = AlignedPositions.Left;
chart.PlotArea.XAxis[count].TextBlock.Appearance.Dimensions.Margins.Left = new Unit(50);

Can anybody help me to display the complete axis text? This is a immediate requirement to be resolved for the client.

Thanks,
Krishna Samaga B.
Nikolay
Telerik team
 answered on 18 Aug 2010
1 answer
119 views
I need to apply some style settings to entire columns of data in a grouped grid. Since the group header is rendered as a single cell in a table, i.e., all the columns are merged into one with the group header text left aligned, I can't do this. Is there a way to make the group header render as un-merged cells? To be precise, I'm trying to attain a split grid. I need to have a single grid appear to be two grids side-by-side. The only way I can think of doing this is to override the styles on a dummy column to be blank, with left and right borders matching that of the grid. 

Thanks, Steve
Dimo
Telerik team
 answered on 18 Aug 2010
18 answers
228 views
Hi,

I have noticed that partial ajaxification does not work on Mono.
The entire page posts back.

I am currently using v2009.2.826.20 and the same thing happens. It works fine on IIS7 but not Mono.

Also, whenever I have a page linked to a master page, and that page contains a RadAjaxManager, that page is inaccesable and gives the following error: Operation is not valid due to the current state of the object
It does however work with RadAjaxPanel but I would like to use RadAjaxManager instead for performance.
The same error also occurs when enabling the compression module.

Thanks,
K

Daniel
Telerik team
 answered on 18 Aug 2010
3 answers
95 views
When the user clicks on a combobox that has already initialised with a value, usually the whole value highlights and when the user types it is overwritten.  This is the expected behaviour.

Sometimes, if the user starts typing quickly, the text they type is inserted into the existing text - it seems that they arre "too fast" for the highlighting to have taken effect.  Is there a way round this?

Thanks
John
Simon
Telerik team
 answered on 18 Aug 2010
5 answers
353 views
I would like certain areas of my html page in an editor to be editable and certain areas non-editable. I tried the following, but it doesn't work properly. It acts differently in different browsers.
IE:
The content is not editable if I click within the td, but if I click outside the td, I'm able to edit it.

Firefox:
I'm unable to edit both the editable and non-editable areas

Chrome:
I'm able to edit both editable and non-editable areas.
Am I missing something?

<telerik:RadEditor runat="server" ID="RadEditor1"  Height="400px">     
      <Content> 
         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
         <html xmlns="http://www.w3.org/1999/xhtml" > 
            <body> 
        <table>
<tr><td contenteditable="false" unselectable="on">Editable</td>
                       <td contentEditable="true" unselectable="off" >NonEditable</td>
                </tr>
        </table>
          </body> 
         </html> 
      </Content> 
</telerik:RadEditor> 
Rumen
Telerik team
 answered on 18 Aug 2010
2 answers
122 views
I am getting an Object Expected error in my default.aspx page on the same line every time I click the edit button of my grid for an existing record. It happens on the same line of the default.aspx page each time 
<td align="center" style="background-color:White;border-color:LightSteelBlue;font-weight:normal;font-size:11;"><input type="image" name="dnn$ctr497$ViewTTSTimeClock_Admin$TabContainer1$TabPanel1$RadGrid1$ctl01$ctl14$ctl00" title="Click to edit this record." src="/DesktopModules/TTSTimeClock_Admin/RadControls/Grid/Skins/Outlook2007/Edit.gif" alt="Click to add a record to this day" onclick="return ShowPopUp();RadGridNamespace.AsyncRequest('dnn$ctr497$ViewTTSTimeClock_Admin$TabContainer1$TabPanel1$RadGrid1$ctl01$ctl14$ctl00', '', 'dnn_ctr497_ViewTTSTimeClock_Admin_TabContainer1_TabPanel1_RadGrid1', event); return false;" style="border-width:0px;" /></td><td align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">edited</td><td style="color:White;background-color:White;border-color:LightSteelBlue;font-weight:normal;font-style:normal;font-size:11;">Wednesday</td><td align="center" style="color:White;background-color:White;border-color:LightSteelBlue;font-weight:normal;font-size:11;">8/04/10</td><td title="Default" align="center" style="background-color:White;border-color:LightSteelBlue;width:12px;font-size:11;">001</td><td title="Main" align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">1</td><td title="Main" align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">33</td><td title="&amp;nbsp;" align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">Regu</td><td align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">02:03 PM</td><td align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">06:13 PM</td><td align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">4.17</td><td align="center" style="background-color:White;border-color:LightSteelBlue;font-size:11;">&nbsp;</td><td style="display:none;">&nbsp;</td>



I also get one when we click to add a new record. on the same line each time
<script src="/ScriptResource.axd?d=tZ3JCSii4EBM-tx4hEokGcwHyUFbgrEZpCEYoSnucLRv0DLLPSDb6MmRxoWKFcPU2nCcJPQ8jDw1&amp;t=633807354963077905" type="text/javascript"></script>

Any ideas as to what I should be looking for 
Thanks

Iana Tsolova
Telerik team
 answered on 18 Aug 2010
3 answers
113 views
I am using a RAD window control.

Only in IE 6, I can see this behavior. The first time  page loads ( after clearing cookies etc.,) when the lookup window icon is clicked, nothing happens. If we click on it again it works as expected. So, it is firing properly only after post back. Is there a way to avaoid this?

Upon debugging I find that the first time, "windowid" is returned null !.  

function OpenLookupWindow(filterSearchType, lookupType, hiddenLookupType, radwindowID, lookupWindowUrl) {
    hiddenLookupTypeVar = document.getElementById(hiddenLookupType);
#################################
    var oWin = $find(radwindowID);
##################################
    hiddenLookupTypeVar.value = lookupType;

    if (lookupType == "LEIdentifier") {
        url = lookupWindowUrl + "?LookupType=" + "LEIdentifier";
        if (null != filterSearchType) {
            url += "&SearchType=" + filterSearchType;
        }
    }  

    //oWin.set_navigateUrl(url);
    oWin.setUrl(url);
    //alert(url);
    oWin.show();
    //Commentd since it is not working on portal.
    //    if (null != filterSearchType && filterSearchType == "LookupSearch") {
    //        oWin.set_offsetElementID(100);
    //    }
}



-----------------------------------------

mark up.
<telerik:RadWindow ID="leIdentifierRadWindow" runat="server" InitialBehavio=None"
    OpenerElementID="<%# imgLEIdentifier.ClientID %>" Skin="NextGen" EnableEmbeddedBaseStylesheet="false"
    EnableEmbeddedSkins="false" Width="715px" ShowContentDuringLoad="false" VisibleStatusbar="false"
    ReloadOnShow="true" Behavior="Close,Reload" Modal="true" Title="<%$ CMBResources:CAS, com_lookup_LEIdentifier %>"
    OnClientShow="OnClientShowRadWin" OnClientClose="UpdateLETxtBoxValue">
</telerik:RadWindow>


Thank you,
Nkumar
Georgi Tunev
Telerik team
 answered on 18 Aug 2010
4 answers
128 views
Hi,
I am using the default layout ie.RadGrid1.MasterTableView.TableLayout = GridTableLayout.Auto; and the grid shows fine when I set 'RadGrid1.ItemStyle.Wrap = false;' (see Untitled1.png).
When I set 'RadGrid1.ClientSettings.Resizing.AllowColumnResize = true;' then I see the following problems (as in Untitled2.png):
 - The Auto sizing seems to switch off and all columns get the same default size
 - The wrap setting (off) only gets applied to every odd row

Also, I wanted to know how to limit the size of the column when 'AllowColumnResize = true'. ie. I want to set a maxwidth for the column.
Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 18 Aug 2010
1 answer
136 views
I have a radio button group with 2 radio buttons - the page defaults to the first one, and loads just fine.  If the user switches to the second one, I have a "RadGrid1.Rebind()" in the SelectedIndexChanged method.  My NeedDataSource is just calling the same stored procedure with different parameters.  The results come back from the stored procedure, but SOMETIMES the grid shows "No records to display".  My users are using a checkbox to "approve" orders (which results in a postback of the grid) - 1 radio button shows unapproved orders, 1 shows approved overs.  If they approve an order, then click the "show approved orders" radio button, that's when it sometimes displays and sometimes does not.  If I look in the database, or close the entire window and reopen it, the records show in the 2nd radio button.

I hope that makes sense, and I hope that someone can help.

Thanks!
Kristin
Mira
Telerik team
 answered on 18 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?