Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
203 views
Hi,

In RadGrid, If we want the columns in our grid to be resizable, set the ClientSettings.Resizing.AllowColumnResize property to True.

Is there any way or property in RadPivotGrid so we can resize our column and row of Pivotgrid?

Is Pivotgrid support column resize on client same as RadGrid support?

Thanks.
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Aug 2013
4 answers
159 views

Hi,

I have a requirement in my project to select a file from local machine

Scenario:

when a button is clicked, user should see a browser window to choose a file,
and user can select only one file, and user should be accessible to all the drives,desktop as in windows browser
and finally we need the selected file path with file name to manipulate that file.

Can you pls provide the code for this, I am working on this almost one week but unable get the solution

Regards,
Arumugam

Hristo Valyavicharski
Telerik team
 answered on 05 Aug 2013
1 answer
74 views
Hi,
I'm new to Telerik.  Virtually all of the pages I work with are actually user controls, being built entirely dynamically, usually in OnInit.  I'm finding it hard to get the Grid (first control I've tried) to behave in this situation.  Any client actions performed don't seem to produce the intended result.  For instance, Paging just stays on Page 1, Page Size does not take, etc.

You'll notice I'm using the Ajax Panel, but I've tried it without, as well.  Thought it might have to do with ViewState/Postback and you can see commented code related to this, but all the permutations I've tried produce the same behavior.

Most of this code was copied and pasted from Telerik demos, primarily the sample at http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html#Section3.

Thanks in advance for your feedback.

JD

   protected void _radGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            //if (Page.IsPostBack)
            //    return;
 
            string connString = "trust me, the connection string works;";
 
            _connection = new SqlConnection();
            _connection.ConnectionString = connString; // connectionString.ConnectionString;
            _connection.Open();
 
            using (SqlCommand command = _connection.CreateCommand())
            {
 
                command.CommandText = "dbo.Adddress_ListByCountry";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddWithValue("@CountryCode", "FRA");
 
                SqlDataReader reader = command.ExecuteReader();
 
                ((RadGrid)source).DataSource = reader;
            }
             
 
        }
 
        protected void _radGrid1_DataBound(object sender, EventArgs e)
        {
            if (_connection.State == ConnectionState.Open)
            {
                _connection.Close();
            }
        }
 
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
 
            _radGrid1 = DefineGridStructure();
 
            _radAjaxLoadingPanel = new RadAjaxLoadingPanel();
            _radAjaxLoadingPanel.ID = "_radAjaxLoadingPanel";
 
            _radAjaxManager = new RadAjaxManager();
            _radAjaxManager.ID = "_radAjaxManager";
            _radAjaxManager.DefaultLoadingPanelID = "_radAjaxLoadingPanel";
 
            this.Controls.Add(_radAjaxManager);
            this.Controls.Add(_radAjaxLoadingPanel);
 
            AjaxSetting setting = new AjaxSetting();
            AjaxUpdatedControl target = new AjaxUpdatedControl(_radGrid1.ID, _radAjaxLoadingPanel.ID);
            setting.UpdatedControls.Add(target);
            setting.AjaxControlID = _radGrid1.ID;
            _radAjaxManager.AjaxSettings.Add(setting);
 
            _gridPanel = new Panel();
            _gridPanel.ID = "_gridPanel";
 
            _gridPanel.Controls.Add(_radGrid1);
            this.Controls.Add(_gridPanel);
 
             
 
        }
 
        private RadGrid DefineGridStructure()
        {
            RadGrid radGrid1 = new RadGrid();
            radGrid1.Skin = "Default";
            radGrid1.Width = Unit.Percentage(100);
            radGrid1.PageSize = 15;
            radGrid1.AllowPaging = true;
            radGrid1.AutoGenerateColumns = false;
            radGrid1.ID = "_radGrid1";
            radGrid1.DataBound += _radGrid1_DataBound;
            radGrid1.NeedDataSource += _radGrid1_NeedDataSource;
            radGrid1.AllowPaging = true;
            //radGrid1.EnableViewState = true;
 
            //Add columns
            GridBoundColumn boundColumn;
            boundColumn = new GridBoundColumn();
            boundColumn.DataField = "AddressId";
            boundColumn.HeaderText = "Address ID";
            radGrid1.MasterTableView.Columns.Add(boundColumn);
 
            boundColumn = new GridBoundColumn();
            boundColumn.DataField = "AddressText";
            boundColumn.HeaderText = "Address";
            radGrid1.MasterTableView.Columns.Add(boundColumn);
 
            return radGrid1;
        }
Andrey
Telerik team
 answered on 05 Aug 2013
