Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
89 views
I'm using a SQL Datasource for my treeview in a master page.  I would like to know how to maintain the selected state after postback?  Is it possible to define this by the datsource primary key (TreeView - DataFieldID) of the selected item?
Ryan
Top achievements
Rank 1
 answered on 18 Nov 2009
3 answers
148 views

Hi ,

 

I have a pie chart containing large amount of data, thus when the chart is rendered the labels overlap each other (see attached image). So, how can I show label of pie slice so it appears readable ? Is there any way to provide line connectors from pie slice to Labels…or may be something similar to this?

 
The project is being developed in asp.net 3.5 with C# as scripting language.

 

Your quick response will be appreciated.

Schlurk
Top achievements
Rank 2
 answered on 18 Nov 2009
0 answers
142 views
It was not clear to me, but apparently the "UploadPaths" and "DeletePaths" must be directories under the "ViewPaths" directory.  I could not get the other two directories to display until I made the "ViewPaths" directory the parent of the other two.

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

 

 

 

'/==> Directory structure (?)

 

 

'/==>~/App_Files/

 

 

'/==>~/App_Files/App_Views/

 

 

'/==>~/App_Files/App_Uploads/

 

 

'/==>~/App_Files/App_Deletes/

 

 

Dim sPath1 As String = "~/App_Files/" '/==>Parent directory (Views)

 

 

Dim sPath2 As String = "~/App_Files/App_Uploads/" '/==>Child of Parent (Uploads)

 

 

Dim sPath3 As String = "~/App_Files/App_Deletes/" '/==>Child of Parent (Deletes)

 

 

 

Dim saViewPaths As String() = New String() {sPath1}

 

 

Dim saUploadPaths As String() = New String() {sPath2} '/==>or {sPath2, sPath3}

 

 

Dim saDeletePaths As String() = New String() {sPath3} '/==>or {sPath2, sPath3}

 

 

rfe1.Configuration.ViewPaths = saViewPaths

rfe1.Configuration.UploadPaths = saUploadPaths

rfe1.Configuration.DeletePaths = saDeletePaths

rfe1.Configuration.SearchPatterns =

New String() {"*.*", "*.JPG"}

 

 

rfe1.Grid.Columns(1).HeaderStyle.CssClass =

"sizeColumn"

 

 

 

End Sub

 

Maybe, it will save someone else a little time.

Joe

 

 

 

 

sys1jal
Top achievements
Rank 1
 asked on 18 Nov 2009
0 answers
104 views
I am trying to add the Rad Spell check to a RadTextBox.  I followed the instructions carefully and have succes IF I create a page with just the javascript SpellcheckDone function and the RadTextBox and the RadSpell.  If, however, I add this code to an existing page, it will build with no errors; but when I try to bring up the page with the spell check javascript function on it, I get the following error:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +8668018
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +214

