Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
124 views
Consider the following design: 

  Page "X"  has many user controls
user control UA has a modal rad window displayed when Show() is called
user control UB has a modal rad window displayed when Show() is called

user control UX & UY can request X to display the modal rad window of UA. 

Steps: (4 screen shots are attached)
  1. Page X is displayed.
  2. User is editing the data on UX. UX requests X to display the UI of UA modal rad window.  (Step 1: Add button
  3. UA is displayed i.e. the modal rad Window with controls is displayed. (Step 2: UA is displayed correctly)
  4. While user is editing the data in UA, UB is invoked by the actions. But the UB which should have been on top of UA is not displayed correctly. even though the functionality is fine. (Step 3: UB is displayed but incorrectly)
  5. When the title bar of UB is clicked the UI of UB is displayed correctly. (Step 4: after clicking the title bar of UB, prob solved)

Question: 
 How to make the modal rad window of UB displayed correctly?
Marin Bratanov
Telerik team
 answered on 10 Oct 2013
0 answers
77 views
resolved
Kranthi
Top achievements
Rank 1
 asked on 10 Oct 2013
3 answers
308 views
I would like to have the arrow that shows up when a column is sorted to always show up.  That way people will know that they can click on the header and sort the column.  I have looked at a bunch of posts, but what happens is a sort image arrow shows on the last column I define, not all of them.  one of the posts I looked at

Thanks, Amy
Renee
Top achievements
Rank 1
 answered on 10 Oct 2013
4 answers
156 views
I have a question that I am sure has been asked. 

I inherited am asp.net web application using manu of the Telerik controls.  We use a master page and I just noticed (after nearly 3 years) that there were radajaxpanels embedded in the master page.  All of our pages/controls use the RadAjaxManager (which is also defined on the master page) along with the RadAjaxManagerProxy on all pages.

I have removed the two radajaxpanels and I don't see any adverse impact on the application.  Is there anything I should be looking for because I removed the Panels?  Also, will it make a difference in performance?  It seemed like the proxy was working since we use a radajaxloading panel and it seems to show up on the appropriate controls when I specify them in the proxy.  I am wondering if it was really posting back the whole page even though it looked like it was the area I defined in the proxy.

Thanks.

Jim Van Dick
Maria Ilieva
Telerik team
 answered on 10 Oct 2013
9 answers
176 views
var selected = {};
function dgGrid_RowSelected(sender, args) {
    var cpayID = args.getDataKeyValue("ID");
    if (!selected[cpayID]) {
        selected[cpayID] = true;
    }
}
 
function dgGrid_RowDeselected(sender, args) {
    var cpayID = args.getDataKeyValue("ID");
    if (selected[cpayID]) {
        selected[cpayID] = false;
    }
}
 
function dgGrid_RowCreated(sender, args) {
    var cpayID = args.getDataKeyValue("ID");
    if (selected[cpayID]) {
        args.get_gridDataItem().set_selected(true);
    }
}
 
function dgGrid_Created(sender, eventArgs) {
    var masterTable = sender.get_masterTableView(),
        headerCheckBox = $telerik.$(masterTable.HeaderRow).find(":checkbox")[0];
 
    if (headerCheckBox) {
        headerCheckBox.checked = masterTable.get_selectedItems().length == masterTable.get_pageSize();
    }
}
I am using the above code to update the selections made across pages.   When I turn on sorting, and check just the first row, and then sort, when the grid refreshes, the single row is checked, but also the select all checkbox at the top is checked.
Peter
Top achievements
Rank 1
 answered on 10 Oct 2013
2 answers
346 views
I have enabled the GridCheckBoxColumn's checkboxes during the ItemDataBound event.  Thus the client can click the (otherwise disabled) checkboxes.  Although I have set the AutoPostBack=true and added a handler for the CheckedChanged event I receive no postback.
Please advice (v2013.2.717.35).

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"  Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <telerik:RadGrid ID="RadGrid1" Width="300px" AllowPaging="True" PageSize="10"
            runat="server" AllowSorting="true" GridLines="None" AutoGenerateColumns = "False"
            AllowMultiRowSelection="True">
            <ClientSettings ColumnsReorderMethod="Reorder" EnablePostBackOnRowClick="true">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView Width="100%" EditMode="InPlace">
                <RowIndicatorColumn Visible="False"> </RowIndicatorColumn>
                <ExpandCollapseColumn Created="True"> </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridCheckBoxColumn HeaderText="Select" DataField="IsSelected" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn HeaderText="Item name" DataField="ItemID"></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
        </telerik:RadGrid>
 
    </div>
    </form>
</body>
</html>


Imports System.Data
Imports Telerik.Web.UI
 
Partial Class _Default
    Inherits System.Web.UI.Page
    
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not IsPostBack Then
            MakeDatasource()
        End If
    End Sub
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        RadGrid1.DataSource = Session("ItemData")
    End Sub
 
    Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
        If TypeOf e.Item Is GridEditableItem Then
            Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)
            Dim chk As CheckBox = DirectCast(item("IsSelected").Controls(0), CheckBox)
            chk.Enabled = True
            chk.AutoPostBack = True
            AddHandler chk.CheckedChanged, AddressOf UpdateEditedItem
        End If
    End Sub
 
    Protected Sub UpdateEditedItem(ByVal sender As Object, ByVal e As EventArgs)
        Dim chk As CheckBox = DirectCast(sender, CheckBox)
        Dim item As GridEditableItem = DirectCast(chk.NamingContainer, GridEditableItem)
 
        Dim values As New Hashtable()
        item.ExtractValues(values)
 
        For Each rowView As DataRowView In mData
            Dim row As DataRow = rowView.Row
            If values("ItemID") = row("ItemID").ToString() Then
                row("IsSelected") = Not row("IsSelected")
                Exit For
            End If
        Next
        Session("ItemData") = mData
        RadGrid1.Rebind()
    End Sub
 
    Private Sub MakeDatasource()
        Dim dt As New DataTable
        dt.Columns.Add("IsSelected")
        dt.Columns.Add("ItemID")
 
        Dim dv As DataView = dt.DefaultView
        For i = 0 To 19
            Dim newRow As DataRowView = dv.AddNew()
            newRow("IsSelected") = (i Mod 2 = 0) 'every other row is selected
            newRow("ItemID") = "item " + i.ToString()
            newRow.EndEdit()
        Next
        Session("ItemData") = dv
    End Sub
