Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
79 views
I'm trying to set a solid color in the bar graph but it always gives me a fading color. Any ideas why? Here is my code

            Dim bar As New ChartSeriesItem


            bar.YValue = 1


            bar.Appearance.FillStyle.MainColor = Drawing.Color.ForestGreen
            mySeries.Appearance.FillStyle.FillType = Styles.FillType.Solid
            mySeries.AddItem(bar)


            chart.Series.Add(mySeries)

Also, do you know of any way to pick a random color? I.e. where I have drawing.color.forestgreen, I'd just like a random color so each bar is a different color.
Giuseppe
Telerik team
 answered on 15 Sep 2011
5 answers
220 views
Hi all,

I am using RadCombobox which contains CheckBoxes as its items. When a checkbox item is checked, its Text will be displayed in Combobox's Text with the delimiter is ",".
It's OK. But I get problem when user clicks/selects on an item instead of checking it. Text of Combobox will be replaced by Text of selecting item.
Please tell me how can I prevent this action ?

Thanks in advance
Phuc
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
66 views
Hi,

I have been working with the chart control to make a line chart with x & y values from an external data source. The x values may be very unevenly spaced decimals values or negative numbers, so I need to set the items on this axis from code. Can someone give me a good example of how to do this?

I have a poorly functioning example below. Unfortunately, this example graphs both values as two lines.
protected void Page_Load(object sender, EventArgs e)
{
    List<MyObject> myList = new List<MyObject>();
 
    myList.Add(new MyObject { yValue = 3, xValue = -20 });
    myList.Add(new MyObject { yValue = -1, xValue = -10 });
    myList.Add(new MyObject { yValue = -5, xValue = 3 });
    myList.Add(new MyObject { yValue = 1, xValue = 5 });
    myList.Add(new MyObject { yValue = 8, xValue = 6.5 });
    myList.Add(new MyObject { yValue = 4, xValue = 7 });
    myList.Add(new MyObject { yValue = 3, xValue = 10 });
    myList.Add(new MyObject { yValue = 7, xValue = 15 });
 
    RadChart1.PlotArea.XAxis.IsZeroBased = false;
    RadChart1.DataSource = myList;
    RadChart1.PlotArea.XAxis.DataLabelsColumn = "xValue";
     
    RadChart1.DataBind();
}
 
public class MyObject
{
    public double yValue { get; set; }
    public double xValue { get; set; }
}

Thank you for you help!
Dan
Yavor
Telerik team
 answered on 15 Sep 2011
4 answers
1.9K+ views
Hi,
   This is an exception i get in my application, This doesn't happen often, but happens some times

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

<!DOCTYPE html PUB'.

Can any one please help me on this?

Alex
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
69 views
When I do sorting on the grouped item in group header get this error. 

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.


I bind data and create columns to the grid from code behind on pageload. Am i missing something?
Thanks in advance for your support.

Regards,
Vijay
Princy
Top achievements
Rank 2
 answered on 15 Sep 2011
0 answers
123 views
Many people here ask about how to do either client or server filtering. What about both? And are there any best practices for balancing this?

Say you have a database with a million transactions from which you want to select only items from this year, an dyou know there are about 100 thousand of these. With a good database query this may return results quickly but there is overhead for going to the server, and then the resulting data needs to be paged.

For subsequent filtering when the user changes the filter in the grid, we have some options:
1) Go back to the server and perform another query from scratch using the user-defined refinement.
2) Go back to the server, and just refine the already selected subset of data stored in state "somewhere" (maybe a LINQ query on a collection stored in cache, rather than a SQL query to a relational database).
3)  Filter the current subset on the client.

The ultimate question is, how do we know if the user wants to filter the subset of data, or if they want to filter on all data? For the above example, if we have a grid that displays countries and the filter is set to EqualTo USA, is that all USA transactions regardless of date, or all transactions for this year in the USA?

The user needs a button or other mechanism that clarifies their intent.  For this we have seen examples where a text box is used for the user to enter a pre-filter, and the grid always operates on the subset of data provided there.  In my opinion this is redundant and inadequate compared with the more sophisticated filter mechanism already provided in the grid.

How are people dealing with this? When a user changes their filter, which of the three above operations are you performing, and how do you allow the user to go back to a full query or refine their selection?

Thanks!
TonyG
Top achievements
Rank 1
 asked on 14 Sep 2011
0 answers
113 views
I am trying to loop through a radGrid with jQuery to access it Edit link. So basically what I want to do is show a modal dialog whenever the Edit link is clicked. I have the Modal dialog working using jquery and it is activated based on the .click jquery event. Is there a way to make it so when ever you click an Edit link in the radGrid it activates that?

