Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
87 views
Hi
How to add required filed validator during inplace editing? Please give an example.
Thanks in advance.
Janaki
Top achievements
Rank 1
 answered on 19 Apr 2012
2 answers
87 views
Hi,

I recently came up with this issue while testing my radgrid in Firefox. I have an update panel inside which I have a radgrid. I have enabled scrolling for the radgrid. The radgrid appears fine in IE with the scrollbars allowing me to scroll.

However, when I view this in Firefox, the horizontal scrollbar of the grid is missing and hence, the grid expands beyond the panel and I eventually, have to use the Firefox scrollbar! Don't know if I am missing out on something but I need an urgent fix for this.

Here is my HTML code:
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
    <asp:Panel ID="Panel1" runat="server" BorderColor="Black" BorderStyle="Solid" 
        BorderWidth="1px" 
        GroupingText="List of Invoices Waiting to be Approved" Height="100%">
         
            <telerik:RadGrid ID="RadGdApprove" runat="server" >
                <ClientSettings>
                    <Scrolling AllowScroll="True" />
                </ClientSettings>
                <MasterTableView>
                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
            </telerik:RadGrid>
       </asp:Panel>
  
    </div>
    </form>
</body>
</html>


Tsvetina
Telerik team
 answered on 19 Apr 2012
2 answers
93 views
Hi all,
I want to show all rows in the grid in Edit mode on an external button click.
Please Help.
Steve
Top achievements
Rank 1
 answered on 19 Apr 2012
1 answer
355 views
To:

Base on this example,
http://demos.telerik.com/aspnet-ajax/upload/examples/async/additionalfields/defaultcs.aspx?product=asyncupload

How to find the uploaded, uploading and selected all file while using asyncupload to avoid duplicate file name?



From louisth
Tan
Top achievements
Rank 1
 answered on 19 Apr 2012
2 answers
66 views
Hi,

Is it possible for different text to be displayed in the TextBox and the ValidationSummary for a TextBox validated using TextBoxSetting? Reason for this is TextBoxes are restricted width, so I would like to display just "Invalid" in the TextBox, but more details of what is wrong in the ValidationSummary. I can only find ErrorMessage property, which seems to be used in both places.

Is this possible? Thanks.

Ross Crawford
Lucania
Top achievements
Rank 1
 answered on 19 Apr 2012
0 answers
68 views
Our client is complaining about RadGrid filtering functionality. The problem is that when they want to filter Grid by more than 1 column they have to click the button and experience postback (which takes time) every time they apply filter for another column. We need to overcome this somehow. Using RadFilter control doesn't seem to be a good solution because it also causes postback every time filter item is applied. 

Do we have a workaround for this? 
Vladimir
Top achievements
Rank 1
 asked on 18 Apr 2012
3 answers
86 views

Hi Support Team,

I have set Radgrid page size 10 (Please check attached image1.png).  And make group by column1 by drag. I get output at page1 in two groups. Group1 has 3 records and Group2 has 7 records( Ref -Image2.png).

Now I am collapse group1, so it displays collapsed Group1 and Group2 with 7 records (ref-Image3.png).

But is there any way to display total 10 records without considering collapsed record?

Thanks in advance.


Pavlina
Telerik team
 answered on 18 Apr 2012
1 answer
139 views
The Setup: RadGrid, inside user control, that features several details tables. The grid view in question is the OrderNotesLevel. This user control is called from our research page. 

The Problem: The user control OrderNotesEntry.ascx is throwing an error in the binding saying the dataitem doesn't contain property xxx. When I debug I see the dataitem has no properties in the collection at all. The error occurs when adding a new order note record.

Grid structure:
Order
- OrderDetails
--SKU
-Order Notes (for sales team) <- where my problem(s) are

