Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
86 views
When I edit or insert a new row, I don't get feedback when an update/insert fails.  Any help would be appreciated.

My grid code looks like the following:
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<div style="margin: 10px 0px;">Article - Grid View</div>
<%= Html.Telerik().Grid<Article>()
        .Name("Grid")
        .DataKeys(keys => keys.Add(p => p.article_id))
        .ToolBar(commands => commands.Insert())
        .DataBinding(dataBinding => dataBinding.Ajax()
            .Select("_SelectAjaxEditing", "ArticleGridView")
            .Insert("_InsertAjaxEditing", "ArticleGridView")
            .Update("_SaveAjaxEditing", "ArticleGridView")
            .Delete("_DeleteAjaxEditing", "ArticleGridView"))
        .Columns(columns =>
        {
            columns.Bound(p => p.CategoryInitials).Title("Cat");
            columns.Bound(p => p.description).Width(130);
            columns.Bound(p => p.ColorName);
            columns.Bound(p => p.Cash);
            columns.Bound(p => p.registration_number).Title("Article #");
            columns.Bound(p => p.route);
            columns.Bound(p => p.BinName);
            columns.Bound(p => p.DivisionName);
            columns.Bound(p => p.DateLost);
            columns.Command(commands =>
            {
                commands.Edit();
            }).Title("Commands");
        })
        .Pageable(p => { p.PageSize(20); })
%>
 
<%= Html.Telerik().ScriptRegistrar() %>
</asp:Content>


My controller looks like the following:
[HttpPost]
[GridAction]
public ActionResult _SaveAjaxEditing(int id, FormCollection collection)
{
   var article = Article.Load(id);
  
   if (!string.IsNullOrEmpty(collection["description"])) {
      article.description = collection["description"];
   } else {
      ModelState.AddModelError("description", "description cannot be empty.");
   }
   article.ColorName = collection["ColorName"];
   article.cash = collection["cash"];
   article.registration_number = collection["registration_number"];
   article.route = collection["route"];
   article.BinName = collection["BinName"];
   article.DivisionName = collection["DivisionName"];
    
   DateTime d;
   if (DateType.TryParse(collection["date_lost"], d)) {
      article.date_lost = collection["date_lost"];
   } else {
      ModelState.AddModelError("date_lost", "invalid date.");
   }
      
   article.Save();
  
   return View(new GridModel(Article.FetchAll()));
}

(TryUpdateModule method keeps throwing an "An item with the same key has already been added." exception, so that's why I'm not using it.)

James
James Lam
Top achievements
Rank 2
 asked on 19 Aug 2010
11 answers
906 views
Hello,

I am exporting data to CSV.
Some of my data contains leading zeros (U.S. postal codes for NJ and MA).
When opening the CSV file in excel, the leading zeros are dropped and thereby leaving an incorrect postal code.

Your documentation mentions the following:
Microsoft Excel parses the cell values automatically depending on the local settings. For example the string 19/05 might change to 19.May automatically. The only workaround would be to insert a sign of equality (=) before the relevant string. For example: "012"  should be modified as  ="012".

Is there a way to modify the string as you suggest in code when exporting the grid data to CSV?
Or is this a manual process the user must perform to the CSV file prior to opening in excel?

Thanks,
Jon
Kellen
Top achievements
Rank 1
 answered on 19 Aug 2010
1 answer
147 views
I am using version 2009.3.1314.35 of the Telerik tools.

Whenever I click on a node and retrieve data back from the database and want to place that data on the screen (outside the TreeView), the screen is not populated with that data.

I have the following markup in a RadAjaxManager which should AJAXify the TreeView.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>  

If I take the above HTML out of the markup, the population of the data on the screen works fine (this, however, is a non-AJAXified resolution). I even tried just placing the Treeview within a RadUpdatePanel and the same result happened.

Here is my codebehind for the event.