End Class

small_steps
Top achievements
Rank 1
 answered on 10 Oct 2013
3 answers
207 views
I have added a few additional fields to my grid, and now when I click on the delete button i get the "Microsoft JScript runtime error: Could not complete the operation due to error c00ce514."  

Any ideas on what to check would be great.  

<telerik:RadGrid ID="gvEnCounterDetails" runat="server" AutoGenerateColumns="False"
        CellSpacing="0" DataSourceID="dsEncounterDetails" GridLines="None" AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" Width="900px">
        <ExportSettings>
            <Pdf>
                <PageHeader>
                    <LeftCell Text=""></LeftCell>
                    <MiddleCell Text=""></MiddleCell>
                    <RightCell Text=""></RightCell>
                </PageHeader>
                <PageFooter>
                    <LeftCell Text=""></LeftCell>
                    <MiddleCell Text=""></MiddleCell>
                    <RightCell Text=""></RightCell>
                </PageFooter>
            </Pdf>
        </ExportSettings>
        <MasterTableView DataKeyNames="PatientID,EncounterID" DataSourceID="dsEncounterDetails"
            CommandItemDisplay="Top" RetrieveNullAsDBNull="True">
            <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Add Encounter"
                ShowRefreshButton="False"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditColumn" HeaderStyle-Width="30px">
                    <ItemStyle CssClass="linkUnderline" HorizontalAlign="Center" Wrap="False"></ItemStyle>
                </telerik:GridEditCommandColumn>
 
                <telerik:GridDateTimeColumn DataField="sDOS" DataType="System.DateTime" FilterControlAltText="Filter sDOS column"
                    HeaderText="DOS" SortExpression="sDOS" UniqueName="sDOS" DataFormatString="{0:MM/dd/yyyy}"
                    Visible="True" HeaderStyle-Width="75px" >
 
                    <%--<ColumnValidationSettings EnableRequiredFieldValidation="true">
                    <RequiredFieldValidator ForeColor="Red" ErrorMessage="*Required"></RequiredFieldValidator>                   
            </ColumnValidationSettings>--%>
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="sRoomNumber" FilterControlAltText="Filter sRoomNumber column"
                    HeaderText="Room #" SortExpression="sRoomNumber" UniqueName="sRoomNumber" HeaderStyle-Width="75px">
                </telerik:GridBoundColumn>
                <telerik:GridDropDownColumn DataSourceID="dsEncounterTypes" ListTextField="EncounterType"
                    ListValueField="EncounterTypeID" UniqueName="iServiceTypeID" SortExpression="iServiceTypeID"
                    DataField="iServiceTypeID" AllowAutomaticLoadOnDemand="true" DropDownControlType="DropDownList"
                    EditFormColumnIndex="0" FilterControlAltText="Filter iServiceTypeID" HeaderText="Service Type"
                    HeaderStyle-Width="100px" ColumnEditorID="ServiceTypeColumnEditor" EmptyListItemText=""
                    EmptyListItemValue="" EnableEmptyListItem="True">
                </telerik:GridDropDownColumn>
 
                <telerik:GridTemplateColumn DataField="sAttendingProviderNumber" EditFormColumnIndex="0"
                    FilterControlAltText="Filter sAttendingProviderNumber column" HeaderText="Provider"
                    SortExpression="sAttendingProviderNumber" UniqueName="sAttendingProviderNumber"
                    HeaderStyle-Width="190px">
 
                     
                    <EditItemTemplate>
                        <telerik:RadDropDownList ID="sAttendingProviderNumberDDL" runat="server" DataSourceID="dsAttendingDocs"
                            DataTextField="DOCNAME" DataValueField="DOCCODE" SelectedValue='<%# Bind("sAttendingProviderNumber") %>'
                            AppendDataBoundItems="True" Width="185px">
                            <Items>
                                <telerik:DropDownListItem runat="server" Text="Select an Attending Provider" Value="" />
                            </Items>
                        </telerik:RadDropDownList>
                    </EditItemTemplate>
 
                    <ItemTemplate>
                        <telerik:RadDropDownList ID="sAttendingProviderNumberDDL" runat="server" DataSourceID="dsAttendingDocs"
                            DataTextField="DOCNAME" DataValueField="DOCCODE" SelectedValue='<%# Bind("sAttendingProviderNumber") %>'
                            AppendDataBoundItems="True" Width="185px" OnSelectedIndexChanged="sAttendingProviderNumberDropDownList_SelectedIndexChanged"
                            Enabled='<%# CanBeEditedByUser() %>' AutoPostBack="True" CausesValidation="False">
                            <Items>
                                <telerik:DropDownListItem runat="server" Text="Select Assigned Provider" Value="" />
                            </Items>
                        </telerik:RadDropDownList>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
 
 
 
                <telerik:GridTemplateColumn DataField="sSecondaryProviderNumber" EditFormColumnIndex="0"
                    FilterControlAltText="Filter sSecondaryProviderNumber column" HeaderText="Secondary Provider"
                    SortExpression="sSecondaryProviderNumber" UniqueName="sSecondaryProviderNumber"
                    HeaderStyle-Width="190px" Visible="False">
 
                     
                    <EditItemTemplate>
                        <telerik:RadDropDownList ID="sSecondaryProviderNumberDDL" runat="server" DataSourceID="dsAttendingDocs"
                            DataTextField="DOCNAME" DataValueField="DOCCODE" SelectedValue='<%# Bind("sSecondaryProviderNumber") %>'
                            AppendDataBoundItems="True" Width="185px">
                            <Items>
                                <telerik:DropDownListItem runat="server" Text="Select Secondary Provider" Value="" />
                            </Items>
                        </telerik:RadDropDownList>
                    </EditItemTemplate>
 
 
                </telerik:GridTemplateColumn>
 
 
                <telerik:GridTemplateColumn DataField="iLocationCodeID" EditFormColumnIndex="0"
                    FilterControlAltText="Filter iLocationCodeID column" HeaderText="Location"
                    SortExpression="iLocationCodeID" UniqueName="iLocationCodeID"
                    HeaderStyle-Width="190px">
 
                    <ItemTemplate>
                        <telerik:RadDropDownList ID="ddlLocationDDL" runat="server" DataSourceID="dsLocationCodes"
                            DataValueField="LocationCodeID" DataTextField="LocationDesc"
                            Width="300px" SelectedValue='<%# Bind("iLocationCodeID") %>'
                             Enabled='<%# CanBeEditedByUser() %>' AutoPostBack="True" CausesValidation="False">
                        </telerik:RadDropDownList>
          
                    </ItemTemplate>
 
 
 
 
                    <EditItemTemplate>
 
                        <telerik:RadDropDownList ID="ddlLocationDDL" runat="server" DataSourceID="dsLocationCodes"
                            DataValueField="LocationCodeID" DataTextField="LocationDesc" CausesValidation="False"
                            Width="300px" SelectedValue='<%# Bind("iLocationCodeID") %>'>
                        </telerik:RadDropDownList>
          
                    </EditItemTemplate>
 
 
                </telerik:GridTemplateColumn>
 
 
 
                <telerik:GridTemplateColumn DataField="iSeenByProvider" EditFormColumnIndex="0" DataType="System.Boolean"
                    DefaultInsertValue="False" FilterControlAltText="Filter Seen By Provider" HeaderText="Seen By Provider"
                    SortExpression="iSeenByProvider" UniqueName="iSeenByProvider"
                    HeaderStyle-Width="50px">
                     
 
 
                    <EditItemTemplate>
                        <asp:CheckBox ID="iSeenByProviderCheckBox" runat="server" AutoPostBack="false" Checked='<%# Bind("iSeenByProvider") %>' />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="iSeenByProviderCheckBox" runat="server" AutoPostBack="true" Enabled='<%# CanBeEditedByUser() %>'
                            Checked='<%# Eval("iSeenByProvider") %>' OnCheckedChanged="ToggleSeenByProvider" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
 
                <telerik:GridTemplateColumn DataField="iNotSeenByProvider" EditFormColumnIndex="0"
                    DataType="System.Boolean" DefaultInsertValue="False" FilterControlAltText="Filter Not Seen By Provider"
                    HeaderText="Not Seen By Provider" SortExpression="iNotSeenByProvider" UniqueName="iNotSeenByProvider"
                    HeaderStyle-Width="50px">
                     
     
 
                    <EditItemTemplate>
                        <asp:CheckBox ID="iNotSeenByProviderCheckBox" runat="server" AutoPostBack="false" Checked='<%# Bind("iNotSeenByProvider") %>' />
                        <asp:HiddenField ID="hdnPatientID" runat="server" Value='<%# Eval("PatientID") %>' />
                        <asp:HiddenField ID="hdnEncounterID" runat="server" Value='<%# Eval("EncounterID") %>' />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="iNotSeenByProviderCheckBox" runat="server" AutoPostBack="true"
                            Enabled='<%# CanBeEditedByUser() %>' Checked='<%# Eval("iNotSeenByProvider") %>'
                            OnCheckedChanged="ToggleNotSeenByProvider" />
                        <asp:HiddenField ID="hdnPatientID" runat="server" Value='<%# Eval("PatientID") %>' />
                        <asp:HiddenField ID="hdnEncounterID" runat="server" Value='<%# Eval("EncounterID") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
 
 
                <telerik:GridButtonColumn ButtonType="ImageButton" Text="Delete" UniqueName="DeleteColumn"
                    CommandName="Delete" ItemStyle-Width="30px" HeaderStyle-Width="30px"
                    ConfirmText="Delete this Encounter?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete Encounter?">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings ColumnNumber="1" CaptionDataField="sDOS" CaptionFormatString="Edit details"
                InsertCaption="New Encounter">
                <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                <%--<FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="2" Width="100%"></FormMainTableStyle>
               <FormTableStyle CellSpacing="0" CellPadding="2"></FormTableStyle>--%>
                <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                <EditColumn ButtonType="ImageButton" InsertText="Add Encounter" UpdateText="Update Encounter"
                    UniqueName="EditCommandColumn1" CancelText="Cancel">
                </EditColumn>
                <FormTableButtonRowStyle HorizontalAlign="Left" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
            </EditFormSettings>
            <BatchEditingSettings EditType="Cell"></BatchEditingSettings>
            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        </MasterTableView>
        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
 
    </telerik:RadGrid>
