Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
109 views
Hello Telerik,

I have quite a simple splitter, which makes scrollbars after you move the splitter. (before that it is ok with no scrollbars).
It happens only on Firefox and Chrome. Surprisingly, i.e. seems to manage it nicely.

I guess it is a styling issue.

here is the code (simple aspx with no code behind):
<%@ Page Language="C#" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<script runat="server">
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
    }
</script>
 
<head id="Head1" runat="server">
<title></title>
<style>
html, body, form
{
    height: 100%;
    margin: 0px;
    padding: 0px;
    overflow: hidden;
}
body
{
    background-color:#FFFFFF;
    font-size:12px;
    font-family:Arial;
    direction:rtl;
}
   #main
    {
        height: 100%
    }
</style>
</head>
<body>
    <form id="form2" runat="server">
        <asp:ScriptManager ID="ScriptManager" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            </Scripts>
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableOutsideScripts="true" EnablePageHeadUpdate="False"> </telerik:RadAjaxManager>
        <div id="main">
                <asp:Panel runat="server" Height="45">
                    header    
                </asp:Panel>
                <asp:Panel runat="server"  Height="100%">
                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
                    <telerik:RadSplitter ID="NestedSplitter" runat="server"  LiveResize="true" Height="100%" Width="100%">
                        <telerik:RadPane ID="LeftPane" runat="server" Width="200" MinWidth="150" MaxWidth="400">
                            main menu
                        </telerik:RadPane>
                        <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Backward" />
                         <telerik:RadPane ID="ContentPane" runat="server">
                             <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                                <telerik:RadSplitter ID="MainSplitter" runat="server"  Height="100%"  Width="100%" Orientation="Horizontal">
                                    <telerik:RadPane ID="TopPane" runat="server" Scrolling="Y" Height="30%" MinHeight="100" CssClass="TopPane">
                                        top content
                                    </telerik:RadPane>
                                    <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" />
                                    <telerik:RadPane ID="MainPane" runat="server" Scrolling="Y" Height="70%">
                                        edit content
                                    </telerik:RadPane>
                                </telerik:RadSplitter>
                            </telerik:RadAjaxPanel>
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </asp:Panel>
        </div>
    </form>
</body>
</html>

What do you advice to change?

Many thanks,
 -Itye
Dobromir
Telerik team
 answered on 08 Dec 2011
7 answers
99 views
Hi,

I have a tree which is populated by LoadOnDemand (wcf). The root nodes are created server-side when the tree is initialized (initalize is only called once - when the page is not in PostBack).
After a postback, the root nodes don't have a text and an icon anymore. But the child nodes are all ok.

In the screenshot there are several RadDocks. But meanwhile I tested some scenarios and I can tell you that it always happens when
the tree is in an UpdatePanel.

If I add the tree directly to the page, everything is fine after a postback. If I add the tree to an UpdatePanel, the described problem occurs.

In the screenshot the RadDocks are recreated after a postback (and therefor no Initialize is called). Just the left one is the newly created tree which is also initialized.
JP
Top achievements
Rank 1
 answered on 08 Dec 2011
1 answer
110 views
Hey,

Dynamically adding GridEditCommandColumns to my Grid in attempt to be able to edit chosen lines in a grid. The code to add them is below.
If ViewState("MasterEdit") Is Nothing Or Not ViewState("MasterEdit") = True Then
    Dim editCol As GridEditCommandColumn
    editCol = New GridEditCommandColumn
    editCol.UniqueName = "MasterEditColumn"
    editCol.HeaderText = ""
    editCol.HeaderStyle.Width = 20
    editCol.ButtonType = GridButtonColumnType.ImageButton
    editCol.EditImageUrl = "~\img\edit.gif"
    editCol.EditFormColumnIndex = 0
    rgdTable.MasterTableView.Columns.Add(editCol)
    ViewState.Add("MasterEdit", True)
End If

I do the same thing for the DetailTables. The problem I get is on the DetailTables the column just disappears entirely and on the MasterTable I get the following error:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An error has occurred because a control with id 'ctl00$CPH1$ValueAddInfo$rgdTable$ctl00$ctl04$EditButton' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error.

There doesn't seem to be any way to set the ID of the controls, so I can't take the advice that the error message suggests.
Antonio Stoilkov
Telerik team
 answered on 08 Dec 2011
3 answers
115 views
I have following problem with the RADGRID, when I put an ImageButton to delete I get error, that can not be because with
 a LinkButton working properly. I leave the code so that I can help.


thank you very much.

