Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
189 views
Dear All,
RadCalendar popup is not hiding on tab inside the telerik Grid. 

Thanks,
vinoth
Pradeep
Top achievements
Rank 1
 answered on 28 Jun 2018
20 answers
1.9K+ views
Usually it works fine When I used the batch edit mode in the radgird.
Occasionally,it can't work , you can see the errors in pictures below.
It shows that the count of command items in the e.Commands is zero and ,in the grid, the updated cell marked a red small triangle on the top right.
I can't figure out why there is no item in the e.Commands.
Thanks in advance.
Eyup
Telerik team
 answered on 28 Jun 2018
2 answers
239 views

     Here is the output of my SQL procedure 

10/2/2017 12:00:00 AM
10/9/2017 12:00:00 AM
10/16/2017 12:00:00 AM
10/23/2017 12:00:00 AM

But the x-axis on the chart displays the following 

10/1/2017
10/8/2017
10/15/2017
10/22/2017

It displays the previous date instead of the  date passed from the procedure.

Attached screen shots of the graph. 

Can some please help with this??

Thanks Vibhor.

Vibhor
Top achievements
Rank 1
 answered on 28 Jun 2018
3 answers
992 views

After I edit/insert a record in my grid, I want the edit template to go away.  I want this to happen for two reasons.  1) Once the user edits/inserts the record, there's no need for that edit/insert row to remain.  2) The template has a required field validator on it and when the user posts back in another part of the page the required field validator gets triggers on the field in this template.

 

I've tried MyGroupsRadGrid.MasterTableView.ClearEditItems() after the insert logic on MyGroupsRadGrid_InsertCommand() but that doesn't work.  I've tried e.Canceled = true but that doesn't work.  I've tried e.Item.Edit = false but that errors.

<telerik:RadGrid ID="MyGroupsRadGrid" runat="server" OnNeedDataSource="MyGroupsRadGrid_NeedDataSource"
    AutoGenerateColumns="false" AutoPostBackOnFilter="true" OnUpdateCommand="MyGroupsRadGrid_UpdateCommand" OnItemDataBound="MyGroupsRadGrid_ItemDataBound"
    AllowSorting="true" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" OnEditCommand="MyGroupsRadGrid_EditCommand" OnSelectedIndexChanged="MyGroupsRadGrid_SelectedIndexChanged1"
    AllowFilteringByColumn="false" OnCancelCommand="MyGroupsRadGrid_CancelCommand" MasterTableView-CommandItemDisplay="Top" OnInsertCommand="MyGroupsRadGrid_InsertCommand">
    <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
    <MasterTableView DataKeyNames="BWGroupID">
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <table id="Table1" class="marginleft50 bordercollapse width100percent" cellspacing="2" cellpadding="1" border="0" rules="none">
                    <tr>
                        <td valign="top">
                            <table id="Table2" class="bordercollapse" cellspacing="2" cellpadding="1" border="0" rules="none">
                                <tr id="BWGroupIDRow" runat="server">
                                    <td>Group ID   </td>
                                    <td><asp:Label ID="BWGroupIDLabel" runat="server" Text='<%# Bind("BWGroupID") %>' /></td>
                                </tr>
                                <tr id="BWGroupNameRow" runat="server">
                                    <td>Group Name   </td>
                                    <td>
                                        <asp:TextBox ID="GroupNameTextBox" runat="server" Text='' />
                                        <asp:RequiredFieldValidator ID="RequiredGroupName" runat="server" ControlToValidate="GroupNameTextBox" ForeColor="Red" Text="*A Group Name is Required." />
                                    </td>
                                </tr>
                                <tr id="DisplayNameRow" runat="server">
                                    <td>Group Owner   </td>
                                    <td>
                                        <telerik:RadComboBox ID="OwnerRadComboBox" runat="server" OnClientSelectedIndexChanged="enableAddSelectionButton" Width="270px" DataTextField="Value" DataValueField="Key" ValidationExpression="[\w\s\.,_-]+$" AppendDataBoundItems="True" Filter="Contains">
                                            <Items>
                                                <telerik:RadComboBoxItem runat="server" Text="" Value="-1" />
                                            </Items>
                                        </telerik:RadComboBox>
                                        <br />
                                        <asp:Label ID="OwnerError" runat="server" ForeColor="Red" Visible="true" />
                                    </td>
                                </tr>
                                <tr id="IsActiveRow" runat="server">
                                    <td>Status   </td>
                                    <td><asp:Label ID="Label8" runat="server" Text='<%# Eval("IsActive").ToString() == "True" ? "Active" : "Inactive" %>' /></td>
                                    <td><asp:CheckBox ID="DeactivateCheckBox" runat="server" Text="Deactivate Group" /></td>
                                </tr>
                                <tr>
                                    <td align="center" colspan="2">
                                        <br />
                                        <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' /> 
                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td valign="top"></td>
                    </tr>
                </table>
                <br />
            </FormTemplate>
        </EditFormSettings>
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn UniqueName="BWGroupID" DataField="BWGroupID" HeaderText="Group ID" SortExpression="BWGroupID" FilterControlWidth="150px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" />
            <telerik:GridBoundColumn DataField="BWGroupName" HeaderText="Group Name" ReadOnly="true" SortExpression="BWGroupName" FilterControlWidth="150px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" />
            <telerik:GridBoundColumn DataField="ComputedBWGroupUserCount" HeaderText="Member Count" SortExpression="ComputedBWGroupUserCount" FilterControlWidth="50px" AutoPostBackOnFilter="true" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Code behind:

protected void MyGroupsRadGrid_InsertCommand(object sender, GridCommandEventArgs e)
{
    int parseOwnerId = -1;
 
    try
    {
        GridEditableItem editedItem = (GridEditableItem)e.Item;
        if (e.CommandName == "PerformInsert")
        {
            #region Get controls
            TextBox GroupNameTextBox = new TextBox();
            GroupNameTextBox = (TextBox)e.Item.FindControl("GroupNameTextBox");
 
            RadComboBox OwnerRadComboBox = (RadComboBox)editedItem.FindControl("OwnerRadComboBox");
            int.TryParse(OwnerRadComboBox.SelectedValue, out parseOwnerId);
            #endregion
 
            BWGroup newGroup = new BWGroup();
            newGroup.BWUserIDCreated = BWSessionHandler.BWID;
 
            BWUser selectedOwner = new BWUser();
 
            if (parseOwnerId > 0)
            {
                selectedOwner = this._bwContext.BWUsers.Where(x => x.BWUserID == parseOwnerId).FirstOrDefault();
                if (selectedOwner.BWUserID != null && selectedOwner.BWUserID > 0)
                    newGroup.BWUserIDOwner = selectedOwner.BWUserID;
            }
            newGroup.BWUserIDUpdated = BWSessionHandler.BWID;
            newGroup.BWGroupName = GroupNameTextBox.Text;
            newGroup.IsActive = true;
            newGroup.SystemGenerated = false;
            newGroup.RowInsertDateTime = DateTime.Now;
 
            this._bwContext.BWGroups.InsertOnSubmit(newGroup);
            this._bwContext.SubmitChanges();
 
            ViewState["SelectedGroupId"] = newGroup.BWGroupID;
            MyGroupsRadGrid.MasterTableView.Items[0].Edit = false;
            MyGroupsRadGrid.MasterTableView.ClearEditItems();
            MyGroupsRadGrid.Rebind();
 
            GroupMemberRadGrid.MasterTableView.IsItemInserted = false;
            GroupMemberRadGrid.Rebind();
            AssignNameOfGroup(newGroup.BWGroupName);
            GroupMemberRadGrid.Enabled = true;
 
            foreach (GridDataItem row in MyGroupsRadGrid.MasterTableView.Items)
            {
                if (row.GetDataKeyValue("BWGroupID").ToString() == ViewState["SelectedGroupId"].ToString())
                {
                    row.Selected = true;
                    break;
                }
            }
            e.Canceled = true;
        }
    }
    catch (Exception ex) { this.ThrowError(ex, parseOwnerId); }
}
Jeremy
Top achievements
Rank 1
 answered on 27 Jun 2018
1 answer
162 views
When I publish a page with a RadMap control on it and run it with SSL, the page apparently has mixed content and does not show the green badge. I assume then calls to the mapservice are still http, is there a way to fix this?
Marin Bratanov
Telerik team
 answered on 27 Jun 2018
1 answer
147 views

Hi,

        I want to use rad window to both primary and secondary monitor. But i am not able to drag my rad window to secondary monitor which is displayed in primary monitor .

sample code:

div>
    <telerik:RadWindow RenderMode="Lightweight" runat="server" ID="rad_simpleNote" Modal="false" Width="340px" Height="340px" VisibleTitlebar="true">
        <ContentTemplate>
            <table>
                <td>
                    <asp:Label ID="username" runat="server" Text="This is building 1 note" CssClass="ContentLabel" />
                </td>
            </table>
        </ContentTemplate>
    </telerik:RadWindow>
</div>

Thanks,

Harikka.

Marin Bratanov
Telerik team
 answered on 27 Jun 2018
1 answer
120 views

It was working for me at one point and then it stopped.  no matter what I have tried the event just did not fire and I couldn't figure out why  I have posted my both code behind and aspx.  Any help would be much appreciated.

Code behind:

protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["CompanyID"] != null)
            CompanyId = (Guid)Session["CompanyID"];
        if (Session["UserID"] != null)
            UserId = (Guid)Session["UserID"];
        if (!Page.IsPostBack)
        {
            loadBatchFileLog();
            rgBatchLog.DataSource = loadBatchFileLog();
            rgBatchLog.DataBind();
        }
    }

 private ICollection loadBatchFileLog()
    {
        DataView dv = new DataView();
        List<BatchOrderingTransform> info = new List<BatchOrderingTransform>();
        info = bll.GetBatchFileLog(CompanyId);
        if (info.Count > 0)
        {
            DataTable dt = new DataTable();
            dt = Common.ToDataTable<BatchOrderingTransform>(info);
            dv = new DataView(dt);
        }
        return dv;
}