[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +279
   Telerik.Web.UI.RadAjaxControl.PerformRender() +502
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1849
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +158
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

Nevermind ... I finally figured out that the RadCodeBlock could go around the <script></script> code; and then it works without errors.

 

 

 

Nancy Moore
Top achievements
Rank 1
 asked on 18 Nov 2009
2 answers
172 views
Hello,

I have 2 comboboxes with the same skin, height, and other attributes.
 ComboBox 1 : on page 1, inside a radwindow
 ComboBox 2 : on page 2, on a normal page

ComboBox 1's items spill out of the drop down, and there is no scrollbar.
ComboBox 2 works fine.

At first I thought it might be something to do with the radwindow, but when I opened that page (page 1) in just a browser window, the problem's still there.

Page 1 and page 2 are quite different however... May I know what possible causes are for this issue so I can track it down?

Screenshot attached.

PS:
Came across this upgrading from Q3 2008 to Q3 2009... This is not a problem with Q3 2008 on IE8
This is not a problem on IE7 or Firefox.. Haven't confirmed on other browsers yet
 

Thanks!
~xh
Xhrei
Top achievements
Rank 1
 answered on 18 Nov 2009
4 answers
127 views
Hi,

I have a RadGrid that I am manually controlling data for using the NeedDataSource event.  Everything has been working fine, until I added a RadComboBox outside of the grid which allows the user to select a value for filtering the grid.  I'm calling Rebind() to re-query my data, and it's calling NeedDataSource correctly.  I query my data, bring back new values based on the filter, and assign it to the DataSource property of the grid.  However the grid display never updates so the user is left seeing the records from before the filtering.

Any ideas?

Thanks,
Neil.
Neil Mercer
Top achievements
Rank 1
 answered on 18 Nov 2009
0 answers
315 views
Masterpage has a header, sidebar for navigation and the remainder contains a div that hosts the contentplaceholder. Usercontrols are loaded into the contentplaceholder when the user selects items in a list displayed on the left sidebar area.

    <div id="content" class="content" runat="server" > 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
        </asp:ContentPlaceHolder> 
    </div><!-- end content -->     
 

The style for this div is as follows:
.content {  
    display:block;  
    font-family: Arial, Helvetica, sans-serif;  
    font-size: small;  
    background-color: #FFFFFF;  
    left: 218px;  
    top: 85px;  
    text-align: justify;  
    position: fixed;  
    margin: 85px,218px,0,0;  
    overflow: auto;  
    height: 100%;  
}  
 

The style for the header:
.header {  
    display:block;  
    top:0px;  
    left:0;  
    position:fixed;  
    text-align:left;  
    background:#00453D url(logo.gif) no-repeat fixed 0px 5px;  
    height: 85px;  
    vertical-align: bottom;  
    padding: 0px;  
    visibility: visible;  
    border-bottom: 10px solid #FDDEA9;  
    z-index: 1;  
    width: 100%;  
}  
 

Everything works EXCEPT - the scrollbar for the div/contentplaceholder does not appear for the first 85px (the height of the header).
If I remove the .top value for .contentplaceholder, the scrollbar appears correctly, but of course the first 85px of the usercontrol loaded within the Contentplaceholder is clipped.

I've tried numerous different CSS settings w/out success (and a few of the above do not seem to have an impact).
If anyone has suggestions or even links to articles on CSS usage that might cover this, it would be appreciated.
topry
Top achievements
Rank 1
 asked on 18 Nov 2009
2 answers
233 views
Hi Experts,

Could you please help us on setting the RadDatePicker Control value on Request.QueryString.

I am invoking an aspx page on a button click from user control and the datapicker control resides in usercontrol. and this datapicker control value should be set from the aspx page invoked.

Thanks in advance.
Deva Kumar
Top achievements
Rank 1
 answered on 18 Nov 2009
2 answers
392 views

I am trying to use the Insert Command to save while using a custom Template form.  I copied the code from a sample, but I cannot get it to work.  Here is a copy of my code.

aspx page

       <telerik:RadGrid ID="rgEntityFinancials" runat="server" AutoGenerateColumns="False" 
            GridLines="None" Skin="Web20" Width="320px">  
            <AlternatingItemStyle BackColor="LemonChiffon" /> 
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" NoMasterRecordsText="No financials available.">  
                <NoRecordsTemplate> 
                    <strong><span style="font-size: 14pt; background-color: #ff0033">No Financials!</span></strong>  
                </NoRecordsTemplate> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="TaxYear" HeaderText="Tax Year" SortExpression="TaxYear" 
                        UniqueName="TaxYear">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="StatementDescr" HeaderText="Stmt Type" SortExpression="StatementDescr" 
                        UniqueName="StatementDescr">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="DateReceived" DataFormatString="{0:d}" HeaderText="Date Received" 
                        SortExpression="DateReceived" UniqueName="DateReceived">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridEditCommandColumn> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn DataField="StatementType" HeaderText="StatementType" UniqueName="StatementType" 
                        Visible="False">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="True" UniqueName="ID">  
                    </telerik:GridBoundColumn> 
                </Columns> 
                <EditFormSettings EditFormType="Template">  
                    <EditColumn UniqueName="EditCommandColumn1">  
                    </EditColumn> 
                    <FormTemplate> 
                        <table> 
                            <tr> 
                                <td style="width: 100px">  
                                    </td> 
                                <td style="width: 403px">  
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="width: 100px">  
                                    <asp:Label ID="Label5" runat="server" Text="Tax Year" Width="80px"></asp:Label></td>  
                                <td style="width: 403px">  
                                    <asp:TextBox ID="TaxYear" runat="server" Text='<%# eval("taxyear") %>'></asp:TextBox> 
                                    <%--                                            <telerik:RadTextBox ID="rtxtTaxYear" runat="server" InvalidStyleDuration="100" Text='<%# Eval("TaxYear") %>' 
                                                Width="125px" Skin="Vista">  
                                            </telerik:RadTextBox>--%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="width: 100px; height: 42px">  
                                    <asp:Label ID="Label6" runat="server" Text="Statement Type" Width="128px"></asp:Label></td>  
                                <td style="width: 403px; height: 42px">  
<%--                                    <telerik:RadComboBox ID="rcbStatementType" runat="server" DataSourceID="sqlStmtTypes" 
                                        DataTextField="StatementDescr" DataValueField="StatementType" Font-Names="Arial" 
                                        SelectedValue='<%# Eval("StatementType") %>' Skin="WebBlue">  
                                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                    </telerik:RadComboBox>--%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="width: 100px; height: 44px">  
                                    <asp:Label ID="Label7" runat="server" Text="Date Received" Width="128px"></asp:Label></td>  
                                <td style="width: 403px; height: 44px">  
<%--                                    <telerik:RadDatePicker ID="rdpDateReceived" runat="server" Culture="English (United States)" 
                                        dbselecteddate='<%# Eval("DateReceived") %>' Skin="WebBlue">  
                                        <DateInput InvalidStyleDuration="100" LabelCssClass="radLabelCss_WebBlue" Skin="WebBlue">  
                                        </DateInput> 
                                        <Calendar Skin="WebBlue">  
                                        </Calendar> 
                                    </telerik:RadDatePicker>--%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="width: 100px">  
                                    <asp:LinkButton ID="btnUpdate" runat="server" CommandName='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "PerformInsert", "Update") %>' 
                                        Text='<%# IIf( DataBinder.Eval(Container, "OwnerTableView.IsItemInserted"), "Insert", "Update") %>'>  
                                            </asp:LinkButton> 
                                </td> 
                                <td style="width: 403px">  
                                    <asp:LinkButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel" 
                                        Text="Cancel"></asp:LinkButton> 
                                </td> 
                            </tr> 
                        </table> 
                    </FormTemplate> 
                </EditFormSettings> 
            </MasterTableView> 
            <HeaderStyle ForeColor="White" /> 
            <ClientSettings EnableRowHoverStyle="True">  
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
 code behing apsx.vb file
    Public ReadOnly Property EntityFinancials() As DataTable  
        Get  
            Dim obj As Object = Me.Session("EntFinancials")  
            If (Not obj Is Nothing) Then  
                Return CType(obj, DataTable)  
            End If  
            Dim myDataTable As DataTable = New DataTable("EntityFinancials")  
            Dim row1 As DataRow  
            Try  
                Dim ID As DataColumn = New DataColumn("ID")  
                ID.DataType = System.Type.GetType("System.String")  
                myDataTable.Columns.Add(ID)  
                Dim portfolio As DataColumn = New DataColumn("Portfolio")  
                portfolio.DataType = System.Type.GetType("System.String")  
                myDataTable.Columns.Add(portfolio)  
                Dim taxYear As DataColumn = New DataColumn("TaxYear")  
                taxYear.DataType = System.Type.GetType("System.String")  
                myDataTable.Columns.Add(taxYear)  
                Dim stmtType As DataColumn = New DataColumn("stmtType")  
                stmtType.DataType = System.Type.GetType("System.String")  
                myDataTable.Columns.Add(stmtType)  
                Dim dateRcvd As DataColumn = New DataColumn("dateRcvd")  
                dateRcvd.DataType = System.Type.GetType("System.String")  
                myDataTable.Columns.Add(dateRcvd)  
                row1 = myDataTable.NewRow  
                row1.Item("ID") = 1  
                row1.Item("portfolio") = "616"  
                row1.Item("taxyear") = "2008"  
                row1.Item("stmttype") = "tr"  
                row1.Item("datercvd") = "04/15/2009"  
 
                myDataTable.Rows.Add(row1)  
 
            Catch ex As Exception  
                Me.lblMessage.Text = ex.Message  
            End Try  
            Me.Session("EntFinancials") = myDataTable  
            Return myDataTable  
        End Get  
    End Property  
 
    Protected Sub rgEntityFinancials_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rgEntityFinancials.NeedDataSource  
        MeMe.rgEntityFinancials.DataSource = Me.EntityFinancials  
        Me.EntityFinancials.PrimaryKey = New DataColumn() {Me.EntityFinancials.Columns("ID")}  
    End Sub  
 
    Protected Sub rgEntityFinancials_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgEntityFinancials.InsertCommand  
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)  
        Dim userControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)  
 
        'Prepare new row to add it in the DataSource  
        Dim newRow As DataRow = Me.EntityFinancials.NewRow  
 
        'Insert new values  
        Dim newValues As Hashtable = New Hashtable  
 
        newValues("Portfolio") = Me.rtxtPortfolio.Text  
        newValues("taxyear") = CType(userControl.FindControl("taxyear"), TextBox).Text  
        'make sure that unique primary key value is generated for the inserted row   
        newValues("ID") = (CType(Me.EntityFinancials.Rows((Me.EntityFinancials.Rows.Count - 1))("ID"), Integer) + 1)  
        Try  
            For Each entry As DictionaryEntry In newValues  
                newRow(CType(entry.Key, String)) = entry.Value  
            Next  
            Me.EntityFinancials.Rows.Add(newRow)  
            Me.EntityFinancials.AcceptChanges()  
        Catch ex As Exception  
            Me.rgEntityFinancials.Controls.Add(New LiteralControl(("Unable to update/insert Financials. Reason: " + ex.Message)))  
            e.Canceled = True 
        End Try  
    End Sub 
  The problem is with the FindControl stmt.  I need help getting the values from my template in order to save the records to the database.  Any help will be greatly appreciated!
Julia Helton
Top achievements
Rank 1
 answered on 18 Nov 2009
1 answer
107 views
Hi,

I am using Radgrid, Radajaxmanager and Radscriptmanager in my application.

while clicking on the linkbutton i am getting this error "sys.webforms.pagerequestmanagerparsererrorexception"

what is this error. how to solve this?

pls give me solution.

thanks,
mano
Daniel
Telerik team
 answered on 18 Nov 2009
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?