This is my jquery code:
<script>
 
    $(document).ready(function() {
 
        //select all the a tag with name equal to modal
        $("#imgBtnBack").click(function(e) {
        if (($("#radTextBoxNotes_text").val().length === 0) && ($('#rblChangeButtonType input:checked').val() == '100000000') && ($("#RadDatePicker1").val().length === 0)) {
                history.back();
                return false;
            } else {
                //Cancel the link behavior
                e.preventDefault();
                //Get the A tag
                var id = "#dialog";
 
                //Get the screen height and width
                var maskHeight = $(document).height();
                var maskWidth = $(window).width();
 
                //Set height and width to mask to fill up the whole screen
                $('#mask').css({ 'width': maskWidth, 'height': maskHeight });
 
                //transition effect    
                $('#mask').fadeIn(0);
                $('#mask').fadeTo("fast", 0.8);
 
                //Get the window height and width
                var winH = $(window).height();
                var winW = $(window).width();
 
                //Set the popup window to center
                $(id).css('top', winH / 2 - $(id).height() / 2);
                $(id).css('left', winW / 2 - $(id).width() / 2);
 
                //transition effect
                $(id).fadeIn(0);
            }
        });
        //if close button is clicked
        $('.window .close').click(function(e) {
            //Cancel the link behavior
            e.preventDefault();
            $('#mask, .window').hide();
        });
 
        //if mask is clicked
        $('#mask').click(function() {
            $(this).hide();
            $('.window').hide();
        });
    });
    function OnClientClicked(sender, eventArgs) {
        //if close button is clicked
        $('.window .close').click(function(e) {
            //Cancel the link behavior
            e.preventDefault();
            $('#mask, .window').hide();
        });
        
    }
</script>


Thanks!
Justin
Top achievements
Rank 1
 asked on 14 Sep 2011
1 answer
39 views
when I have controls inside form template which is inside radgrid I am unable to
see them in design view, only grid is visible forcing me to move form template controls
to user control or manually design layout in code view. Is this a bug or supposed to be like that ?
I can not justify implementing a user control for that so right now I am using another temp aspx page where
I do layout and then paste it in form template, not very efficient :(
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Sep 2011
1 answer
154 views
Hi
I need to place 2 colums inside grid that 2 columns(Radshowattendedtraining,RadshowProvidedtraining) are two different grid please see the code below my problem is i am not able to use grid inside template column only outer grid is visible in code behind but in asp.net control  it is possible to bind the data.plaese suggest iam new to telerik

<

 

asp:Panel runat="server" ID="InnerContainer" >

 

 

 

 

<telerik:RadGrid ID="Radshowtraining" AllowMultiRowSelection="false" AllowSorting="false" runat="server" GridLines="None"

 

 

AllowFilteringByColumn="true" AllowPaging="true" AutoGenerateColumns ="false" PageSize="10" >

 

 

<ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="True" >

 

 

<Selecting AllowRowSelect="true" />

 

 

</ClientSettings>

 

 

 

<MasterTableView Width="100%" AllowMultiColumnSorting="false" AutoGenerateColumns="false"

 

 

DataKeyNames="Id" ClientDataKeyNames="Id">

 

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateDeleteColumn" HeaderText="Attended"

 

 

AllowFiltering="false" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"

 

 

ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">

 

 

<ItemTemplate>

 

 

<telerik:RadGrid ID="Radshowattendedtraining" AllowMultiRowSelection="false" AllowSorting="false" runat="server" GridLines="None"

 

 

AllowFilteringByColumn="true" AllowPaging="true" AutoGenerateColumns ="false" PageSize="10">

 

 

<MasterTableView Width="100%" AllowMultiColumnSorting="false" AutoGenerateColumns="false">

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="Id" HeaderText="Id" Visible ="false" />

 

 

<telerik:GridBoundColumn DataField="Training" HeaderText="Training" />

 

 

<telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" />

 

 

<telerik:GridBoundColumn DataField="EndDate" HeaderText="End Date" />

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateDeleteColumn" HeaderText="Provided"

 

 

AllowFiltering="false" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"

 

 

ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">

 

 

<ItemTemplate>

 

 

<telerik:RadGrid ID="RadshowProvidedtraining" AllowMultiRowSelection="false" AllowSorting="false" runat="server" GridLines="None"

 

 

AllowFilteringByColumn="true" AllowPaging="true" AutoGenerateColumns ="false" PageSize="10">

 

 

<MasterTableView Width="100%" AllowMultiColumnSorting="false" AutoGenerateColumns="false">

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="Id" HeaderText="Id" Visible ="false" />

 

 

<telerik:GridBoundColumn DataField="Training" HeaderText="Training" />

 

 

<telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" />

 

 

<telerik:GridBoundColumn DataField="EndDate" HeaderText="End Date" />

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<GroupingSettings CaseSensitive="false" />

 

 

</telerik:RadGrid>

 

 

</asp:Panel>

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Sep 2011
2 answers
146 views
Hello,

I followed this tutorial to implement filter on gridbuttoncolumn:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/filtering-and-sorting-for-gridbuttoncolumn.aspx

But When I click on the filter button I get the following error:

Telerik.Web.UI.ParseException: Expression expected    at Telerik.Web.UI.ExpressionParser.ParsePrimaryStart()     at Telerik.Web.UI.ExpressionParser.ParsePrimary()     at Telerik.Web.UI.ExpressionParser.ParseUnary()     at Telerik.Web.UI.ExpressionParser.ParseMultiplicative()     at Telerik.Web.UI.ExpressionParser.ParseAdditive()     at Telerik.Web.UI.ExpressionParser.ParseComparison()     at Telerik.Web.UI.ExpressionParser.ParseLogicalAnd()     at Telerik.Web.UI.ExpressionParser.ParseLogicalOr()     at Telerik.Web.UI.ExpressionParser.ParseExpression()     at Telerik.Web.UI.ExpressionParser.ParseArguments()     at Telerik.Web.UI.ExpressionParser.ParseArgumentList()     at Telerik.Web.UI.ExpressionParser.ParseIif()     at Telerik.Web.UI.ExpressionParser.ParseIdentifier()

Could you please Help on this.

PS: my version of Telerik is 2010.1.415.35
Martin
Telerik team
 answered on 14 Sep 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?