Codigo HTML:
  <telerik:RadGrid ID="GvwMacroprocesos" runat="server" AllowFilteringByColumn="True"
                                    AllowPaging="True" AutoGenerateColumns="False" GridLines="None" Skin="Hay" Width="809px"
                                    OnDeleteCommand="GvwMacroprocesos_DeleteCommand" OnItemCommand="GvwMacroprocesos_ItemCommand"
                                    OnItemDeleted="RadGrid1_ItemDeleted">
                                    <MasterTableView>
                                        <CommandItemSettings ExportToPdfText="Export to Pdf" />
                                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                        </RowIndicatorColumn>
                                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                        </ExpandCollapseColumn>
                                        <Columns>
                                            <telerik:GridButtonColumn CommandName="Editar" Text="Editar" UniqueName="Editar">
                                            </telerik:GridButtonColumn>
                                            <telerik:GridBoundColumn DataField="NombreMacroproceso" HeaderText="Macroproceso"
                                                UniqueName="column2">
                                                <HeaderStyle Font-Names="Verdana" Font-Size="10pt" HorizontalAlign="Center" Width="647px" />
                                                <ItemStyle Font-Names="Verdana" Font-Size="10pt" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                                                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                                                ImageUrl="~/App_Themes/Skin/ImgBotones/Elminar.jpg" UniqueName="DeleteColumn">
                                                <ItemStyle HorizontalAlign="Center" />
                                            </telerik:GridButtonColumn>
                                        </Columns>
                                        <EditFormSettings>
                                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                            </EditColumn>
                                        </EditFormSettings>
                                    </MasterTableView>
                                    <PagerStyle Mode="NextPrev" />
                                    <ClientSettings>
                                        <Selecting AllowRowSelect="True" />
                                    </ClientSettings>
                                    <FilterMenu EnableImageSprites="False">
                                    </FilterMenu>
                                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Hay">
                                    </HeaderContextMenu>
                                </telerik:RadGrid>


Codigo aspx:
 protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)
    {
        GridDataItem dataItem = (GridDataItem)e.Item;
        String id = dataItem.GetDataKeyValue("CodigoMacroproceso").ToString();
         object[] opParametros = new Object[3];
        if (e.Exception != null)
        {
                opParametros[0] = (int)dataItem .GetDataKeyValue("CodigoCliente");
                opParametros[1] = (int)dataitem.GetDataKeyValue("CodigoCompania");
                opParametros[2] = (int)dataitem.GetDataKeyValue("CodigoMacroproceso");
              
                    _fwAccesoDatos.ExecuteNonQuery(StrCadenaConexion, "spEliminarMacroproceso", opParametros);
        }
        else
        {
            ///
        }
    }






Error
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback
 or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> 
in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this 
feature verifies that arguments to postback or callback events originate from the server control that 
originally rendered them.  If the data is valid and expected, use the ClientScriptManager.
RegisterForEventValidation method in order to register the postback or callback data for validation.


Iana Tsolova
Telerik team
 answered on 08 Dec 2011
2 answers
86 views
I have created a web page using a Telerik Grid bound to a SqlDataSource to allow users to page through some data.  Everything works correctly on my local machine, but when I publish it to the production server, it shows the first page of data but nothing else.  Clicking on the navigation links only brings back the first page as does attempting to filter or sort the data.  What could be causing this?

Grid Code:


<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"></asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"></asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"></asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadGrid ID="CustomerInfoGrid" runat="server"
        AutoGenerateColumns="False" CellSpacing="0" DataSourceID="CRMData"
        GridLines="None" AllowPaging="True" PageSize="20"
        AllowFilteringByColumn="True"
        AllowSorting="True">
        <MasterTableView DataKeyNames="CustomerID" DataSourceID="CRMData">
            <CommandItemSettings ExportToPdfText="Export to PDF"></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:GridTemplateColumn UniqueName="GenerateSupportCode" AllowFiltering="False" Groupable="False" HeaderText="Support Code"
                    Reorderable="False" ShowSortIcon="False"></telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="CustomerID" DataType="System.Int32" FilterControlAltText="Filter CustomerID column" HeaderText="Customer ID"
                    ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CustomerName" FilterControlAltText="Filter CustomerName column" HeaderText="Customer Name"
                    SortExpression="CustomerName" UniqueName="CustomerName"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FingerprintData"
                    FilterControlAltText="Filter CustomerName column" Display="False"
                    SortExpression="FingerprintData" UniqueName="FingerprintData"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="ClearFingerprintDataColumn"
                    AllowFiltering="False" Groupable="False" HeaderText="Fingerprint Data"
                    Reorderable="False" SortExpression="FingerprintData"></telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="LicenseData"
                    FilterControlAltText="Filter CustomerName column" Display="False"
                    SortExpression="LicenseData" UniqueName="LicenseData"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="ClearLicenseDataColumn"
                    AllowFiltering="False" Groupable="False" HeaderText="License Data"
                    Reorderable="False" SortExpression="LicenseData"></telerik:GridTemplateColumn>
            </Columns>
         
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            </EditFormSettings>
        </MasterTableView>
     
        <PagerStyle Position="TopAndBottom" />
     
        <FilterMenu EnableImageSprites="False">
            <WebServiceSettings>
                <ODataSettings InitialContainerName=""></ODataSettings>
            </WebServiceSettings>
        </FilterMenu>
 
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            <WebServiceSettings>
                <ODataSettings InitialContainerName=""></ODataSettings>
            </WebServiceSettings>
        </HeaderContextMenu>
    </telerik:RadGrid>
 
    <asp:SqlDataSource ID="CRMData" runat="server"
        ConnectionString="<%$ ConnectionStrings:CRMConnectionString %>"
        SelectCommand="SELECT [CustomerName], [CustomerID], [LicenseData], [FingerprintData] FROM [Customers] WHERE ([Deleted] = @Deleted) ORDER BY [CustomerName]">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="Deleted" Type="Byte" />
        </SelectParameters>
    </asp:SqlDataSource>
