Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views

Hello,

 I have a Problem after the last Telerik ASP.NET update.

 I have a Grid with Columns they are the visible properties is false. I need some column values for the Event.

 Here is my Grid:

<telerik:RadGrid ID="RadGridStaticContainer" runat="server" CellSpacing="0"
    Culture="de-DE" DataSourceID="ODSStaticContainers" GridLines="None"
    onitemcommand="RadGridStaticContainer_ItemCommand"
    onitemdatabound="RadGridStaticContainer_ItemDataBound">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="StaticID"
        DataSourceID="ODSStaticContainers">
        <CommandItemSettings ExportToPdfText="Export to PDF" />
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
            Visible="True">
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
            Visible="True">
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
         
        <Columns>
                <telerik:GridBoundColumn DataField="StaticID" DataType="System.Int64"
                    FilterControlAltText="Filter StaticID column" HeaderText="StaticID"
                    ReadOnly="True" SortExpression="StaticID" UniqueName="StaticID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PlayerLayoutID" DataType="System.Int64"
                    FilterControlAltText="Filter PlayerLayoutID column" HeaderText="PlayerLayoutID"
                    SortExpression="PlayerLayoutID" UniqueName="PlayerLayoutID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerID" DataType="System.Int64"
                    FilterControlAltText="Filter ContainerID column" HeaderText="ContainerID"
                    SortExpression="ContainerID" UniqueName="ContainerID" Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerName" DataType="System.String"
                    FilterControlAltText="Filter ContainerName column" HeaderText="ContainerName"
                    SortExpression="ContainerName" UniqueName="ContainerName">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="ContainerObjects"
                    FilterControlAltText="Filter ContainerObjects column"
                    HeaderText="ContainerObjects" SortExpression="ContainerObjects"
                    UniqueName="ContainerObjects">
                    <ItemTemplate>
                        <asp:Label ID="ContainerObjectsLabel" runat="server"
                            Text='<%# Eval("ContainerObjects") %>' EnableTheming="True"></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="SchedulerID" DataType="System.Int64"
                    FilterControlAltText="Filter SchedulerID column" HeaderText="SchedulerID"
                    SortExpression="SchedulerID" UniqueName="SchedulerID" Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerType"
                    FilterControlAltText="Filter ContainerType column" HeaderText="ContainerType"
                    SortExpression="ContainerType" UniqueName="ContainerType">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerColor"
                    FilterControlAltText="Filter ContainerColor column" UniqueName="ContainerColor"
                    Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerTop" DataType="System.Int32"
                    FilterControlAltText="Filter ContainerTop column" UniqueName="ContainerTop"
                    Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerLeft" DataType="System.Int32"
                    FilterControlAltText="Filter ContainerLeft column" UniqueName="ContainerLeft"
                    Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerWidth" DataType="System.Int32"
                    FilterControlAltText="Filter ContainerWidth column" UniqueName="ContainerWidth"
                    Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ContainerHeight" DataType="System.Int32"
                    FilterControlAltText="Filter ContainerHeight column"
                    UniqueName="ContainerHeight" Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="editContainerObjects"
                    FilterControlAltText="Filter editObjects column" HeaderText="<%$ Resources:InsertObjects, Edit %>"
                    ImageUrl="~/cms/images/symbols/Edit.png" UniqueName="editContainerObjects">
                </telerik:GridButtonColumn>
                <telerik:GridTemplateColumn DataField="ContainerObjects"
                    FilterControlAltText="Filter ContainerObjectsHidden column"
                    UniqueName="ContainerObjectsHidden" Visible="False">
                    <ItemTemplate>
                        <asp:Label ID="ContainerObjectsHiddenLabel" runat="server"
                            Text='<%# Eval("ContainerObjects") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
 
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

Here is my Event:

protected void RadGridStaticContainer_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "editContainerObjects")
    {
        GridDataItem item = (GridDataItem)e.Item;
 
        staticObjectsID = Convert.ToInt64(item.GetDataKeyValue("StaticID").ToString());
        string objectType = item["ContainerType"].Text.Trim();
 
        Label lbl = item.FindControl("ContainerObjectsHiddenLabel") as Label;
        string containerObjects = lbl.Text.Trim();
 
        containerHeight = Convert.ToInt32(item["ContainerHeight"].Text.Trim());
        containerWidth = Convert.ToInt32(item["ContainerWidth"].Text.Trim());
 
        HiddenStaticWidth.Value = containerWidth.ToString();
        HiddenStaticHeight.Value = containerHeight.ToString();
 
        LoadObjectEditor(objectType, containerObjects,false);
    }
}

I don't get the values for containerheight and the other values.

What can i do that this works fine again?

Reiner








Princy
Top achievements
Rank 2
 answered on 11 Apr 2013
