Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
138 views
Hi,

I have a custom style listed in Editor Apply CSS Class dropdown, and it works perfect when i apply styles both in DESIGN and HTML view of the Editor. The only issue is that all our styles are in "Title" case and the Design View of the editor is displaying the styles irrespective of the css class "case sensistive". In short , the DESIGN view is not case sensitive for css class applied for it. This is making a problem when I display in browser because browser is case sensitive for css classes.

Can any one help me to apply "Case sensitive" for the Design view of the editor.

The below class works in editor DESIGN view for both "class = caption" and "class=Caption". But the browser doesn't.
.Caption {
    color: #999999;
    font-family: Arial;
    font-size: 9pt;
    font-style: italic;
}

Thanks,
Akila.
Akila Kumarasamy
Top achievements
Rank 1
 answered on 29 Apr 2011
0 answers
60 views
Hi,

I'm using 2011.1.413.40, I have a Grid and following editing settings:

<EditFormSettings UserControlName="~/Web/Administative/Companies and users/Companies view/NewCompanyWizard.ascx" EditFormType="WebUserControl" PopUpSettings-Modal="true"></EditFormSettings>

problem was that when Grid was in edit/insert mode and overlay was loaded (GridModal_skinName) I could see both scrollbars in browser, which is IE9 (haven't tested other modes or browsers). The size of overlay was bigger than required.

I ended up with following solution (uses jQuery):
add this to your scripts.js file

function customResizeModalBackground() {
    var d = String.format("modalDivId_{0}", this.get_id());
    var b = $get(d);
    if (b) {
        b.style.width = $(window).width();
        b.style.height = $(window).height();
    }
}
  
var popUp;
function PopUpShowing(sender, eventArgs) {
    popUp = eventArgs.get_popUp();
    var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
    popUp.style.left = (Math.round(($(window).width() - popUpWidth) / 2 + sender.get_element().offsetLeft)).toString() + "px";
    popUp.style.top = $('#' + sender.ClientID).position().top + "px";
  
    sender.resizeModalBackground = customResizeModalBackground;
}

and tell the Grid to call this function when popup is loaded:

<ClientEvents OnPopUpShowing="PopUpShowing" />

you will get centered popup without scrollbars (checked in IE9, Safari, FF4, Chrome)
what we basically do is override native resizing method with custom one that uses jQuery to provide proper width and height

Enjoy! :)
Shukhrat Nekbaev
Top achievements
Rank 1
 asked on 29 Apr 2011
4 answers
101 views
Hi All

I have a RadGrid as follows:

<telerik:RadGrid ID="trgStudAttend" runat="server" AllowSorting="True" 
    AutoGenerateColumns="False" GridLines="None" Skin="Windows7" 
    CellSpacing="0" AllowMultiRowEdit="True">
    <ClientSettings EnableRowHoverStyle="true" />
    <MasterTableView DataKeyNames="atdID" EditMode="InPlace">
        <Columns>
            <telerik:GridBoundColumn DataField="atdID" HeaderText="ID" Visible="false" 
                UniqueName="atdID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="studDisplayName" HeaderText="Name"
                UniqueName="studDisplayName" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridDropDownColumn DataSourceID="sdsTimeOfDayCodes" HeaderText="Time of Day" 
                ListTextField="comb" ListValueField="todcCode" UniqueName="todcCode" DataField="atdTimeOfDayCode">
            </telerik:GridDropDownColumn>
            <telerik:GridDropDownColumn DataSourceID="sdsReasonCodes" HeaderText="Reason" 
                ListTextField="comb" ListValueField="rfacCode" UniqueName="rfacCode" DataField="atdReasonCode">
            </telerik:GridDropDownColumn>
            <telerik:GridBoundColumn DataField="atdComment" HeaderText="Comment"
                UniqueName="atdComment">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

At post back, every item is in edit mode.

I also have a button on my page (trbSave). When clicked, I want to loop through each row in my RadGrid, and determine what the selected value is for my drop down columns. I am trying this so far without any luck:

' Declarations
Dim sqlString As String = ""
Dim sqlCom As SqlCommand
Dim todcDDL As RadComboBox
' Loop through each student in the radgrid, and save the selected values to the details database
For Each i As GridDataItem In trgStudAttend.EditItems
    todcDDL = i.FindControl("todcCode")
Next

i.FindControl("todcCode") always returns 'nothing'. Does anyone know how I can reference that drop downlist and get its currently selected value?

Shane
Elliott
Top achievements
Rank 2
 answered on 29 Apr 2011
4 answers
151 views
Hi,

We are using the RadEditor on our sharepoint portal.

When the user tries to add a word to the dictionary a pop-up appears with the following error message: "Spell Checker Handler  Server Error: 403 FORBIDDEN".

I presume that adding a word to the dictionary updates one of the *.tdf file. Is there specific security settings to be assigned to those files ?
Rumen
Telerik team
 answered on 29 Apr 2011
3 answers
44 views
Does the ASP.Net Ajax grid have options for data binding like the grid in MVC? If not, is it to be expected in an upcoming release?

With the grid in MVC, you have the option of doing the following types of binding:
  • Server
  • Ajax/JSON
  • Web Services 
Mira
Telerik team
 answered on 29 Apr 2011
