Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
58 views
Does anyone know how I can set the position of the dropdown of a combobox to the top left of the screen?
Lance
Top achievements
Rank 1
 answered on 23 May 2011
2 answers
117 views
Hi,

I would to display timetable for 10 working days. 
Week 1, the data will be differentiate with for example: Wed 1
Week 2, the data will be differentiate with for example: Wed 2

Then once the week 2 done, the occurrence will start all over again from week 1

Currently, all week 1 and week 2 is displaying in same week (week 1)
Mark de Torres
Top achievements
Rank 1
 answered on 23 May 2011
1 answer
72 views

hi

I can not delete rows in RadGrid

any body can help me?

my database code is:

CREATE TABLE [test](
    [c1] [int] IDENTITY(1,1) NOT NULL CONSTRAINT [PK_test] PRIMARY KEY,
    [c2] [nvarchar](50) NULL,
)
insert [test]
    ([c2])
values
    ('aaa'), ('bbb'), ('ccc'), ('ddd'), ('eee')

my aspx code is:

<%@ Page Language="C#" %>
<!DOCTYPE html>
<head runat="server">
    <title>test</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <tlk:RadScriptManager ID="RadScriptManager1" runat="server" />
        <tlk:RadGrid ID="RadGrid1" runat="server" AutoGenerateDeleteColumn="True" DataSourceID="data">
            <MasterTableView DataSourceID="data" DataKeyNames="c1">
            </MasterTableView>
        </tlk:RadGrid>
        <asp:SqlDataSource ID="data" runat="server"
            ConnectionString="<%$ ConnectionStrings:database %>" 
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [test]"
            DeleteCommand="DELETE FROM [test] WHERE [c1] = @c1">
            <DeleteParameters>
                <asp:Parameter Name="c1" Type="Int32" />
            </DeleteParameters>
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>

Shinu
Top achievements
Rank 2
 answered on 23 May 2011
1 answer
1.4K+ views
Hi,

I'm using a rad combo box control in rad grid with an itemtemplate. Can you tell me how to get the row index on selected index change?

Thanks,
Princy
Top achievements
Rank 2
 answered on 23 May 2011
2 answers
262 views
Hi

I have long series names in a legend so I have set AutoTextWrap = true, but they wrap too much!
1 of the series names is wrapping over 3 lines instead of 2 lines, so I thought I'd make the legend box wider to accomodate it, but it ignores everything I've tried. I've attached a pic.
These lines do nothing:
  • RadChart1.Legend.Appearance.Dimensions.Width = new Telerik.Charting.Styles.Unit(50);
  • RadChart1.Legend.Appearance.ItemTextAppearance.Dimensions.Width = new Telerik.Charting.Styles.Unit(150);
while this line makes the legend disappear:
  • RadChart1.Legend.Appearance.Dimensions.AutoSize = false;

Here is the markup:
<telerik:RadChart ID="RadChart1" runat="server"
     Height="500px"
     Width="1200px"
     SkinsOverrideStyles="false"      
     ChartTitle-Visible="false">
</telerik:RadChart>

and here is the relevant code behind:
RadChart1.Chart.Appearance.Border.Visible = false;
RadChart1.Appearance.TextQuality = Telerik.Charting.Styles.TextQuality.ClearTypeGridFit;
RadChart1.PlotArea.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
RadChart1.PlotArea.Appearance.FillStyle.MainColor = Color.White;
RadChart1.PlotArea.Appearance.Border.Color = Color.LightGray;
RadChart1.PlotArea.Appearance.Dimensions.Margins.Top = new Telerik.Charting.Styles.Unit(5);
RadChart1.PlotArea.Appearance.Dimensions.Margins.Right = new Telerik.Charting.Styles.Unit(200);
RadChart1.PlotArea.Appearance.Dimensions.Margins.Left = new Telerik.Charting.Styles.Unit(90);
RadChart1.PlotArea.Appearance.Dimensions.Margins.Bottom = new Telerik.Charting.Styles.Unit(60);
 
RadChart1.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight;
RadChart1.Legend.Appearance.ItemTextAppearance.AutoTextWrap = Telerik.Charting.Styles.AutoTextWrap.True;
 