ASPX:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Example.ascx.cs" Inherits="ExampleUC" %>
<br />
<telerik:RadAjaxPanel ID="rapExample" runat="server">
    <div style="display: none; visibility: hidden;">
        <asp:Label ID="lblOrderId" runat="server" Text="-1"></asp:Label>
    </div>
    <telerik:RadGrid ID="rgExample" runat="server" Width="1020px" ShowStatusBar="true" AutoGenerateColumns="False"
        PageSize="10" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True"
        OnDetailTableDataBind="rgExample_DetailTableDataBind" OnNeedDataSource="rgExample_NeedDataSource"
        OnPreRender="rgExample_PreRender" GridLines="Horizontal" OnItemDataBound="rgExample_ItemDataBound"
        OnUpdateCommand="rgExample_UpdateCommand" OnInsertCommand="rgExample_InsertCommand" OnDeleteCommand="rgExample_DeleteCommand"
        OnItemCommand="rgExample_ItemCommand">
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <MasterTableView Width="100%" DataKeyNames="OrderId" Name="OrderLevel" HierarchyDefaultExpanded="true"
            GroupLoadMode="Client" TableLayout="Fixed">
            <Columns>
                <telerik:GridBoundColumn SortExpression="OrderOwner" HeaderText="Order Owner" DataField="OrderOwner"
                    DataType="System.String" HeaderStyle-Width="10em" HeaderStyle-HorizontalAlign="Center">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn SortExpression="OrderDate" HeaderText="Closed Date"
                    DataField="OrderDateClosed" DataType="System.String" HeaderStyle-Width="5.5em"
                    HeaderStyle-HorizontalAlign="Center">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn SortExpression="OrderFactors" HeaderText="Order Risk Factor"
                    DataField="OrderRiskFactor" DataType="System.String" HeaderStyle-Width="9.0em"
                    HeaderStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <div class='<%#Eval("OrderFactorColor")%>'>
                            <asp:Label ID="lblOrderFactor" runat="server" Text='<%#Eval("OrderFactor")%>'></asp:Label>
                        </div>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <DetailTables>
                <telerik:GridTableView DataKeyNames="DetailCode" Name="DetailLevel" Width="100%" HierarchyDefaultExpanded="true"
                    GridLines="None" AllowPaging="false">
                    <Columns>
                        <telerik:GridBoundColumn SortExpression="DetailCode" HeaderText="DetailCode" DataField="DetailCode"
                            DataType="System.String">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="DetailDescr" HeaderText="Description" DataField="DetailDescr"
                            DataType="System.String">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="DetailDate" HeaderText="First Treatment Date"
                            DataField="DetailDate" DataFormatString="{0:d}" DataType="System.DateTime" HeaderStyle-Width="6em">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <DetailTables>
                        <telerik:GridTableView DataKeyNames="Id" Name="SKULevel" Width="100%" HierarchyDefaultExpanded="true"
                            CellPadding="5" GridLines="None" AllowPaging="false">
                            <Columns>
                                <telerik:GridBoundColumn SortExpression="SKUDate" HeaderText="Date" DataField="SKUDate"
                                    DataFormatString="{0:d}" DataType="System.DateTime" HeaderStyle-Width="30px">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="ReqType" HeaderText="Req Type" DataField="ReqType"
                                    DataType="System.String" HeaderStyle-Width="200px" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="Quantity" HeaderText="Quantity" DataField="Quantity"
                                    DataType="System.String" HeaderStyle-Width="75px">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="EstCosts" HeaderText="Est $$$" DataField="EstCosts"
                                    DataType="System.Decimal" HeaderStyle-Width="50px">
                                </telerik:GridBoundColumn>
                            </Columns>
                            <NoRecordsTemplate>
                                <p class="ExampleNoRecords">
                                    No Protocol Requests have been created.</p>
                            </NoRecordsTemplate>
                        </telerik:GridTableView>
                    </DetailTables>
                    <NoRecordsTemplate>
                        <p class="ExampleNoRecords">
                            No Details have been asscoiated with the Order.</p>
                    </NoRecordsTemplate>
                </telerik:GridTableView>
                <%-- Grid that is causing me problems --%>
                <telerik:GridTableView DataKeyNames="OrderNotesId" Name="OrderNotesLevel" Width="100%"
                    HierarchyDefaultExpanded="False" AllowPaging="false"
                    CellPadding="5" GridLines="None">
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">
                            <HeaderStyle Width="20px" />
                            <ItemStyle CssClass="MyImageButton" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridBoundColumn SortExpression="OrderNotesId" HeaderText="#"
                            DataField="OrderNotesId" DataType="System.String" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="ReportDate" HeaderText="Report Date" DataField="ReportDate"
                            DataFormatString="{0:d}" DataType="System.DateTime">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="OrderGoals" HeaderText="Goals"
                            DataField="OrderGoals" DataType="System.String">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <NoRecordsTemplate>
                        <p class="ExampleNoRecords">
                            No historical Action Steps have been created.</p>
                    </NoRecordsTemplate>
                    <EditFormSettings UserControlName="~/UserControls/OrderNotesEntry.ascx" EditFormType="WebUserControl">
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                    </EditFormSettings>
                </telerik:GridTableView>
            </DetailTables>
            <NoRecordsTemplate>
                <p class="ExampleNoRecords">
                    No Order Note data available.</p>
            </NoRecordsTemplate>
        </MasterTableView>
    </telerik:RadGrid>
</telerik:RadAjaxPanel>