1 answer
143 views
Hi,
i have some problems with radconfirm in contextmenu of a treeview.
In treeview i want to delete node when click on "Delete" contextemenuitem - I pop up a client side radconfirm dialog.
radconfirm('Are you sure you want to delete this folder: ' + treeNode.get_text(),
confirmCallBackFn, 330, 180,
null, 'Folder-Delete');
if user click "OK" i need to execute the server side code
RadTreeView1_ContextMenu1ItemClick
but this event get not hit
function confirmCallBackFn(arg) {
 
    //the user clicked OK
    if (arg)
    {
        __doPostBack('<%= RadTreeView1ContextMenu1.Items(3).UniqueId%>', '');
     }
 
}
Help please
Shinu
Top achievements
Rank 2
 answered on 05 Aug 2013
2 answers
83 views
Hi there,

I'm using Telerik RadControls for ASP.NET version v.2013.2.717.45 on Internet Explorer 8 using Visual Studio 2012.

I've been working on a RadHtmlChart that has 3 Column Series (stacked) and 1 Line Series.  The Chart is databound and the data representation, as well as everything else, is working just fine for the chart.  The only issue I have now is that when I added the Line Series to the Chart (thereby making the Chart a mixed series chart), there is a Jscript error when a user mouses over the Legend.  The error is:

'options' is null or not an object

As soon as I remove the Line Series, the error goes away.

Any advice would be greatly appreciated!

Here is my RadHtmlChart:

<%@ Page Language="VB" CodeFile="ResGoalCharts_Bare.aspx.vb" Inherits="Problems_Problem_Resolution_Goal" %>
  
<html>
<head runat="server">
</head>
<body>
    <form id="Form1" runat="server">
        <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
        </telerik:RadScriptBlock>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true">
        </telerik:RadScriptManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
        <asp:HiddenField ID="HiddenField_Owner_Emp_Id" runat="server" />
        <asp:HiddenField ID="HiddenField_Risk" runat="server" />
        <asp:HiddenField ID="HiddenField_OwningOrg" runat="server" />
        <asp:HiddenField ID="HiddenField_RollUp" runat="server" />
  
        <telerik:RadHtmlChart ID="RadHtmlChart_GoalTrend1x" runat="server" Width="800" Height="450">
            <PlotArea>
                <Series>
                    <telerik:ColumnSeries DataFieldY="WITHIN_1X_GOAL_PCT" Stacked="true" Name="Within Goal">
                        <LabelsAppearance Visible="false"></LabelsAppearance>
                        <TooltipsAppearance ClientTemplate="Count: #=dataItem.WITHIN_1X_GOAL#" Color="GhostWhite" />
                        <Appearance>
                            <FillStyle BackgroundColor="Green" />
                        </Appearance>
                    </telerik:ColumnSeries>
                    <telerik:ColumnSeries DataFieldY="WITHIN_1X_OUT_PCT" Stacked="true" Name="Outside Goal">
                        <LabelsAppearance Visible="false"></LabelsAppearance>
                        <Appearance>
                            <FillStyle BackgroundColor="Red" />
                        </Appearance>
                        <TooltipsAppearance ClientTemplate="Count: #=dataItem.OUTSIDE_1X_GOALS#" Color="GhostWhite" />
                    </telerik:ColumnSeries>
                    <telerik:ColumnSeries DataFieldY="OTHER_PCT" Stacked="true" Name="In Progress">
                        <LabelsAppearance Visible="false"></LabelsAppearance>
                        <TooltipsAppearance ClientTemplate="Count: #=dataItem.OTHER#" Color="Black" />
                        <Appearance>
                            <FillStyle BackgroundColor="Yellow" />
                        </Appearance>
                    </telerik:ColumnSeries>
                    <telerik:LineSeries DataFieldY="GOAL_1X" MissingValues="Interpolate" Name="1x Goal (80%)">
                        <LineAppearance Width="2" />
                        <LabelsAppearance Visible="false" />
                        <MarkersAppearance Visible="false" />
                        <TooltipsAppearance Visible="false" />
                    </telerik:LineSeries>
                </Series>
                <XAxis MajorTickType="Outside" MinorTickType="None" Visible="true" DataLabelsField="OPEN_PERIOD">
                    <MinorGridLines Visible="false" />
                    <MajorGridLines Visible="false" />
                    <TitleAppearance Visible="true">
                    </TitleAppearance>
                    <LabelsAppearance RotationAngle="-45" />
                </XAxis>
                <YAxis MaxValue="100" MinorTickType="None" MajorTickType="None">
                    <MinorGridLines Visible="false" />
                    <MajorGridLines Visible="false" />
                    <TitleAppearance Text="% Of Total">
                    </TitleAppearance>
                    <LabelsAppearance DataFormatString="{0}%">
                    </LabelsAppearance>
                </YAxis>
            </PlotArea>
            <Legend>
                <Appearance Visible="true" Position="Bottom">
                </Appearance>
            </Legend>
            <ChartTitle Text="Goal Trend Report">
            </ChartTitle>
        </telerik:RadHtmlChart>
    </form>
</body>
</html>

Todd
Top achievements
Rank 1
 answered on 05 Aug 2013
2 answers
1.1K+ views
Hi all,