8 answers
183 views
How Can I Change The popup Designed Manually .
mohamed
Top achievements
Rank 1
 answered on 29 Apr 2011
3 answers
163 views
Hi -

I have a page with two RadGrids. Each grid has drag and drop enabled. I use the row-drag capability to re-order items within each grid. The RowDrop event is used on the server side to re-order. It works great.  However, I dont want to be able to drag a row from one grid onto the other grid. Is there a way to prevent draging rows from one grid and dropping them on the other on the client?  If not, is there a way to determine what the "source" grid was in the RowDrop event on the server. The GridDragDropEventArgs class has a DestinationGrid property in it but no SourceGrid property. Is there a way to determine the source grid so I can just ignore any drops from other grids?

Thanks for your help... Russ
Sameers
Top achievements
Rank 1
 answered on 29 Apr 2011
1 answer
64 views
Hi, we're using RenderSelectedPageOnly and AutoPostback to load on demand several page views. But now every time we change the selected tab an AJAX request is made (because of the AutoPostback), even though the tab had already been loaded.

We would like to load on demand the selected tab only if it's the first time the user selects that tab. Otherwise the tab change should behave without the AJAX request, just like it would with RenderSelectedPageOnly=false

Is there a way to achieve this behavior?

Best regards,
Santiago.
Cori
Top achievements
Rank 2
 answered on 29 Apr 2011
7 answers
132 views
Hi,

is it possible to create the context menus dynamically in the client side? And further more is it possible to created them based on some appointment properties? 

I'm looking the documentation but it doesn't say anything regarding that.

regards,

jose
Veronica
Telerik team
 answered on 29 Apr 2011
4 answers
77 views
Hi,

I am using the Radfilter in my vb.net(2008) project.I am using the RadTreeview as the radcomboboxItem in the datafield editor.I mange to build the control dynamically.But when I add new rows for the filter,previously selected value is set to empty.

Please help on this issue..
Public Overrides Sub InitializeEditor(ByVal container As System.Web.UI.Control)
        _combo = New RadComboBox()
        _combo.ID = "MyCombo"
        _combo.Width = 200
        _combo.Height = 180
  
  
        'For the Treeview
        Dim treeItem As New ItemTemplateTreeView(CreateDataSource())
        _combo.ItemTemplate = treeItem
        Dim item As New RadComboBoxItem()
        _combo.Items.Add(item)
        _combo.OnClientDropDownOpened = "OnClientDropDownOpenedHandler"
               container.Controls.Add(_combo)
  
    End Sub
  
  
Public Overrides Function ExtractValues() As System.Collections.ArrayList
        Dim list As ArrayList = New ArrayList()
        list.Add(DirectCast(_combo.Items(0).FindControl("myTreeview"), RadTreeView).SelectedValue)
        Return list
    End Function
  
Public Overrides Sub SetEditorValues(ByVal values As System.Collections.ArrayList)
          
        If Not values Is Nothing And values.Count > 0 Then
            If values(0) Is Nothing Then
                Return
            End If
            'Dim item As RadComboBoxItem = _combo.FindItemByValue(values(0).ToString())
            Dim item As RadTreeNode = DirectCast(_combo.Items(0).FindControl("myTreeview"), RadTreeView).FindNodeByValue(values(0).ToString())
            'If Not item Is Nothing Then
                item.Selected = True
                _combo.Items(0).Text = item.Text
            '   _combo.Items(0).Value = item.Value
            End If
             
        End If
    End Sub
  
Protected Function CreateDataSource() As DataTable
        Dim dataTable As New DataTable()
        dataTable.Columns.Add(New DataColumn("Key", GetType(String)))
        dataTable.Columns.Add(New DataColumn("Name", GetType(String)))
        dataTable.Columns.Add(New DataColumn("ParentId", GetType(String)))
  
        Dim AnalysItems As AnalysListItemList = TryCast(DataSource, AnalysListItemList )
  
        For Each item As CategoryValueListItem In AnalysItems
            Dim dr As DataRow = dataTable.NewRow()
            dr("Key") = item.Key
            dr("Name") = item.Name
            If item.Category = item.Key Then
                dr("ParentId") = DBNull.Value
            Else
                dr("ParentId") = item.Category            End If
            dataTable.Rows.Add(dr)
        Next
        Return dataTable
    End Function
  
Public Class ItemTemplateTreeView
    Implements ITemplate
  
    Private dataTable As DataTable
    Public Sub New(ByVal _dataTable As DataTable)
        '
        ' TODO: Add constructor logic here
        '
        Me.dataTable = _dataTable
    End Sub
    Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
        Dim div As New HtmlGenericControl("div")
        div.ID = "div1"
        div.Attributes.Add("onclick", "StopPropagation(event);")
  
        Dim tree As New RadTreeView()
        Dim item As RadComboBoxItem = DirectCast(container, RadComboBoxItem)
  
        tree.ID = "myTreeView"
        tree.OnClientNodeClicking = "nodeClicking"
        tree.DataTextField = "Name"
        tree.DataFieldID = "Key"
        tree.DataValueField = "Key"
        tree.DataFieldParentID = "ParentId"
        tree.DataSource = dataTable
        tree.DataBind()
  
        div.Controls.Add(tree)
        container.Controls.Add(div)
  
  
    End Sub
  
End Class
Radoslav
Telerik team
 answered on 29 Apr 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?