protected void RadTreeView1_OnNodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
            var query = from f in DbContext.Facilities
                        from m in DbContext.Maps
                        from md in DbContext.MapDetails
                        from ms in DbContext.MapStatus
                        where f.FacilityID == m.FacilityID
                           && m.Mapid == md.MapID
                           && m.MapStatusID == ms.mapStatusID
                           && md.MapFieldID == int.Parse(e.Node.Value)
                           && f.IsActive == true
                           && m.IsActive == true
                           && md.IsActive == true
                        select new
                        {
                            m.Facility.FacilityName,
                            m.FileType.Description,
                            m.IsMultiRecordType,
                            m.FirstRecordIndicator,
                            m.RecordIndicatorStartPosition,
                            m.RecordIndicatorEndPosition,
                            m.Delimiter,
                            m.MapStatusID,
                            mapstatusdesc = ms.Description,
                            md.MapDetailID,
                            md.MapID,
                            md.MapFieldID,
                            md.StartPosition,
                            md.EndPosition,
                            md.RecordIndicator,
                            md.DataFormat,
                            md.IsComposite,
                            md.CompositeSeparator,
                            md.SpecialCharactersRemoval,
                            md.WhenStartPosition,
                            md.WhenEndPosition,
                            md.WhenRecordIndicator,
                            md.WhenCompareID,
                            md.WhenCompareValue
                        };

            foreach (var q in query)
            {
                // Retrieve Header Info
                Label facilityname = mapHeader1.FindControl("facility") as Label;
                facilityname.Text = q.FacilityName;
                Label filetype = mapHeader1.FindControl("FileType") as Label;
                filetype.Text = q.Description;
                Label startpos = mapHeader1.FindControl("startPos") as Label;
                startpos.Text = q.RecordIndicatorStartPosition.ToString();
                Label endpos = mapHeader1.FindControl("endPos") as Label;
                endpos.Text = q.RecordIndicatorEndPosition.ToString();
                CheckBox MRT = mapHeader1.FindControl("MRT") as CheckBox;
                MRT.Checked = q.IsMultiRecordType;
                Label delimiter = mapHeader1.FindControl("delimiter") as Label;
                delimiter.Text = q.Delimiter.ToString();
                Label testProd = mapHeader1.FindControl("testProd") as Label;
                testProd.Text = q.mapstatusdesc;

                // Retrieve Detail Info
                recordIndicator.Text = q.RecordIndicator;
                startPosition.Text = q.StartPosition.ToString();
                endPosition.Text = q.EndPosition.ToString();
                ddlDataFmt.SelectedItem.Text = q.DataFormat;
                chkCompositeField.Checked = q.IsComposite;
                txtSeparator.Text = q.CompositeSeparator;
                txtSpecialCharRemoval.Text = q.SpecialCharactersRemoval;
                whenStartPosition.Text = q.WhenStartPosition.ToString();
                whenEndPosition.Text = q.WhenEndPosition.ToString();
                whenRecordIndicator.Text = q.WhenRecordIndicator;

                if (q.WhenCompareID == null)
                    drpCompare.SelectedValue = "0";
                else
                    drpCompare.SelectedValue = q.WhenCompareID.ToString();

            }
        }


According to the below directions on your website for using AJAX with the Treeview, the above solution should work fine:

Make telerik RadTreeView work with AJAX requests (Ajax-enable Telerik RadTreeView)
You can ajaxify any member of the telerik RadControls for ASP.NET suite. The ajax-enabled control will work in AJAX mode and will perform callback requests instead of regular postbacks.

To do so, you have two possible options:

place the instance of RadTreeView into an AjaxPanel - in this case, the control will update itself and all other controls in the panel via AJAX request
place one AJAX Manager on the page and in its property builder set the AJAX pair, i.e. AJAX initiator and the updated control. In this case, as we want Telerik RadTreeView to update itself with AJAX, it should be set as initiator and updated control.


Please post a solution as soon as you can for this.

Below, is the rest of the HTML for the page just in case you need it for additonal evaluation. Fyi, the Treeview is on the left side of the page and the population of the data occurs in the middle of the page with some simple textboxes, etc.

Thanks in advance,

Bill.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>  

