Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
97 views
Good afternoon,


I have a little problem and I can not find solution for the same.
I'm using a modal window through the "window.radopen", so that when the session expires and the window is still open, if the user triggers an event in it, it is redirected to the login page.
I'd like to do a check that if the session has expired if, out instead of redirecting to the login page, I would like to fire a command to close it.

Well I tried to do this on page load the modal window: 

function GetRadWindow() {
    var oWindow = null;
    if(window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
function Close(){
    GetRadWindow().close();
}

Protected Sub Page_Load(ByVal sender as Object, ByVal e As System.EventArgs) Handles Me.load
 
    If User.Identity.IsAuthenticated = true Then
        '(...)
    Else
        RadScriptManager.RegisterClientScriptBlock(Me, [GetType()], "mykey", "Close();", True)
    End
 
End sub

Marin Bratanov
Telerik team
 answered on 17 Sep 2012
1 answer
97 views
I've been struggling to get RadWindows buttons to invoke a server side call as well as the client side javascript in the same click.
If I use a OnClientClick event I am able to get the window to close and refresh the parent, but can't get the server side save function to fire.

I'm not a strong javascript programmer and can't figure how to use javascript to fire the save event on the server side.
Any help is appreciated.
Thanks
Marin Bratanov
Telerik team
 answered on 17 Sep 2012
1 answer
109 views
I know how to load a new item into a radCombobox, but how do you do it for a multi-column combobox? This is my code for the combobox:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="radCBOLookup.ascx.vb"
    Inherits="HEW.radCBOLookup" %>
<telerik:RadComboBox ID="radCBOLookup" runat="server" MarkFirstMatch="true" AllowCustomText="false"
    Width="50px" DropDownWidth="350px" MaxHeight="300px" NoWrap="true" HighlightTemplatedItems="true"
    ExpandDirection="Down" ExpandDelay="0" CollapseDelay="0">
    <HeaderTemplate>
        <table style="width: 100%; text-align: left; font-size: 8pt">
            <tr>
                <td style="width: 20%;">
                    Code
                </td>
                <td style="width: 80%;">
                    Description
                </td>
            </tr>
        </table>
    </HeaderTemplate>
    <ItemTemplate>
        <table style="width: 100%; text-align: left; font-size: 8pt">
            <tr>
                <td style="width: 20%;">
                    <%#DataBinder.Eval(Container.DataItem, "Master_Type_Code")%>
                </td>
                <td style="width: 80%;">
                    <%#DataBinder.Eval(Container.DataItem, "Master_Desc")%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadComboBox>

VB code for radCBOLookup_ItemDataBound:
e.Item.Text = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString
 
e.Item.Value = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString.Trim
 
e.Item.Attributes("Description") = (DirectCast(e.Item.DataItem, DataRowView))("Master_Desc").ToString.Trim


Currently, the only way I have been able to figure this out is to add a new datarow to the datasource. Does anyone have any suggestions?
Kalina
Telerik team
 answered on 17 Sep 2012
1 answer
129 views
I have a radgrid in which I create a table and assign it to the Controls for an item in the Itemdatabound event as below.
I want to filter the PayoutType column based on a given list (ex , Retirement, Termination, Withdrawal). The table cell can any number of these values for one row. But since it is not bound to a database column I am unable to filter it.

Could you tell me how I can fiter in this scenario?

protected void rgPayoutElections_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = e.Item as GridDataItem;
            int accountID = Int32.Parse(item.GetDataKeyValue("AccountID").ToString());
            DataRow[] dr = PayoutElection.GetPayouts_ByAccount_ListByParticipant(Int32.Parse(Profile.ParticipantID), accountID);
             
            Table tblPayoutType = new Table();
            foreach (DataRow row in dr)
            {
                TableRow trPayoutType = new TableRow();
 
                TableCell cellPayoutType = new TableCell();
                cellPayoutType.Text = row["PayoutType"].ToString();
                cellPayoutType.CssClass = "textRed";
                trPayoutType.Cells.Add(cellPayoutType);
                tblPayoutType.Rows.Add(trPayoutType);           
            }
            item["PayoutType"].Controls.Add(tblPayoutType);
       }
    }

Andrey
Telerik team
 answered on 17 Sep 2012
1 answer
289 views
Hi,

We have a web application in which we are using RadControls. When we deploy the application on servers, most of the times it works fine.
But sometime on some servers it gives very strange behavior. It fails to load some CSS and after some time it starts working fine without making nay changes to code or configuration. Issue seems related to WebResource.axd file.
Looking into the css loaded using developer tool, it seems that in error case there are unknown tags in css webrespurce.axd.
For ref please see attahced files having a correct and error view snaps, also having css loaded in case of error view.