</form>

Codebehind:

protected void CustomerInfoGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        Button btn = null;
        GridDataItem dataItem = e.Item as GridDataItem;
 
        btn = new Button();
        btn.OnClientClick = String.Format("return GetSupportCode({0})", dataItem["CustomerID"].Text);
        btn.Text = "Generate";
        dataItem["GenerateSupportCode"].Controls.Add(btn);
 
        dataItem["FingerprintData"].Text = dataItem["FingerprintData"].Text.Replace(" ", "");
        if (!String.IsNullOrEmpty(dataItem["FingerprintData"].Text.Trim()))
        {
            btn = new Button();
            btn.OnClientClick = String.Format("return ClearFingerprintData({0})", dataItem["CustomerID"].Text);
            btn.Text = "Clear";
            dataItem["ClearFingerprintDataColumn"].Controls.Add(btn);
        }
 
        dataItem["LicenseData"].Text = dataItem["LicenseData"].Text.Replace(" ", "");
        if (!String.IsNullOrEmpty(dataItem["LicenseData"].Text.Trim()))
        {
            btn = new Button();
            btn.OnClientClick = String.Format("return ClearLicenseData({0})", dataItem["CustomerID"].Text);
            btn.Text = "Clear";
            dataItem["ClearLicenseDataColumn"].Controls.Add(btn);
        }
 
    }
}

Iana Tsolova
Telerik team
 answered on 08 Dec 2011
1 answer
248 views
Hi, i have a chart which normally has a x axis with a date value.
Under certain circumstances, I'd like to group the results and show the monthly accumulated values, and show the month name

In the data I have both a date field and a month field, and I can easily group by the month field, but I can't seem to format it so that it show the month name rather than the month value.

Can you please point me in the right direction?

This is what I have so far:
Private Sub chart1_ItemDataBinding(ByVal sender As Object, ByVal e As EventArgs) Handles Chart1.ItemDataBinding
 
    Chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = -90
 
    If Me.ReportParameters("Time").Value.ToString.Trim = "Daily" Then
        Chart1.PlotArea.XAxis.DataLabelsColumn = "userlogdate"
    ElseIf Me.ReportParameters("Time").Value.ToString.Trim = "Yearly" Then
        Chart1.PlotArea.XAxis.DataLabelsColumn = "year"
        Chart1.DataGroupColumn = "year"
    ElseIf Me.ReportParameters("Time").Value.ToString.Trim = "Monthly" Then
        Chart1.DataGroupColumn = "month"
        Chart1.PlotArea.XAxis.DataLabelsColumn = "month"
        Chart1.PlotArea.XAxis.Appearance.ValueFormat = Charting.Styles.ChartValueFormat.ShortDate
        Chart1.PlotArea.XAxis.Appearance.CustomFormat = ???
 
    End If
 
 
End Sub

Thanks for you help
Nikolay
Telerik team
 answered on 08 Dec 2011
2 answers
83 views
I am using datasource to bind the tree initially using DataBind() method. I am able to set Text, Image using RadTreeNodeBinding but not able to set custom attributes directly. Is there any way I can add the values to the node using datasource?
Bozhidar
Telerik team
 answered on 08 Dec 2011
1 answer
89 views
Hi,

I am using a Tabstrip with a multipage, navigating between pageviews by clicking the tabs.
On tab2 I placed a usercontrol containing a Radlistbox. This is rendered fine when I open the webpage with tab2 selected, it shows the 8 items inside.

But when I open the webpage with another tab selected, and then switch to tab2, the Radlistbox shows only 2 items. 
This only happens in IE9, other version and browsers work fine. I use Telerik version 2011.2.712.35.

Has anyone seen this before and knows how to solve it?

Annet


Bozhidar
Telerik team
 answered on 08 Dec 2011
4 answers
166 views
Hi,

I need to display limited characters only in grid.I followed the following thread and it is working.
http://www.telerik.com/community/forums/aspnet/grid/display-limited-characters-in-radgrid.aspx


Now for diffreent resolutions and monitors this hardcoded character limit is not going well.

So i want to get the column width and number of characters fit to that .I will give the column widths in %.

I want something like if (no:of characters in the column > column width)  then
column.text=truncate till it fits in that column+"..."

Also if there is any other way  to achieve this plz tell me...

Could any body please help me..
Thanks.
Winni
Top achievements
Rank 1
 answered on 08 Dec 2011
1 answer
82 views
i have one table like -receipt transaction one coloumn name is headtype within headtype i have like schoolfee duefee and hostelfee is there. i have to bind schoolfee,due fee,hostelfee in rad pi chart
Bartholomeo Rocca
Top achievements
Rank 1
 answered on 08 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?