RadChart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;
RadChart1.PlotArea.XAxis.Appearance.CustomFormat = "d MMM";
RadChart1.PlotArea.XAxis.DataLabelsColumn = "SHIFT_DATE";
RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black;
RadChart1.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Normal;
RadChart1.PlotArea.XAxis.Appearance.LabelAppearance.Dimensions.Margins.Top = new Telerik.Charting.Styles.Unit(5);
RadChart1.PlotArea.XAxis.IsZeroBased = false;
RadChart1.PlotArea.XAxis.AddRange(startdate.ToOADate(), enddate.ToOADate(), 1);
RadChart1.PlotArea.XAxis.LabelStep = Convert.ToInt32(Math.Floor(Convert.ToDecimal((enddate - startdate).Days / 8)));
 
RadChart1.PlotArea.YAxis.Appearance.MajorGridLines.Visible = true;
RadChart1.PlotArea.YAxis.Appearance.MajorGridLines.Color = Color.Gray;
RadChart1.PlotArea.YAxis.IsZeroBased = true;
RadChart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Metres (RC)";
RadChart1.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = Color.Black;
RadChart1.PlotArea.YAxis.AxisLabel.Visible = true;
RadChart1.PlotArea.YAxis.Appearance.CustomFormat = "N0";
RadChart1.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black;
 
RadChart1.PlotArea.YAxis2.IsZeroBased = true;
RadChart1.PlotArea.YAxis2.AxisLabel.TextBlock.Text = "m / day";
RadChart1.PlotArea.YAxis2.AxisLabel.TextBlock.Appearance.TextProperties.Color = Color.Black;
RadChart1.PlotArea.YAxis2.AxisLabel.Visible = true;
RadChart1.PlotArea.YAxis2.Appearance.CustomFormat = "N0";
RadChart1.PlotArea.YAxis2.Appearance.TextAppearance.TextProperties.Color = Color.Black;
RadChart1.PlotArea.YAxis2.AxisLabel.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Left;

What am I doing wrong?
Jeremy
Top achievements
Rank 1
 answered on 23 May 2011
1 answer
54 views
Is there any in-built support to save filters and load them back instead of specifying filters everytime?
Dhawal
Top achievements
Rank 1
 answered on 22 May 2011
13 answers
364 views
Hi,

I'm inserting row's on the client side using a web service to insert a new row into the database and javascript to rebind the grid.
But when row is inserted, it only show's a plan grey row instead of a row with 5 columns and each column should have a textbox
control. When I check the HTML source I notice the row I inserted has a class="rgAltRow" i think this is my problem because the
other rows has class="rgEditRow". I will attach 2 screen shots one with the grid and the other the browser source code. I await
your assistance.
function updateChanges() {
             ItemsService.AddNewItem(updateGrid);
         }
         function updateGrid(result) {
             var tableView = $find("<%= grdInvoiceItems.ClientID %>").get_masterTableView();
             tableView.set_dataSource(result);
             tableView.rebind();
         }
Web service
[WebMethod(EnableSession = true)]
 public List<InvoiceItemsDetails> AddNewItem()
 {
     Invoice.InsertInvoiceItems(string.Empty, string.Empty, 0, 0,
        0, 0, 0, 0, 1001);
 
     return Invoice.GetInvoiceItems(1001);
 }


Thanks,
Ron.
Ron
Top achievements
Rank 1
 answered on 22 May 2011
3 answers
176 views
I have a radTreeView control in a ContentPage.  I am loading the nodes dynamically at runtime.  My MasterPage contains a radAjaxPanel and the ContentPane is contained within the panel, so all of my Content Pages are ajaxified.  This has been working great up until now.

When I click on a node in my radTreeView, the NodeClick event is fired THE FIRST TIME.  If I subsequently click on another node, the event is not fired and I'm getting the following error:

Sys.WebForms.PageRequestManagerServerErrorException:  An unknown error occurred while processing the request to the server.  The status code returned from the server was: 500

I've seen other posts that say to load my nodes using ExpandedMode = TreeNodeExpandedMode.ServerSide, but that didn't seem to do anything.  I saw some other posts that said to add EnablePartialRendering="false" to my radScriptManager.  That fixed the problem, but of course now nothing is ajaxified anymore. 

Then I remembered that on another page in my in my application I have a radUploadFile control.  This doesn't work properly when ajaxified, so I had to disable Ajax for this control.  I decided to do the same thing for my radTreeView and it worked just fine (if you need to see how I did this please let me know).

So, that's where I stand right now.  My radTreeView is not utilizing Ajax, but I'd like it to if I can.  Any idea how to fix this issue?  Again, I have no problems with expanding nodes.  My problem is that the NodeClick event is not firing EXCEPT FOR THE FIRST TIME when ajaxified.

Thanks.

Steve








Deniz
Top achievements
Rank 1
 answered on 22 May 2011