2 answers
192 views
I am creating rad windows from an external XML datasource. But I cannot affect the positioning or size. Below is my ASPX
<div id="dashboardContainer">
            <div id="dbTitle">
                <span>DSX Web Data Center</span>
                <div id="dbMenu">
                    <ul id="dbMenuItems">
                                <li>Open Workspace</li>
                                <li>Create Workspace</li>
                                <li>Most Recent Workspace</li>
                            </ul>
                </div>
            </div>
            <div id="dbPanelContainer" runat="server">
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
            </div>
            <div id="dbDSXLogo"></div>
        </div>

Below is my C#
private void LoadDBPanels()
    {
         
        //Get Panel Information
        string xmlFile = "http://localhost/test/dbPanelsXML.xml";
        XmlTextReader reader = new XmlTextReader(xmlFile);
        //  Loop over the XML file
        while (reader.Read())
        {   
            //  Here we check the type of the node, in this case we are looking for element   
            if (reader.NodeType == XmlNodeType.Element)   
            {       
                //  If the element is "profile"       
                if (reader.Name == "panel")       
                {
 
                    //Create panel
                    RadWindow panel = new RadWindow();
                    panel.OffsetElementID="dbPanelContainer";
                    panel.VisibleOnPageLoad = true;
                    panel.Width = new System.Web.UI.WebControls.Unit(reader.GetAttribute("PanelWidth"));
                    panel.Height = new System.Web.UI.WebControls.Unit(reader.GetAttribute("PanelHeight"));
                    panel.Title = reader.GetAttribute("PanelTitle");
                    panel.ID = reader.GetAttribute("PanelID");
                    panel.Top = new System.Web.UI.WebControls.Unit(reader.GetAttribute("PanelTop"));
                    panel.Left = new System.Web.UI.WebControls.Unit(reader.GetAttribute("PanelLeft"));
                    panel.VisibleStatusbar = false;
                    panel.RestrictionZoneID = "dbPanelContainer";
                    panel.NavigateUrl = "http://www.deslongchamps.me";
                    RadWindowManager1.Windows.Add(panel);      
                }   
            }
        }//end while
 
         
    }

Below is my XML Sample
<?xml version="1.0" encoding="utf-8" ?>
<panels>
  <panel>
    <PanelID>DBPanel1</PanelID>
    <PanelTitle>Panel 1</PanelTitle>
    <PanelWidth>0</PanelWidth>
    <PanelHeight>0</PanelHeight>
    <PanelTop>0px</PanelTop>
    <PanelLeft>0px</PanelLeft>
    <PanelData>1</PanelData>
    <PanelType>1</PanelType>
  </panel>
  <panel>
    <PanelID>DBPanel2</PanelID>
    <PanelTitle>Panel 1</PanelTitle>
    <PanelWidth>400</PanelWidth>
    <PanelHeight>1700</PanelHeight>
    <PanelTop>0</PanelTop>
    <PanelLeft>410</PanelLeft>
    <PanelData>1</PanelData>
    <PanelType>1</PanelType>
  </panel>
</panels>

Also, when you click on the window or drag the window, the elements drop down and to the left.

Any help would be great!
Michael
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
191 views
Hi,

We are currently using version 2012.2.724.40 of RadControls for ASP.NET AJAX, Windows7, and IE8.
For our intranet web application, I've set up a screen to use a RadListBox to display a list of text items for ease of set up and display, so I can automatically get the needed scroll bars and limit the height and width before scroll bars appear etc.  I am not using any of the 'Transfer' functionality and the user cannot select anything from the list.... it's just a display-only list (for now). 

While the RadListBox works perfectly for my display, my user wants to be able to copy from the resulting display to put the text list on their clipboard.  Is there anyway to do this, like with skins or CSS or anything, to make the rendered text available to a copy/paste action?

Or is there another control that I could use to accomplish this without losing the scrolling/visual display capabilities?

Thanks for any help!
Shawna
Nencho
Telerik team
 answered on 11 Apr 2013
1 answer
84 views
Hi all,

Currently I am using Grid - Client Edit with Batch Server Update like demo.

In my grid, I like to add function of Client side add new record as In-line mode style.
When search in demo and forum, only server side found.

Any idea how I make to do.

Many Thank.


Antonio Stoilkov
Telerik team
 answered on 11 Apr 2013
1 answer
74 views
Hi,

When I select a RadPanelBar item, Is there any option to show it on top of the list?

With Regards,
Jc.
Princy
Top achievements
Rank 2
 answered on 11 Apr 2013
1 answer
75 views
Hi All,

I have a RadMultiPageview and there is a RadButton outside it. From JS, is it possible to get the pageview index on client side click.