We are using Windows Server 2008 R2 Enterprise and IIS 7 with classic mode.

Regards,
Manish 
Kate
Telerik team
 answered on 17 Sep 2012
1 answer
113 views

Below is a portion of my grid, which uses a DetailTable with its own CommandItemTemplate

<DetailTables>       
<telerik:GridTableView Name="PersonConditionGrid" runat="server" DataKeyNames="PersonConditionId" Caption="Conditions linked with this Person"
    DataSourceID="PersonConditionViewDataSrcId" TableLayout="Auto" Width="580px"
    AutoGenerateColumns="false" CommandItemDisplay="Top" ShowFooter="true"  FooterStyle-BorderStyle="Solid" FooterStyle-BorderWidth="2pt">
<ParentTableRelation>
    <telerik:GridRelationFields DetailKeyField="PersonId" MasterKeyField="PersonId" />          
</ParentTableRelation>
<HeaderStyle Font-Bold="true" />
<CommandItemTemplate>
    <table width="100%">
    <tr>
        <td align="left">
            <asp:LinkButton ID="btnAddNew" runat="server" CommandName="InitInsert"><asp:Image ID="imgAddNew" runat="server" ImageUrl="~/Images/button-New-24.gif" /> Add New Condition</asp:LinkButton>
            <asp:LinkButton ID="btnSaveNew" runat="server" CommandName="PerformInsert" ValidationGroup="EntryClass_VG"><asp:Image ID="imgSaveNew" runat="server" ImageUrl="~/Images/button-Save-24.gif" /> Save Condition</asp:LinkButton>
            <asp:LinkButton ID="btnEdit" runat="server" CommandName="EditSelected"><asp:Image ID="imgEdit" runat="server" ImageUrl="~/Images/button-Edit-24.gif" /> Take Action on Condition</asp:LinkButton>
            <asp:LinkButton ID="btnSaveEdit" runat="server" CommandName="UpdateEdited" ValidationGroup="EntryClass_VG"><asp:Image ID="imgSaveEdit" runat="server" ImageUrl="~/Images/button-Save-24.gif" /> Save Condition</asp:LinkButton>
            <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" CausesValidation="false"><asp:Image ID="imgCancel" runat="server" ImageUrl="~/Images/button-Cancel-24.gif" /> Cancel Edit</asp:LinkButton>
            <asp:LinkButton ID="btnDelete" runat="server" CommandName="DeleteSelected" OnClientClick="return confirm('Are you sure you want to delete the selected record?');"><asp:Image ID="imgDelete" runat="server" ImageUrl="~/Images/button-Del-24.gif" /> Delete Condition</asp:LinkButton>
        </td>
    </tr>
    </table>
</CommandItemTemplate>
<Columns>
    <telerik:GridTemplateColumn UniqueName="SiteAccessConditionName" HeaderText="Access Condition Name" HeaderStyle-Width="200px" HeaderStyle-HorizontalAlign="Center">
    <ItemTemplate>

After a Save operation, the detailTable remains open, with the new item displayed in the grid (as expected).

After a Cancel or Delete operation, the DetailsTable collapses and the user has to expand the item again.

Is there some way to prevent the DetailTable from collapsing after the Cancel or Delete operation?

Marin
Telerik team
 answered on 17 Sep 2012
1 answer
99 views
I have a need to save the grid information as an Excel document and save it to SharePoint.  Does anyone know of a way to use the export feature to do this?  If I can get the physical file, I already know how to upload it to SharePoint.
Tsvetoslav
Telerik team
 answered on 17 Sep 2012
3 answers
138 views
Is it possible to have the scheduler show a time period of 5 am today through to 4:59 am tomorrow? So it is still a 24 hour period but it overlaps the strict "today" boundary of midnight.

Thanks,

Jonathan
Boyan Dimitrov
Telerik team
 answered on 17 Sep 2012
1 answer
93 views
Hi to all,i want to use RAD Controllers in my project but i don't know how to use those controllers.so please guide me.
please,
please,
please,
Shinu
Top achievements
Rank 2
 answered on 17 Sep 2012
7 answers
571 views
hi

i am using Q1 2007 version. when i type in a editor and click on button i want to set cursor position to the end of text

Right now problem is  when i click on button, page is  post back, so focus is getting lost.

please give me the solution ASAP.

regards

rahul.


Rumen
Telerik team
 answered on 17 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?