Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
345 views
I have a dynamically created rad text box.I want to create tool tip for this text box with a rad combo box or asp.net combox and the selected value should be inserted into the dynamically created rad text box.

Can we do this by using Rad ToolTip.
Svetlina Anati
Telerik team
 answered on 19 Mar 2011
8 answers
190 views
Hi,

How do you change the icon for the popup window?  

I know how to change it for normal windows but not the spellchecker window.

I'm assuming that some css will be needed?

Best Regards,

Jon
Svetlina Anati
Telerik team
 answered on 19 Mar 2011
13 answers
422 views
I am trying to implement the layout that is depicted in the attachment. The blue container has height/width 100% to fill available space. There are two columns. The left column has a fixed width and the right column is fluid. The left column contains a listbox and the right column contains a treview. I achieve the layout with a table. I am having difficulty getting the listbox and treeview to properly display their scrollbars when necessary.

Both the treeview and listbox contain items that should force a vertical scrollbar. The treeview should also force a horizontal scrollbar. Is there some style declaration I need to make in order for the scrollbars in these controls to appear?

Listbox Declaration:

<telerik:RadListBox ID="rlbBusinessCategories" 
                                        runat="server" 
                                        Skin="Office2007" 
                                        CheckBoxes="true" 
                                        Width="100%"
                                        Height="100%"
                    ></telerik:RadListBox>

Treeview Declaration:

<telerik:RadTreeView id="rtServices" 
                        runat="server" 
                        Skin="Office2007" 
                        Width="100%"
                        Height="100%"
                        AllowNodeEditing="False"
                        EnableDragAndDrop="False"
                        MultipleSelect="True"
                                                >
                    </telerik:RadTreeView>
Kamen Bundev
Telerik team
 answered on 19 Mar 2011
1 answer
159 views
Hello,

I'm trying to create a print friendly style sheet to make the rad scheduler appear fully on a printed page portrait or landscape.

I've had success creating custom rules for the Monthview.  At least in certain browsers.  Other than hiding elements I have this for MonthView:

   
<style type="text/css" media="print">
        div[style]
        {
            max-width: 670px;
        }
        div.rsOverflowExpand
        {
            width: 668px !important;
        }
        .rsHorizontalHeaderTable
        {
            width: 668px !important;
        }
         
        .rsHorizontalHeaderWrapper
        {
             
        }
        .rsHorizontalHeaderWrapper div
        {
        }
         
        .rsContentTable
        {
            width: 668px !important;
        }
         
        .rsAptContent
        {
            font-size: 9px !important;
        }
         
        .rsContent table
        {
            width: 668px !important;
        }
         
        .RadScheduler
        {
            width: 670px !important;
        }
    </style>


the first rule (div[style]) is overriding the inline style.  Scheduler inserts inline fixed pixel styles for many parts along the way.  This rule doesn't work in older browsers.

I'm having a great difficulty making a print friendly CSS rules for time-line view.

To make scheduler timerange all appear on a single page without scroll we are programmaticaly setting the column width to %.
private void SetWidth()
        {
            Double width = 100d / scheduler.TimelineView.NumberOfSlots;
            scheduler.ColumnWidth = new Unit(width, UnitType.Percentage);
        }


Part of the problem is the appointments have a fixed pixel width.

We have already implemented a hidden report viewer being populated and printed with a "print" button to get print-ability of our timeline views but direct from browser printing is preferred.  I would think it would be a high priority task for Telerik to provide print friendly CSS for all of their controls since printing is a commonly requested  feature.
Peter
Telerik team
 answered on 19 Mar 2011
2 answers
587 views
hi,
when i select the item from RadCombo at that time i want to change lable text.
i select a file in Radasyncupload then i change the another item from combo at that time the which was selected in radasyncupload it was lost after Radcombo's postback fired.
 