2 answers
87 views
Hi,
I've encountered a ridiculous problem - occuring when using IE only (IE 8; I've not tested other IE versions); NOT occuring when using FireFox, Opera, Chrome or Safari.
My page consists of two UserControls:
<asp:Panel ID="pnlMain" runat="server">
  <uc1:ProcessGridViewEmb ID="embGrid" runat="server" />
  <uc1t:ProcessTreeViewEmb ID="embTree" runat="server" />
</asp:Panel>
There are some scripts loaded above this markup (RadScriptManager; Core.js and jQuery.js of yours plus some my scripts).
embGrid consists of two tabs (RadMultiPage + RadTabStrip); the first of them contains a RadToolBar + RadGrid, the second - a RadToollBar + some minor controls.
embTree consists of a RadToolBar and a RadTreeview.

Let's have a look at embTree (precisely: the RadTreeview inside it). It should look like on tree_ok.jpg (see attached print-screens). But when placed as above it is displayed completely incorrectly: tree_bad.jpg. But - attention - when I change the order of the controls (embTree first, then embGrid), embTree starts to be displayed correctly. Is looks (in the first case) like not all CSS needed for the control has been loaded. I've attached print-screens with the actual markup (I've used the tools from IE 8).

As I've mentioned above all other browser render these control correctly in all the cases.
I'm using Q1 2010 version of Telerik controls.
Is it possible to explain this mystery?

Regards
Tomasz
Tomasz M.Lipiński
Top achievements
Rank 1
 answered on 22 May 2011
0 answers
91 views
Hi,

I'm basically trying to get this to work:

http://blogs.telerik.com/blogs/posts/09-02-25/handling_onajaxrequest_in_content_pages_with_ajax_proxy.aspx

But in a Master/content page situation with ajax settings and with handlers for OnResponseEnd and OnRequestStart.

I must be missing something really obvious, but I can't for the life of me get this to work.  I'm going to paste my code, BUT -- can you all PLEASE post those files to the blog post that are supposed to work?  I have a hard time understanding why this doesn't work when I feel like I've followed all the instructions...

Aspx - Master
    <form id="form1" runat="server">
        <asp:PlaceHolder ID="phValid" runat="server">
<telerik:RadScriptManager ID="rsm" runat="server">  
            <Scripts>
               <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
               <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
               <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
           </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
<div class="pnlCourseMainContentDialog">
        <asp:ContentPlaceHolder id="cphMain" runat="server">
        </asp:ContentPlaceHolder>
    </div>
</asp:PlaceHolder>


Aspx - Content
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
</telerik:RadAjaxManagerProxy>
       
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            window.$ = $telerik.$;
            function get_RadWindow() { var oWindow = null; if (window.radWindow) { oWindow = window.radWindow; } else if ((window.frameElement) && (window.frameElement.radWindow)) { oWindow = window.frameElement.radWindow; } return oWindow; }
            function JustClose() { get_RadWindow().Close(); }
            function fileUploaded(sender, eventArgs) {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest();
            }
 
            function requestStart(sender, eventArgs) {
            }
 
            function responseEnd(sender, eventArgs) {
                var oWnd = get_RadWindow();
                var oArg = new Object();
                oArg.id = $("#<%= hfId.ClientID %>").val();
 
                alert('Id is: ' + oArg.id + " ");
                /*
                //Close the RadWindow and send the argument to the parent page
                if (oWnd)
                    oWnd.close(oArg);
                */
            }
 
            function test() {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest();
            }
 
        </script>
    </telerik:RadCodeBlock>
    <asp:HiddenField ID="hfId" runat="server" />
    <asp:TextBox ID="tbId" runat="server"></asp:TextBox>
    <input type="button" onclick="test()" />



C#
    }
    protected void manager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        //handle the manager AjaxRequest event here
        hfId.Value = "100";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
        manager.ClientEvents.OnRequestStart = "requestStart";
        manager.ClientEvents.OnResponseEnd = "responseEnd";
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);
        manager.AjaxSettings.AddAjaxSetting(manager, this.hfId);
}


OH..  I just tried one more thing, I removed the PlaceHolder ID="phValid" and it works now.  I suppose somehow I have a bug in what I'm determining is valid.  Though I'll look dumb keeping this post up, maybe it'll help someone else with similar issues.

Apparently, in my Master Page, the Page_Init call is getting called in the lifecycle somewhere of the ajax call and in that case it's "invalid" by my code logic causing the content area to not be updated correctly...
Chris
Top achievements
Rank 1
 asked on 21 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?