ASPX EditForm UserControl:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OrderNotesEntry.ascx.cs"
    Inherits="Usercontrols_OrderNotesEntry" %>
    <asp:Panel ID="pnlOrderNoteEntry" runat="server">
        <div class="OrderHighlight" style="visibility: hidden; display: none;">
            Id:
            <asp:Label ID="lblOrderNoteId" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.OrderNoteId" ) %>' /></asp:Label>
        </div>
        <div class="OrderHighlight">
            <table style="text-align: left;" width="99%">
                <tr>
                    <th class="DDSubHeader" style="width:150px;">
                        Date:
                    </th>
                    <td>
                        <telerik:RadDatePicker ID="rdpDate" runat="server" ZIndex="30001" DateInput-DateFormat="MM/dd/yyyy"
                            DbSelectedDate='<%# DataBinder.Eval( Container, "DataItem.OrderDate" ) %>' />
                    </td>
                    <th class="DDSubHeader" style="width:150px;">
                        Next Report Date:
                    </th>
                    <td>
                        <asp:RadioButtonList ID="rblNextOrderDate" RepeatDirection="Horizontal" runat="server"
                            RepeatColumns="4" OnDataBound="rblNextOrderDate_DataBound">
                        </asp:RadioButtonList>
                        <telerik:RadDatePicker ID="rdpNextDate" runat="server" ZIndex="30001" DateInput-DateFormat="MM/dd/yyyy"
                            DbSelectedDate='<%# DataBinder.Eval( Container, "DataItem.NextOrderDate" ) %>' />
                    </td>
                </tr>
            </table>
        </div>
        <br />
        <div class="OrderHighlight">
            Goals:
            <telerik:RadTextBox ID="rtbManagementGoals" runat="server" TextMode="MultiLine" Width="99%"
                Height="60px" Text='<%# DataBinder.Eval( Container, "DataItem.OrderGoals" ) %>'
                MaxLength="500">
            </telerik:RadTextBox>
        </div>
        <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'>
        </asp:Button>
        <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert"
            Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:Button>
          
        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
            CommandName="Cancel"></asp:Button>
    </asp:Panel>

User Control Code Behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class Usercontrols_OrderNotesEntry : System.Web.UI.UserControl
{
    private object _dataItem = null;
    public object DataItem
    {
        get
        {
            return this._dataItem;
        }
        set
        {
            this._dataItem = value;
        }
    }
 
    private Dictionary<string, int> DateRanges()
    {
        Dictionary<string, int> dict = new Dictionary<string, int>();
        dict.Add("Custom", -1);
        dict.Add("30", 30);
        dict.Add("60", 60);
        dict.Add("90", 90);
        return dict;
    }
 
    protected void Page_Init(object sender, EventArgs e)
    {
        this.DataBinding += new System.EventHandler(this.OrderNotesEntry_DataBinding);
    }
 
    protected void OrderNotesEntry_DataBinding(object sender, System.EventArgs e)
    {
        Dictionary<string, int> dict = DateRanges();
 
        rblNextReportDate.DataSource = dict;
        rblNextReportDate.DataTextField = "Key";
        rblNextReportDate.DataValueField = "Value";
        rblNextReportDate.DataBind();
    }
     
    protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    protected void rblNextReportDate_DataBound(object sender, EventArgs e)
    {
        RadioButtonList rbl = sender as RadioButtonList;
        foreach (ListItem li in rbl.Items)
        {
            li.Attributes.Add("onclick", string.Format("javascript:pds('{0}', '{1}')", rbl.ClientID, li.Value));
        }
    }
}
Johnathan
Top achievements
Rank 1
 answered on 18 Apr 2012
11 answers
411 views
hello,

we're currently getting the selected date through the client object (javascript) and passing them through jQuery ajax.

var theDate = $find('<%= radDatePicker1.ClientID %>').get_selectedDate();
$.ajax({data: JSON.stringify({ dateIn : theDate })});

[WebMethod()]
public void GetDateSelected(DateTime? dateIn)
{
    // do something
}

Our servers are currently in Arizona (GMT -7) and pacific time users doesn't experience the issue. If a client from a Mountain Timezone accesses the datepicker, the control increments 1 day to the selected date. Is there any way to prevent this?
Tom
Top achievements
Rank 1
 answered on 18 Apr 2012
0 answers
58 views
Hi,

I have a Nested radgrid (master & DetailTable) ...when using export to excel i want to display the detailTable cell values using offset 0,2 .
that means i want to shif the cell position by 2 and merge the detail table headers with the master
i'm using

ExcelMLExportRowCreated  & ExcelMLExportRowCreated

C#2.0, Telerik Rad Ajax Q3,2010

Exmaple:-
this is what i have
OrdID        Date        Amount
ord#1        Mar3                $80
                ITEM#      NAME              Amount
                Item#1    ItemName1        $50
                Item#2    ItemName2        $30

ord#2        Mar3               $100
                ITEM#      NAME              Amount
                Item#1    ItemName1        $45
                Item#2    ItemName2        $55

should be change to....
OrdID        Date     ITEM#    NAME            TotalAmount
ord#1        Mar3                                                $80
                            Item#1    ItemName1             $50
                            Item#2    ItemName2            $30
ord#2        Mar3                                               $100
                             Item#1    ItemName1           $45
                            Item#2    ItemName2            $55


  

Robert
Top achievements
Rank 1
 asked on 18 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?