protected void rgBatchLog_UpdateCommand(object sender, GridCommandEventArgs e)
    {
        long id = Convert.ToInt64(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString());
        var name = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Username"].ToString();
        var fileName = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["FileName"].ToString();
        bll.DeactivateBatchFile(id, name);
        loadBatchFileLog();
    }

aspx:

<telerik:RadGrid ID="rgBatchLog" runat="server" AutoGenerateColumns="false" GridLines="None" OnItemDataBound="rgBatchLog_ItemDataBound"
        allowPaging="true" AllowSorting="true" Width="100%" OnUpdateCommand="rgBatchLog_UpdateCommand">
        <PagerStyle Mode="Slider" />
        <MasterTableView AllowAutomaticDeletes="True" DataKeyNames="ID, CompanyId, Username, FileName,IsProcessed">
            <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
            <Columns>
                <telerik:GridHyperLinkColumn DataTextField="Details" ItemStyle-ForeColor="Blue" SortedBackColor="Blue" UniqueName="ID" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="BatchReportDetails.aspx?BatchID={0}"
                    HeaderText="" Text="Details" SortExpression="ID"> <ItemStyle CssClass="hyperlink" /> </telerik:GridHyperLinkColumn>             
                <telerik:GridBoundColumn DataField="ServiceName" HeaderText="Package" UniqueName="ServiceName" />
                <telerik:GridBoundColumn DataField="OriginalFileName" HeaderText="File Name" UniqueName="OriginalFileName" />
                <telerik:GridBoundColumn DataField="ProcessRequestedDate" HeaderText="Scheduled Run Date" UniqueName="ProcessRequestedDate" />
                <telerik:GridBoundColumn DataField="IsProcessed" HeaderText="Is File Processed" UniqueName="IsProcessed" />
                <telerik:GridBoundColumn DataField="Name" HeaderText="User Name" UniqueName="Name"/>
                <telerik:GridBoundColumn DataField="UserEmail" HeaderText="User Email" UniqueName="UserEmail"/>
                <telerik:GridBoundColumn DataField="InputEmail" HeaderText="Input Email" UniqueName="InputEmail"/>
                <telerik:GridBoundColumn DataField="Created" HeaderText="Created" UniqueName="Created"/>
                <telerik:GridButtonColumn CommandName="Deactivate" ItemStyle-ForeColor="Blue" ButtonType="LinkButton" Text="Deactivate" UniqueName="Deactivate" CommandArgument="" ConfirmDialogType="Classic" ConfirmText="Are you sure you want to deactivate this record?"></telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
        <FilterMenu Skin="Vista" EnableTheming="True">
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </FilterMenu>
    </telerik:RadGrid>

Eyup
Telerik team
 answered on 27 Jun 2018
32 answers
629 views
Hi,

I have a Button and Radeditor in Page1 and upon Button click it should navigate me to another page. If the RadEditor contains any spell errors in its content it should not navigate me to Page 2 and it should alert me "Please start spell check". If there are no spell errors without any spell check it should be navigated to Page2.

Please let me know any solution for this.

Thanks
Samba
Anshuman
Top achievements
Rank 1
 answered on 26 Jun 2018
3 answers
295 views

I am trying to apply a style to a nested tab strip.  Specifically I am trying to set the border-top-color for the selected child tab.  I can do this for the parent tab and I am able to modify other attributes of the child tab, just not that specific one. 

Any insight would be appreciated. 

<style>
        .RadTabStrip_Vista .rtsLevel1 .rtsSelected .rtsLink {           
            font-family: Arial ;
            border-top-color:#fdb845 ;
            border-top-width:2px;
        }
    
        .childTabSelected {
            font-family: Arial  ;
            border-top-color:#00a2ff !important ;
            border-top-width:2px;
        }
 
    </style>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" />
    <div>
        <telerik:RadTabStrip RenderMode="Lightweight" ID="RadTabStrip1" runat="server">
            <Tabs>
                <telerik:RadTab runat="server" Text="Tab1">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="Child Tab 1"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 2"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 3"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 4"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 5"
                            SelectedCssClass="childTabSelected" />
                    </Tabs>
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Tab2" Selected="True">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="Child Tab 2.1"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 2.2" Selected="True"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 2.3"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 2.4"
                            SelectedCssClass="childTabSelected" />
                        <telerik:RadTab runat="server" Text="Child Tab 2.5"
                            SelectedCssClass="childTabSelected" />
                    </Tabs>
                </telerik:RadTab>
 
                <telerik:RadTab runat="server" Text="Tab3" />
            </Tabs>
        </telerik:RadTabStrip>
Rumen
Telerik team
 answered on 26 Jun 2018
1 answer
164 views

We are using the RadListView binding to data from a Web API call...  When data is updated - we use the client-size code:

listView.set_dataSource(data);
listView.dataBind();

Is there a way we can apply an animation when data is updated?  Currently it just draws in the new/updated data in a jarring / clunky fashion.

Marin Bratanov
Telerik team
 answered on 25 Jun 2018
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?