Thankyou,
Saravanan
Princy
Top achievements
Rank 2
 answered on 11 Apr 2013
3 answers
602 views
Hi,

I have a login page, in which if the user enters an username which has been already been used by somebody else to login in the application, then i want to show a confirmation message. The confirmation message has to be shown only if the user provides a valid credentials and that username is already been used for another session.
I have already written down the code for this in the code behind, but I am unable to show a confirmation box at page load. I have tried with the Page.ClientScript.RegisterClientScriptBlock() and Page.ClientScript.RegisterStartupScript() but its not working. This is my aspx page's code :

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="ERPx.Web.Login" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title>BluWare</title>
    <style type="text/css">
        *
        {
            margin: 0;
            padding: 0;
        }
        body
        {
            font-family: Calibri, Verdana, Helvetica, sans-serif;
            background: url(images/login-page-bg.jpg) top center no-repeat #c4c4c4;
            color: #3a3a3a;
        }
        .clear
        {
            clear: both;
        }
        form
        {
            width: 406px;
            margin: 170px auto 0;
        }
        fieldset
        {
            border: 0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="CheckBoxes, RadioButtons, Buttons, Textbox, Textarea, Fieldset, Label, Select, Zone, GridFormDetailsViews" />
    <telerik:RadWindowManager ID="rwmMain" runat="server" />
    <div>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%">
            <asp:Panel ID="pnlLogin" runat="server" DefaultButton="btnLogin">
                <asp:Image runat="server" ID="CompanyLogo" ImageUrl="~/Images/GenericLogo.png" Height="55px"
                    Style="position: absolute; top: 25px" />
                <table width="406px" cellspacing="10px">
                    <tr>
                        <td>
                            Email Address
                        </td>
                        <td>
                            <telerik:RadTextBox ID="txtEmailAddress" runat="server" Width="260px" MaxLength="50" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Password
                        </td>
                        <td>
                            <telerik:RadTextBox ID="txtPassword" TextMode="Password" runat="server" Width="260px"
                                MaxLength="50" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                              
                        </td>
                        <td>
                            <asp:CheckBox ID="chkRememberMe" Text="Remember Me?" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a href="RequestLogin.aspx">Request Login</a>
                        </td>
                        <td align="right">
                            <asp:Button ID="btnLogin" runat="server" Text="Login  " Width="75px" OnClick="btnLogin_Click" />
                        </td>
                    </tr>
                    <tr align="center">
                        <td colspan="2">
                            <asp:Label ID="lblError" ForeColor="Red" runat="server" Text="Invalid login. Please try again."
                                Visible="false" />
                        </td>
                    </tr>
                </table>
                <br />
                <br />
                <br />
                BluWare  <asp:Label ID="lblSoftwareVersion" runat="server" />
            </asp:Panel>
        </telerik:RadAjaxPanel>
    </div>
    </form>
</body>
</html>

protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Session.Abandon();
            FormsAuthentication.SignOut();
  
            if (IsPostBack)
            {
                if (!(String.IsNullOrEmpty(txtPassword.Text.Trim())))
                {
                    txtPassword.Attributes["value"] = txtPassword.Text;
                }
            }
        }
  
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            Users usr = new Users();
            DataTable dt = usr.ValidateUser(txtEmailAddress.Text, Encryptor.Encrypt(txtPassword.Text));
  
            if (dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                if (!bool.Parse(dr["UserSessionExists"].ToString()))
                {
                }
                else
                {
                 // Over here I am registering the starup script
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "LoginError", "confirm('Ovverride ?');", true);
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "LoginError", "confirm('Ovverride ?');");              
                }
            }
            else
            {
                ErrorMessage = "Invalid login information supplied.";
            }
        }


But the confirmation box is not showing. Please help me out !
Bibhudutta
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
79 views
Hi All,

How can I modify the Radwindow width and height in JS?

Thankyou,
Saravanan
Princy
Top achievements
Rank 2
 answered on 11 Apr 2013
1 answer
279 views
Hi,

I have a Htmlchart with 200 columns displayed as a BarSeries. The bar series is displayed with some pattern, where it is showing up with a lighter color for some columns at regular intervals( like a pattern).

I need to show all the columns in the same color without any difference in the color of the series for all columns.



Danail Vasilev
Telerik team
 answered on 11 Apr 2013
2 answers
109 views
Hi,

I have a radgrid that is used with group by expressions and it shows 3 rows. It appears I'm having browser compatibility issues. In ie part of the grid is shown to the left and the other part is off to the right. In firefox it's displayed perfectly. I hope my explanation is understood, I also attached photos if each browsers presentation. Hopefully someone can help.

Thanks,
Ron.
Marin
Telerik team
 answered on 11 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?