Ryan
Top achievements
Rank 1
 answered on 10 Oct 2013
4 answers
106 views
Hi,

Please look at these screen shots..This grid in a RadToolTipManager using a user control. It appears correctly mostly but then sometimes it looses its skin and starts to look like Metro skin for some reason. I have not used Metro skin anywhere. Why on postaback at times it will change the skin.....Please advise here is small code snippet as well...


<telerik:RadToolTipManager ID="RadToolTipManagerForMattersTotal" OffsetY="-5"    
HideEvent="ManualClose" Width="850" Height="200" runat="server" EnableTheming="true" RenderMode="Classic" EnableShadow="true" ClientIDMode=AutoID EnableAjaxSkinRendering="true" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" Position="TopCenter">
    </telerik:RadToolTipManager>

and user control.....
  <telerik:RadGrid ID="ClientProfitGrid" runat="server" ShowStatusBar="True" ClientIDMode="AutoID"  Height="200"
                 AutoGenerateColumns="False" BorderWidth='1px' AllowPaging="False"  
                 CellSpacing="0" GridLines="None" 
                 PageSize="50"  
                 Skin = "Sitefinity" 
                 OnItemDataBound="ClientProfitGrid_ItemDataBound">  
                 <PagerStyle Mode="NextPrev" Visible="false" />
                <ClientSettings> 
                   <Scrolling AllowScroll="True" UseStaticHeaders="true" />
                </ClientSettings>
            <MasterTableView DataKeyNames=""  ShowHeader="true"  >
             <ColumnGroups>
              <telerik:GridColumnGroup HeaderText="Client Name" Name="ClName" HeaderStyle-HorizontalAlign="Center">
              </telerik:GridColumnGroup>
           </ColumnGroups>
                <NoRecordsTemplate> ...
Marin Bratanov
Telerik team
 answered on 10 Oct 2013
2 answers
178 views
Hi ,

I want the treeview checkboxes to be disabled (Not Hidden) while the treeview is still expandable and collapsible.. Is there a way to accomplish this?

Thanks
Chris
Top achievements
Rank 1
 answered on 10 Oct 2013
3 answers
53 views
Hi Everyone,

I m newly working on Rad Controls. So, please clarify me on my below requirements.

1. Can we add Calender (Dynamic) directly to RadZone. or we have to do it through RadDock.???
2. I need calender to start from current month with only right arrow beside it. Only clicking this right arrow, we have to navigate to next  month and at the same time left arrow should be enabled.
3. Is Calendar can be minimized ???


Its would helpful for me if you suggest anything for above. Atleast some hints.

Thanks and Regards
Pathrudu Majji
Konstantin Dikov
Telerik team
 answered on 10 Oct 2013
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?