<body>
        <center>
            <form name="theform">
            <div>
                <table id="Table5" width="100%" cellpadding="1" cellspacing="1" border="0">
                    <tr valign="top">
                        <td width="90%">
                            <uc1:mapHeader ID="mapHeader1" runat="server" />
                            <br />
                        </td>
                        <td>
                            <fieldset>
                                <legend>Action</legend>
                                <table id="Table6" width="100%" runat="server" cellpadding="1" cellspacing="1" border="0">
                                    <tr>
                                        <td class="td_AEVNoBold" align="center">
                                            <asp:Button ID="btnValidation" runat="server" Text="Validate Map" Width="100px" Height="29px"
                                                OnClick="btnValidation_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_AEVNoBold" align="center">
                                            <asp:Button ID="btnExecMap" runat="server" Text="Run Map" Width="100px" Height="29px"
                                                Enabled="false" OnClick="btnExecMap_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_AEVNoBold" align="center">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </td>
                    </tr>
                </table>
                <table width="100%" cellpadding="1" cellspacing="1" border="1">
                    <tr valign="top">
                        <td width="15%">
                            <asp:Panel ID="pnlMapFields" runat="server" ScrollBars="Both" Height="430px">
                                <telerik:RadTreeView ID="RadTreeView1" runat="server" DataTextField="Description"
                                        DataFieldParentID="MapFieldparentID" DataFieldID="MapFieldID" DataValueField="MapFieldID"
                                        OnClientNodeClicking="onNodeClicking" CausesValidation="false" OnNodeClick="RadTreeView1_OnNodeClick">
                                    </telerik:RadTreeView>
                            </asp:Panel>
                        </td>
                        <td>
                            <fieldset>
                                <legend>
                                    <asp:Label ID="FieldName" runat="server" Font-Bold="true" ForeColor="Blue"></asp:Label></legend>
                                <br />
                                <table id="Table1" width="100%" runat="server" cellpadding="1" cellspacing="1">
                                    <tr valign="top">
                                        <td colspan="2">
                                            <table id="Table7" width="100%" runat="server" cellpadding="1" cellspacing="1">
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold" width="15%">
                                                        Mapping Field Name:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <asp:Label ID="MappingField" runat="server" Font-Bold="true"></asp:Label>&nbsp (
                                                        <asp:Label ID="mapValue" runat="server" Font-Bold="true" ForeColor="blue"></asp:Label>
                                                        &nbsp;)
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2">
                                                        <asp:TextBox ID="txtRec" runat="server" Width="100%" onMouseUp="mouseUP();"></asp:TextBox>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr valign="top">
                                        <td width="50%">
                                            <table id="Table3" width="100%" runat="server" cellpadding="1" cellspacing="1">
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold">
                                                        Record Indicator:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <asp:TextBox ID="recordIndicator" runat="server" Width="50px" Enabled="false"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        <asp:RequiredFieldValidator ID="rfvRecdIndicator" runat="server" ErrorMessage="Record Indicator required ONLY for Multiple records!"
                                                            ControlToValidate="recordIndicator" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold" width="31%">
                                                        Start Position:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <telerik:RadNumericTextBox ID="startPosition" runat="server" Type="Number" Width="50px">
                                                            <NumberFormat DecimalDigits="0" />
                                                        </telerik:RadNumericTextBox>
                                                    </td>
                                                    <td>
                                                        <asp:RequiredFieldValidator ID="rfvStartPos" runat="server" ErrorMessage="Start Position required!"
                                                            ControlToValidate="startPosition" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold">
                                                        End Position:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <telerik:RadNumericTextBox ID="endPosition" runat="server" Type="Number" Width="50px">
                                                            <NumberFormat DecimalDigits="0" />
                                                        </telerik:RadNumericTextBox>
                                                    </td>
                                                    <td>
                                                        <asp:RequiredFieldValidator ID="rfvEndPos" runat="server" ErrorMessage="End Position required!"
                                                            ControlToValidate="endPosition" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                    </td>
                                                    <td>
                                                        <asp:CompareValidator ID="cvStartEndPos" runat="server" ErrorMessage="End Position cannot be less than Start Position!"
                                                            ControlToValidate="startPosition" ControlToCompare="endPosition" Operator="LessThanEqual"
                                                            Type="Integer" Font-Bold="true"></asp:CompareValidator>
                                                    </td>
                                                </tr>
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold">
                                                        Data Format:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <asp:DropDownList ID="ddlDataFmt" runat="server" DataSourceID="LinqFieldTypeID" DataTextField="FieldTypeDesc"
                                                            DataValueField="FieldTypeID" AppendDataBoundItems="true">
                                                            <asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:LinqDataSource ID="LinqFieldTypeID" runat="server" ContextTypeName="DataNet.Data.dataNetDataContext"
                                                            Select="new (FieldTypeDesc,FieldTypeID)" TableName="FieldTypes">
                                                        </asp:LinqDataSource>
                                                    </td>
                                                    <td>
                                                        <asp:RequiredFieldValidator ID="rfvDataFmt" runat="server" ErrorMessage="Data Format required!"
                                                            ControlToValidate="ddlDataFmt" Font-Bold="true"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="50%">
                                            <table id="Table4" width="100%" runat="server" cellpadding="1" cellspacing="1">
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold" width="30%">
                                                        Is a Composite Field:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <asp:CheckBox ID="chkCompositeField" runat="server" AutoPostBack="true" OnCheckedChanged="chkCompositeField_OnCheckedChanged" />
                                                    </td>
                                                </tr>
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold">
                                                        Separator:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <asp:TextBox ID="txtSeparator" runat="server" Width="50px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="rfvSeparator" runat="server" ErrorMessage="Separator required when Composite selected!"
                                                            ControlToValidate="txtSeparator" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold" width="15%">
                                                        Map Sequence:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <telerik:RadNumericTextBox ID="txtMapSeq" runat="server" Width="50px">
                                                            <NumberFormat DecimalDigits="0" />
                                                        </telerik:RadNumericTextBox>
                                                        <asp:RequiredFieldValidator ID="rfvMapSeq" runat="server" ErrorMessage="Map Sequence required when Composite selected!"
                                                            ControlToValidate="txtMapSeq" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr valign="top">
                                                    <td class="td_AEVNoBold" width="15%">
                                                        Special Characters Removal:
                                                    </td>
                                                    <td class="td_AEVNoBold">
                                                        <asp:TextBox ID="txtSpecialCharRemoval" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="rfvSpecialCharRemoval" runat="server" ErrorMessage="Special Characters Removal required when Composite selected!"
                                                            ControlToValidate="txtSpecialCharRemoval" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr valign="top">
                                        <td colspan="2">
                                            <fieldset>
                                                <legend><b>ONLY WHEN</b></asp:Label></legend>
                                                <table id="Table2" width="100%" runat="server" cellpadding="1" cellspacing="1">
                                                    <tr valign="top">
                                                        <td class="td_AEVNoBold" width="15%">
                                                            Start Position:
                                                        </td>
                                                        <td class="td_AEVNoBold">
                                                            <telerik:RadNumericTextBox ID="whenStartPosition" runat="server" OnTextChanged="whenStartPosition_OnTextChanged"
                                                                AutoPostBack="true">
                                                                <NumberFormat DecimalDigits="0" />
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                        <td>
                                                            <asp:RequiredFieldValidator ID="rfvWhenStartPos" runat="server" ErrorMessage="*When* Start Position required if filling in 1 or more items in this section!"
                                                                ControlToValidate="whenStartPosition" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td class="td_AEVNoBold" width="15%">
                                                            End Position:
                                                        </td>
                                                        <td class="td_AEVNoBold">
                                                            <telerik:RadNumericTextBox ID="whenEndPosition" runat="server" OnTextChanged="whenEndPosition_OnTextChanged"
                                                                AutoPostBack="true">
                                                                <NumberFormat DecimalDigits="0" />
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                        <td>
                                                            <asp:RequiredFieldValidator ID="rfvWhenEndPos" runat="server" ErrorMessage="*When* End Position required if filling in 1 or more items in this section!"
                                                                ControlToValidate="whenEndPosition" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                        </td>
                                                        <td>
                                                            <asp:CompareValidator ID="cvWhenStartEndPos" runat="server" ErrorMessage="*When* End Position cannot be less than *When* Start Position!"
                                                                ControlToValidate="whenStartPosition" ControlToCompare="whenEndPosition" Operator="LessThanEqual"
                                                                Enabled="false" Type="Integer" Font-Bold="true"></asp:CompareValidator>
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td class="td_AEVNoBold" width="15%">
                                                            Record Indicator:
                                                        </td>
                                                        <td class="td_AEVNoBold">
                                                            <asp:TextBox ID="whenRecordIndicator" runat="server" OnTextChanged="whenRecordIndicator_OnTextChanged"
                                                                AutoPostBack="true"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:RequiredFieldValidator ID="rfvWhenRecdInd" runat="server" ErrorMessage="*When* Record Indicator required ONLY for Multiple records if filling in 1 or more items in this section!"
                                                                ControlToValidate="whenRecordIndicator" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td class="td_AEVNoBold" width="15%">
                                                            Compare:
                                                        </td>
                                                        <td class="td_AEVNoBold">
                                                            <asp:DropDownList ID="drpCompare" runat="server" Enabled="false">
                                                                <asp:ListItem Value="0" Text="Equal To" Selected="True"></asp:ListItem>
                                                                <asp:ListItem Value="1" Text="Not Equal To"></asp:ListItem>
                                                                <asp:ListItem Value="2" Text="Greater Than"></asp:ListItem>
                                                                <asp:ListItem Value="3" Text="Greater Than and Equal To"></asp:ListItem>
                                                                <asp:ListItem Value="4" Text="Less Than"></asp:ListItem>
                                                                <asp:ListItem Value="5" Text="Less Than and Equal To"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:RequiredFieldValidator ID="rfvCompare" runat="server" ErrorMessage="*When* Compare required ONLY for Multiple records if filling in 1 or more items in this section!"
                                                                ControlToValidate="drpCompare" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td class="td_AEVNoBold" width="15%">
                                                            Value:
                                                        </td>
                                                        <td class="td_AEVNoBold">
                                                            <asp:TextBox ID="value" runat="server" OnTextChanged="whenvalue_OnTextChanged" AutoPostBack="true"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:RequiredFieldValidator ID="rfvValue" runat="server" ErrorMessage="*When* Value required ONLY for Multiple records if filling in 1 or more items in this section!"
                                                                ControlToValidate="value" Font-Bold="true" Enabled="false"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </fieldset>
                                        </td>
                                    </tr>
                                    <tr valign="top">
                                        <td class="td_AEVNoBold" width="15%">
                                            &nbsp;
                                        </td>
                                        <td class="td_AEVNoBold">
                                            <asp:Button ID="Save" runat="server" Text="Save" Width="150" OnClick="Save_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:Panel ID="Data" runat="server" GroupingText="Data" Width="100%">
                                                <asp:ListBox ID="lstData" runat="server" Width="100%" Font-Size="XX-Small" onchange="lstData_onClick();">
                                                </asp:ListBox>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </td>
                    </tr>
                </table>
            </div>
            </form>
        </center>
    </body>

