Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
326 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
241 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
399 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
110 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
4 answers
107 views
Hi all,

Can anyone tell me why the following javascript is not working?

        document.body.onload = function() {

            var txtDOB = document.getElementById("<%= txtDOB.ClientID %>");
            txtDOB.set_maxDate(new Date('2009/04/15'));

        }

The error I get is "Object doesn't support the property or method" on the set_maxDate line.


My aspx markup is

                    <telerik:RadDateInput ID="txtDOB" runat="server" DateFormat="dd/MM/yyyy">
                    </telerik:RadDateInput>

I am using Telerik Q2 2009 (2009.2.826.35)

Thanks
Daniel
Telerik team
 answered on 18 Nov 2009
12 answers
660 views
Hi
I have a RadListBox with some item selected. If I click on an item already selected, no event is fired server-side (selected index does not change but item do!!). How can I know what is the selected item?
Thanks for answering.

Claudio Falco
Schlurk
Top achievements
Rank 2
 answered on 18 Nov 2009
3 answers
175 views
Hi Telerik,
I've problems with sorting a xmldatasource in my Listbox. Is there something to mention?

Best regards,
Andreas
Simon
Telerik team
 answered on 18 Nov 2009
1 answer
221 views

Hi,

I've a radlistbox and I set the datasource:

 List<CMListItem> obCMListItem = new List<CMListItem>(); (where CMListItem is a class).

m_radListBox.DataSource = obCMListItem.

This obCMlistItem has ItemName,Itemdescription and Item code as 3 elements.

I need to set my datatextfield of the radlistbox by combining the 2 elements of the class( combining ItemName and Itemdescription).

If I try to do the below approach, I get an error:

            m_radInstitutionLstBox.DataTextField  = String.Format("{0},{1}", Properties.Resources.Ttl_Col_ItemName , Properties.Resources.Ttl_Col_ItemDescription);
            m_radInstitutionLstBox.DataValueField = Properties.Resources.Ttl_Col_ItemName;
            m_radInstitutionLstBox.DataSource     = obCMListItem;
            m_radInstitutionLstBox.DataBind();

How can i handle this situation. Pls help me with code in c#

Thanks,
ZR

Simon
Telerik team
 answered on 18 Nov 2009
1 answer
119 views
Hello

I'm trying to implement custom content provider for ImageManager used in RadEditor. I'm facing with some problems and also I've got some questions about its functionality. I'm using 2009 Q3 version of Telerik Controls.

Problem:

1) When I try to perform upload operation I always get an error message (displayed as a javascript-driven window) which says:
%filename% - Cannot write to the target folder! , where %filename% is a name of file which I try to upload. I have tried to debug it and found out that server method FileBrowserContentProvider.StoreFile does not get executed at all, e.g. breakpoint which I place at the beginning of it doesn't get hit.
I have already saw similar message here, but it was posted a while ago and somebody of Telerik support team answered that it was a bug of 2009 Q1 version and it would be fixed in further release.

Questions:
In general, I'm curious about how I may customize the appearance of ImageManager dialog:
1) Can I remove size column of folder browser?
2) Can I specify somehow which folders user is allowed to upload files into and which ones are read-only? For example, I want to disable uploading files into root folder, but to allow doing this with all subfolders of root one.
3) Can I disable renaming folders?
4) Can I disable deleting folders?

Disabling doing something also means for me hiding button or other control, which is used for doing this (delete button, upload button and so on)

Thanks in advance,
Vladimir.
Fiko
Telerik team
 answered on 18 Nov 2009
4 answers
412 views
I can' t find the get_checkedItems() method in the client side RadListBox object & the get_checked method in RadListBoxItem object.
The telerik library version i'm using is 2009.2.701.35.  Maybe they are in the Q2 sp1? Can someone answer? Thanks.
Simon
Telerik team
 answered on 18 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?