plz see my code for more information..
<div>
        <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" ClientEvents-OnRequestStart="conditionalPostback">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgInquiry">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgInquiry" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
            <script type="text/javascript">
        // <![CDATA[
                //On insert and update buttons click temporarily disables ajax to perform upload actions
                function conditionalPostback(sender, eventArgs) {
                    var theRegexp = new RegExp("\.UpdateButton$|\.PerformInsertButton$", "ig");
                    if (eventArgs.get_eventTarget().match(theRegexp)) {
                        var upload = $find(window['UploadId']);
 
                        //AJAX is disabled only if file is selected for upload
                        if (upload.getFileInputs()[0].value != "") {
                            eventArgs.set_enableAjax(false);
                        }
                    }
                }
 
                function validateRadUpload(source, e) {
                    e.IsValid = false;
 
                    var upload = $find(source.parentNode.getElementsByTagName('div')[0].id);
                    var inputs = upload.getFileInputs();
                    for (var i = 0; i < inputs.length; i++) {
                        //check for empty string or invalid extension
                        if (inputs[i].value != " " && upload.isExtensionValid(inputs[i].value)) {
                            e.IsValid = true;
                            break;
                        }
                    }
                }
            // ]]>
            </script>
        </telerik:RadCodeBlock>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" />
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="True"
            AllowPaging="True" PageSize="10" GridLines="None" OnUpdateCommand="rgInquiry_ItemUpdated"
            OnItemCommand="rgInquiry_ItemCommand" OnDeleteCommand="rgInquiry_ItemDeleted"
            OnCancelCommand="rgInquiry_CancelCommand" OnInsertCommand="rgInquiry_ItemInserted"
            AllowFilteringByColumn="true" OnNeedDataSource="rgInquiry_NeedDataSource" OnItemDataBound="rgInquiry_ItemDataBound"
            OnItemCreated="rgInquiry_ItemCreated">
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="InquiryID" AllowMultiColumnSorting="True"
                GroupLoadMode="Server" CommandItemSettings-AddNewRecordText="Add New Inquiry">
                <Columns>
                </Columns>
                <EditFormSettings ColumnNumber="2" CaptionFormatString="Add/Edit properties of Inquiry : "
                    EditFormType="Template">
                    <FormTemplate>
                        <div>
                            <telerik:RadComboBox ID="rcbClientNew" runat="server" Width="300px" EmptyMessage="Select Client"
                                DataTextField="ClientID" Filter="Contains" AllowCustomText="true" AutoPostBack="true"
                                OnSelectedIndexChanged="rcbClient_SelectIndexChanged" CausesValidation="false">
                            </telerik:RadComboBox>
                            <asp:Label ID="lblClientName" SkinID="LabelU" runat="server">
                                <br />
                                <asp:Label ID="Label1" SkinID="LabelU" runat="server" Text="Attach File: "> </asp:Label>
                                <telerik:RadProgressManager ID="radProgreesManager1" runat="server" EnableTheming="true" />
                                <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic">
                                </telerik:RadAsyncUpload>
                                <telerik:RadProgressArea ID="radProgressArea1" runat="server" EnableTheming="true">
                                </telerik:RadProgressArea>
                                <br />
                                <div class="DynButton">
                                    <asp:Button ID="btnParentSubmit" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                        CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
                                </div>
                                <div class="DynButton">
                                    <asp:Button ID="btnPatentReset" runat="server" Text="Cancel" CausesValidation="false"
                                        CommandName="Cancel" />
                                </div>
                        </div>
                    </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
    </div>

Thanks,
Jayesh Goyani
Jayesh Goyani
Top achievements
Rank 2
 answered on 19 Mar 2011
3 answers
156 views
Hi.

I´m trying to export a grid in the ExcelML format but the columns are generated dynamically and the DataFormatString is set dynamically too.

I can´t use the ExcelMLExportStylesCreated because in this moment I don´t know which format is the column.

Have RadGrid some method to set the excel export format during the column create? For example, I need to show a column in a specific date format!

Thanks.
Daniel
Telerik team
 answered on 19 Mar 2011
9 answers
202 views

We are using Version 2010.3.121735 of the RAD Controls. According to “What's New in RadScheduler for ASP.NET AJAX Q1  SP2 â€œ there is get_height / set_height property available.

What's New in RadScheduler for ASP.NET AJAX Q1  SP2 2009 (Version Number 2009.1.527) 

  • Implemented support for custom appointment classes
  • Implemented ResourceCollection.getResourceByType
  • Implemented ResourceStyles support when using web service data binding
  • New client-side property: get_height / set_height
  • New property: WebServiceAppointmentController.AppointmentFactory; Allows you to work with custom appointment classes when using web service data binding
  • New client-side appointment property: cssClass; Sets the appointment CSS class
  • The web service methods can now return additional information alongside the appointments 

 