Bill
Top achievements
Rank 2
 answered on 19 Aug 2010
2 answers
539 views
I want my grid to group by column which contains Date but group not by day but months so items (invoices) are grouped monthly.
tomekm
Top achievements
Rank 1
 answered on 19 Aug 2010
3 answers
161 views
hi,

Have any separate radcombo box like change skin combo box of Telerik demo page  ( http://demos.telerik.com/aspnet-ajax/combobox/examples/default/defaultcs.aspx ) ?
If yes tell me the radcombobox type.

Regards
Joseph.S
Joseph
Top achievements
Rank 1
 answered on 19 Aug 2010
4 answers
218 views
I have a simple page with only one grid on the page. In the Markup I have EnableEmbededSkins="True" and Skin="WebBlue". Now, when my page renders no skin theme style is applied, not even default. I view source on the page and see that is skin is being set for the Grid. All I am getting is a skinless grid? Please assist.

Thanks,


Steve Holdorf
Steve Holdorf
Top achievements
Rank 1
 answered on 19 Aug 2010
5 answers
280 views

Thanks for adding the Logarithmic charts.  They are a needed addition to the chart toolbox.

After a quick review, I noticed the newly added charts need some additional work... 

The minor tick marks on the Y-axis of the Logarithmic charts for ASP.NET AJAX and Silverlight/WPF should not be evenly spaced.  I did a quick search on the net and found an example of how a logarithmic axis should display. 

Example gif file from this site:  http://www.intmath.com/Exponential-logarithmic-functions/7_Graphs-log-semilog.php

It is difficult to tell from the demos if the values line up with the tick marks.  Test by graphing values like 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200,300... which should all line up with the minor tick marks.

The Silverlight Demo also says Logarithmic Y-Axis when it is really graphing logs on the X Axis.  The ASP.NET AJAX correctly graphs on the Y-Axis.

Thanks,
John Lehew
Terry Apodaca
Top achievements
Rank 1
 answered on 19 Aug 2010
2 answers
839 views
HI
1)I had master page "telerik_ex.master" which contains "ASP.Net Scriptmanager"  (I should maintain this Asp.net scriptmanager in this master page )