I'm hoping someone out there may be able to help with this issue I'm having.

Scenario:
I have a page containing a radsplitter which is divided into 3 main panes: Across the top, down the left-hand side and the third is the main content panel.

Within the left-hand pane I have nested splitters and a panelbar, using templated panels that contain ajaxified radgrids (using advanced binding).  In the main content pane I have a tabstrip and multipage.

No controls are being added dynamically/programmatically, other than tabs being added using client-side scripts from within the main content pane.

Now the problem:
If I do not open any tabs everything works great - the grids page nicely and everyone is happy.
If, however, I open a tab, after 3-4 paging operations on the grids I get the dreaded Multiple controls with the same ID were found. FindControl requires that controls have unique IDs.

Now I *know* there are no controls being added between the ajax paging postbacks.  And the error only occurs after 3-4 actions taking place on the grid as opposed to immediately.  Disabling ajax I still continue to get the error.
I have no RadAjaxPanels anywhere - everything is hooked up using the RadAjaxManager.
If I remove the grid outside of all the radsplitter/panelbar elements the problem persists.
I have gone through all my code and made absolutely certain that every control has a unique ID (radcodeblocks, pageviews etc).
There are no pageLoad() or document.ready functions being used.

I'm completely stumped.  the stack trace shows that the problem occurs after the tabstrip PreRender process:
[HttpException (0x80004005): Multiple controls with the same ID 'ctl01' were found. FindControl requires that controls have unique IDs.]
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +12651760
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
   System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +317
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +320
   Telerik.Web.UI.RadTabStrip.OnPreRender(EventArgs e) +103

I've reviewed this post http://www.telerik.com/help/aspnet-ajax/ajax-content-type.html but it's not applicable because I'm not dyanmically adding controls.  I've also tried the javscript from this post http://www.telerik.com/help/aspnet-ajax/tabstrip-faq.html but still the problem persists.

Can anyone offer any suggestions about where I should should look next?

Help!

Rich
Angel Petrov
Telerik team
 answered on 05 Aug 2013
1 answer
60 views
Hi All,

I need to make to do some thing like this.

I need to add image/thumbnails on click on each box.

Let me know if someone knows how to do it.


Andrey
Telerik team
 answered on 05 Aug 2013
4 answers
230 views
I want to attach a context menu to each radgrid row runtime, as each row may have a different context menu.  I don't want to hard code the menu items in the context menu.

I am having a hard time figuring out how to do this.

Here is the code.

 Dim rmi3 As New RadMenuItem()

                Dim rcm3 As New RadContextMenu()

  Dim editZone As ContextMenuControlTarget = New Telerik.Web.UI.ContextMenuControlTarget()

                rmi3.Text = "Preparer"

                rmi3.Value = "1"

                rcm3.ID = "Role" & i

                rcm3.Items.Add(rmi3)

                Dim rmi4 As New RadMenuItem()

                rmi4.Text = "Reviewer"

                rmi4.Value = "2"

                rcm3.ID = "Role" & i

                rcm3.Items.Add(rmi4)

                Dim rmi5 As New RadMenuItem()

                rmi5.Text = "View PDF"

                rmi5.Value = "3"

                rcm3.ID = "Role" & i

                rcm3.Items.Add(rmi5)

                editZone.ControlID = row.dataitem("usqnumber")

                rcm3.Targets.Add(editZone)

                Me.Controls.Add(rcm3)

Andrey
Telerik team
 answered on 05 Aug 2013
1 answer
118 views
Hello,

I've uploaded files to Azure blobs using Telerik controls with the AsyncUpload control. The UploadedFile.InputStream works great with Azure's blob upload.

Is there a similar way to access the image stored in the ImageEditor control? My current idea is to save the file to the local VM and then use that stream to upload the blob.

Edit: Issue now is that the image is being saved from the ImageEditor control but it is not the edited image it is just the original - I think because I'm using a server side call.

I am using the most current version of Telerik ASP.NET controls on the most recent version of Chrome for Windows but would want the solution to work across all modern browsers (Chrome, FF, IE9+).

Thank you,

Shaw
Vessy
Telerik team
 answered on 05 Aug 2013
1 answer
113 views
Hi Team,

We have a scenario where the entire grid will be editable and the grid will have pagination.

What we are trying to achieve is - Let say user made changes to data on a page 1 and then if user clicks on any other page, we want to show a confirmation dialogue "Do you want to save the changes made..." with Yes - No - Cancel button.
If user selects 'Yes' then data will be saved and navigate to selected page
If user selects 'No' then data will not be saved and navigate to selected page
If user selects 'Cancel' then grid will remain on same page with all the edited data.

I assume if we have OnPageIndexChanging event in RadGrid then it could have been achived, but RadGrid only have OnPageIndexChanged event.

Kindly help on this. We are using Q3, 2011 version.

Regards
Tripati Patro
Angel Petrov
Telerik team
 answered on 05 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?