However, it only seems to work in IE and not other browse; which is a must have for our web application. The following code shows that the change occurs in IE, but not other browsers.

var splitter = $find("<%= RadSplitter1.ClientID %>");                  

var scheduler = $find("<%=RadScheduler1.ClientID%>");

alert("splitter.get_height = " + splitter.get_height());

scheduler.set_height(splitter.get_height());

alert("scheduler.get_height = " + scheduler.get_height())


In IE the alert displays the correct value; however in other browsers it displays a value that was set by the height attribute of the scheduler .


<telerik:RadScheduler runat="server" ID="RadScheduler1" Height="425px" …


How do we dynamically set the height client-side on all browsers?

 

Thanks in advance,

Keith E.

Peter
Telerik team
 answered on 19 Mar 2011
5 answers
324 views

 

In the Telerik Recurrence Editor control I want to hide "No End Date" while leaving "End After" and "End By".  I can't allow my clients the ability to make recurring reservations with no end date.

I was able to hide the option button by finding the id of the control but there is no id for the label of that option button.  So, I can hide the radio button but not the label for it.

Can anyone provide some code for this?

One work around would be to validate that the No End Date option is not selected after post back but I'd rather not do that.

Thanks,
Rob

 

 



 



Peter
Telerik team
 answered on 19 Mar 2011
1 answer
103 views
Hello,

I'm currently putting results of a Web Service call, into an ArrayList and binding successfully (columns auto generated). During binding I hide certain columns and the next step is to start formatting. I've looked through numerous articles on using OnColumnCreated/Creating, PreRender, and whatever I do to change the DataFormatString and DataType doesn't work when sorting. I'm trying to format the Amount column as System.Decimal, format as currency and sort but it is still sorting as a string (the native type in ArrayList).

EDIT: Over the course of a day I've done better troubleshooting and found that I expected the grid to convert values to the specific DataType. In my case, all JSON deserialized types were System.String. I now convert from IList to DataTable and change the DataType of the Amount column before populated. This works and sorts correctly now. Hope that helps someone.
Veli
Telerik team
 answered on 19 Mar 2011
3 answers
114 views
I am attempting to use a checkbox in a grid. I know there are many posts on this tompic but I just can't seem to get the checked values to work for me.

Here is my code:

   Protected Sub btn_ModifyPerms_Click(sender As Object, e As System.EventArgs)
  
        For Each grdItem As GridDataItem In rgd_TaskPermissions.Items
            Dim cbx_Select As CheckBox = DirectCast(grdItem.FindControl("cbx_Select"), CheckBox)
            'Do Something   
            If cbx_Select.Checked = False Then
                Session("PermSelect") = 0
            Else
                Session("PermSelect") = 1
            End If
  
            Dim DatabaseName As String = Session("DBName")
            Dim Table As String = Session("Table")
            Dim TaskRole As String = Session("TaskRole")
  
            Dim connectionString = New SqlConnection("server=DO-IT-AB\MSSQLAB;database=AeriesAdmin;UID=itc.sysadmin;PWD=m1s.@dm1n6;")
            Dim command = New SqlCommand("aa_task_table_permissions_select", connectionString)
  
            command.CommandType = CommandType.StoredProcedure
  
            command.Parameters.Add("@dbname", SqlDbType.VarChar).Value = DatabaseName
            command.Parameters.Add("@Table", SqlDbType.VarChar).Value = Table
            command.Parameters.Add("@TaskRole", SqlDbType.VarChar).Value = Session("TaskRole")
            command.Parameters.Add("@PermSelect", SqlDbType.Int).Value = Session("PermSelect")
  
            command.Connection.Open()
            command.ExecuteNonQuery()
            command.Connection.Close()
  
  
  
        Next
  
End Sub


The goal is for me to pass either a 1 or a 0 to a SQL Stored Procedure. I just can't seem to pass the correct parameter. I am not set on using a Session Variable. Any way I can get the 0 or the 1 to the @PermSelect variable is good by me.
Martin
Telerik team
 answered on 19 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?