2) I want to use  radscriptmanager in "content" page 

3) But it gives the error page can't have two scriptmanager but how I can use ?

I am getting following error message
message:    Only one instance of a ScriptManager can be added to the page.


Thanks
Srikanth Gn
nikesh
Top achievements
Rank 1
 answered on 19 Aug 2010
2 answers
120 views
Dear Telerik,

I don't know what is wrong with my PanelBar. I am populating from XML, but when i click on the panelbar item, it does not redirect to my page.
Below is my snippets:
XML
<?xml version="1.0" encoding="utf-8" ?>
<PanelBar Skin="Outlook">
  <Item Text="Parameters" ImageUrl="~/Images/Crystal/images/gif/32.gif" Expanded="True" >
      <Item Text="GOOGLE" ImageUrl="~/Images/Crystal/folder/gif/16.gif" Href="www.google.com"/>
      </Item>
</PanelBar>

PANELBAR DEFINITION(.aspx)
  <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="600px" Skin="Vista"
                SplitBarsSize="" Width="1420px" BackColor="AliceBlue" BorderSize="2">
                <telerik:RadPane ID="panelRadPane" runat="server" MinHeight="300" MinWidth="200"
                    Width="250" EnableEmbeddedBaseStylesheet="False">
                    <telerik:RadPanelBar ID="mainRadPanelBar" runat="server" Height="520px" AllowCollapseAllItems="true" ExpandMode="SingleExpandedItem">
                    </telerik:RadPanelBar>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="mainRadSplitBar" runat="server" CollapseMode="Both" />
                <telerik:RadPane ID="contentRadPane" runat="server" Scrolling="None">
                    <div class="span-24 last" id="ContentPlace">
                        <asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server">
                        </asp:ContentPlaceHolder>
                    </div>
                </telerik:RadPane>
            </telerik:RadSplitter>
CODE BEHIND
 mainRadPanelBar.LoadContentFile("~/Resources/Xml/Menu.xml");

Please kindly help. I don't know where i am going wrong.

Much appreciated
.


Robert Jakech
Top achievements
Rank 1
 answered on 19 Aug 2010
1 answer
191 views
I have a RadGrid on an ASP.NET page and the sorting of the rows for each page does not always work properly. For example, I have one grid with 359 rows, the grid's page size is 50, and the column being sorted is a DateTime field. So for 359 rows at 50 each the grid properly breaks things up into 8 pages. When you go to pages 1-4 and 6-8, each page's rows are properly sorted in descending order. When you go to page 5 the rows seemed to be sorted by "date string" order, instead of being sorted the normal DateTime way they sure appear to be sorted in their string order (where the format is "MM/DD/YYYY").

I've used SQL Manager to look at the data returned from the query and each page appears to have the proper rows, just page 5 is not sorted correctly. The control is fed the entire set of data (all 359 rows) any time "needs data" is called, so it is the control that is figuring out which 50 of the set need to be displayed and in what order.

Here's what I think is the pertinent markup:

<telerik:RadGrid ID="InvoicesGrid" runat="server" Skin="Sullivans" EnableEmbeddedSkins="false"
    CellPadding="3" GridLines="None" AlternatingItemStyle-CssClass="orderAltRow"
    AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
    AllowPaging="True" OnNeedDataSource="InvoicesGrid_NeedDataSource" OnItemDataBound="InvoicesGrid_ItemDataBound"
    OnPageIndexChanged="InvoicesGrid_PageIndexChanged">
    <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
    <MasterTableView Width="100%" DataKeyNames="Header.Invoice_No" AllowMultiColumnSorting="False" ShowFooter="true" AllowNaturalSort="False">
        <Columns>
 
<!-- Bunch of columns removed. -->
 
            <telerik:GridBoundColumn DataField="Header.Invoice_Dt" HeaderText="Date" DataFormatString="{0:d}" Aggregate="None" DataType="System.String" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

I added the AllowNaturalSort="False" to the MasterTableView today; I get the same results with or without that tag.

The only binding of the control is when the page is initialized, and in that case a Rebind is called.

The "need data" event simply gets the data from the database into an array of class objects and is bound like this:

InvoicesGrid.DataSource = details;

The item data bound formats some columns, but doesn't touch the date column.

Any ideas appreciated, and if I can supply any further info please let me know.
-glenn-
Top achievements
Rank 1
 answered on 19 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?