Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
162 views
Hello,
I have created a RadGrid that uses KeyboardNavigation for making changes.  Two of my columns are dates and use RadDatePickers for inline editing.  My third column is just a Notes column (text box).
When I hit [Enter]  to put a row into Edit Mode, move to the Notes text box and hit [Enter] I can save the row, or if I hit [Escape] I can cancel the edit.

If, however, my focus is on one of the two RadDatePickers and I hit [Enter] or [Escape] I get the following error:

Text property cannot be set. String was not recognized as a valid DateTime. 
[InvalidCastException: Text property cannot be set. String was not recognized as a valid DateTime.]
   Telerik.Web.UI.RadDateInput.RangeTextProperty(String value) +265
   Telerik.Web.UI.RadDateInput.set_Text(String value) +47
   Telerik.Web.UI.DatePickingInput.LoadPostData(String postDataKey, NameValueCollection postCollection) +750
   Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +42
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +327
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +878


<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="true" AutoGenerateColumns="False"
            PageSize="15" AllowSorting="True" AllowMultiRowSelection="true" AllowPaging="True"
            AutoGenerateEditColumn="true" GridLines="None" Width="50%" Skin="Hay">
            <PagerStyle Mode="NumericPages" />
            <MasterTableView DataKeyNames="RecordID" AllowMultiColumnSorting="True" Width="100%"
                CommandItemDisplay="Top" Name="Customers" EditMode="InPlace">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="Name" FieldName="Name" />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="Name" SortOrder="Ascending" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" ReadOnly="true"
                        Visible="false" />
                    <telerik:GridDateTimeColumn UniqueName="StartDate" DataField="StartDate" HeaderText="Start Date"
                        ColumnEditorID="editorStartDate" DataFormatString="{0:M/d/yyyy}" />
                    <telerik:GridDateTimeColumn UniqueName="EndDate" DataField="EndDate" HeaderText="End Date"
                        ColumnEditorID="editorEndDate" DataFormatString="{0:M/d/yyyy}" />
                    <telerik:GridBoundColumn UniqueName="Notes" DataField="Notes" HeaderText="Notes"
                        ColumnEditorID="editorNotes" />
                </Columns>
            </MasterTableView>
            <ClientSettings AllowKeyboardNavigation="true">
                <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated"
                    OnCommand="GridCommand" />
                <KeyboardNavigationSettings EnableKeyboardShortcuts="true" AllowSubmitOnEnter="true"
                    AllowActiveRowCycle="true" CollapseDetailTableKey="LeftArrow" ExpandDetailTableKey="RightArrow" />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
        </telerik:RadGrid>
        <telerik:GridDateTimeColumnEditor ID="editorStartDate" runat="server" />
        <telerik:GridDateTimeColumnEditor ID="editorEndDate" runat="server" />
        <telerik:GridTextBoxColumnEditor ID="editorNotes" runat="server" />

Has anyone else seen this one?

Thanks,
-Aaron
Vasil
Telerik team
 answered on 05 Oct 2012
1 answer
105 views
HOw can I increment the fontsize of the filter textbox?

I tried to use the filteritem font-size option but it doesnt work. I need to have a bigger font.

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 05 Oct 2012
1 answer
107 views
Hi,
how to use date picker to only pick for year and show only the year.

By
Anzar.M
Princy
Top achievements
Rank 2
 answered on 05 Oct 2012
3 answers
199 views
Hi all when I enter values as follows 1234567891234567891 in Numeric Textbox I am getting some thing like as follows when I leave the textbox 70368744177664 what should I do in-order to accepts a long digit in Numeric Textbox.

Also when I enter some thing like 1222 it is displaying as 1,222.00 what should I do in-order to display as it is as the entered value
Princy
Top achievements
Rank 2
 answered on 05 Oct 2012
0 answers
111 views

I have a Radgrid with a couple of numeric columns. The grid is in multi-edit mode, and when the user hits Save button, I loop through the grid, and call GridEditableItem.ExtractValues to get the values to save back to the database.

The issue is that when a user is entering a value in the textbox (for the gridnumericcolumn) and does not tab off that textbox and hits the save button, the value does not get saved. If the user tabs off, the entered value is formatted and when the user hits Save button, value gets saved as expeced. The issue is easily reproducible. I am using Telerik v2.0.50727



The markup is:
<telerik:RadGrid Skin="Web20" ID="RadGrid1" runat="server" OnItemCreated="RadGrid1_ItemCreated"
    OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="rgTasks_NeedDataSource"
    AllowMultiRowEdit="true" ShowStatusBar="false" Width="100%" GridLines="Both">
   
    <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" ShowFooter="false"
        ShowGroupFooter="false" ShowHeadersWhenNoRecords="false" AllowSorting="true"
        GridLines="Both" DataKeyNames="Id" Width="100%" AutoGenerateColumns="false" EditMode="InPlace"
        TableLayout="Auto" CommandItemDisplay="Top">
        <NoRecordsTemplate>
        </NoRecordsTemplate>
        <CommandItemSettings ShowAddNewRecordButton="False" ShowExportToCsvButton="True"
                    ShowExportToExcelButton="false" ShowExportToPdfButton="false" ShowExportToWordButton="false"
                    ShowRefreshButton="False"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <Columns>
            <telerik:GridBoundColumn HeaderText="Task ID" UniqueName="MyName" DataField="IdAsInt"
                ReadOnly="true">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Task Name" UniqueName="Name" DataField="Name"
                ReadOnly="true" ItemStyle-Wrap="false">
                <ItemTemplate>
                    <span style='font-weight: <%# Convert.ToBoolean(Eval("IsSummary")) == true ? "bold" : "normal"%>;
                        margin-left: <%# (Convert.ToInt32(Eval("Depth")) - 1) * 10%>px'>
                        <%# Eval("Name")%>
                    </span>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
           
            <telerik:GridNumericColumn NumericType="Number" HeaderText="Estimated Cost" DataField="ForecastCostLoc"
                UniqueName="ForecastCostLoc" AllowRounding="true" DecimalDigits="0" DataFormatString="{0:#,#}">
            </telerik:GridNumericColumn>           
           
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
        <NoRecordsTemplate>
            There are no tasks to display
        </NoRecordsTemplate>
    </MasterTableView>
<ExportSettings Csv-EncloseDataWithQuotes="true" FileName="Forecast Costs" IgnorePaging="true">
            </ExportSettings>
    <ClientSettings AllowExpandCollapse="true" />
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" ValidationGroup="PRJ_WEB_PART"
                         />

andy
Top achievements
Rank 1
 asked on 05 Oct 2012
0 answers
78 views
Hi everyone
I need to know if possible, add a shortcut to a textbox inside a RadGrid.
The point is this: I have a radgrid where some fields have textbox, these textbox, if I positioned in one of them by pressing a key combination, it must display a popup.
If anyone knows of any control or something would be very useful.
thank you very much

Layo
Top achievements
Rank 1
 asked on 04 Oct 2012
4 answers
155 views
Hello,
I am using in my RadGrid following code:

<telerik:GridDateTimeColumn FilterControlWidth="140px" DataField="Datum" HeaderText="Datum"
    SortExpression="Datum" UniqueName="Datum" PickerType="DateTimePicker"
    EnableRangeFiltering="true" CurrentFilterFunction="Between" ReadOnly="True" AllowFiltering="True" FilterListOptions="VaryByDataType">
    <HeaderStyle Width="220px" />
</telerik:GridDateTimeColumn>

When I click on filter icon I get list of options like (between, not between etc...) Would it be possible to have always one default value there (between) and use it after clicking to filter icon?
berto
Top achievements
Rank 1
 answered on 04 Oct 2012
0 answers
83 views
Hi - Is it possible to remove the Export to Microsoft Excel menu item from the default IE8 browser popup menu? Is there a setting in the grid control that will stop this from appearing?

Thanks
Dean Brown
Top achievements
Rank 1
 asked on 04 Oct 2012
1 answer
93 views
Hi I have a generic list of objects that I would like to bind to a bar graph that have the following properties:

public decimal TotalValue
{
    get
    {
        return _totalValue;
    }
    set
    {
        _totalValue = value;
    }
}
 
public decimal TotalHours
{
    get
    {
        return _totalHours;
    }
    set
    {
        _totalHours = value;
    }
}
 
public string FieldActivityNameWUnit
{
    get
    {
        return _fieldActivityNameWUnit;
    }
    set
    {
        _fieldActivityNameWUnit = value;
    }
}
 
public int ActivityMonth
{
    get
    {
        return _activityMonth;
    }
    set
    {
        _activityMonth = value;
    }
}
 
public string ActivityMonthName
{
    get
    {
        return _activityMonthName;
    }
    set
    {
        _activityMonthName = value;
    }
}
 
public string FieldActivity
{
    get
    {
        return _fieldActivity;
    }
    set
    {
        _fieldActivity = value;
    }
}

If you look at the attached graphic, really all I want is the totalvalue displayed.not the month number or the totalhours.  how do I get rid of these other two series?  here is my code so far:
    protected void CreateYearChart()
    {
 
        RadChartProjectActivityYearly.Legend.Clear();
        RadChartProjectActivityYearly.Series.Clear();
 
        FieldActivity _activity = FieldActivityService.GetByID(Int32.Parse(ddlFieldActivity.SelectedValue.ToString()));
        RadChartProjectActivityYearly.ChartTitle.TextBlock.Text = _activity.Unit + " in " + ddlDetailYear.SelectedItem.Text;
 
        List<FactProjectActivityTotalsByMonth> _factsBar1 = FactProjectActivityTotalsByMonthService.GetForYear(Int32.Parse(ddlDetailYear.SelectedItem.Text), Int32.Parse(ddlFieldActivity.SelectedValue.ToString()));
 
        RadChartProjectActivityYearly.DataSource = _factsBar1;
 
        RadChartProjectActivityYearly.Legend.Visible = true;
 
//        RadChartProjectActivityYearly.Series[0].DataYColumn = "TotalValue";
        RadChartProjectActivityYearly.PlotArea.XAxis.DataLabelsColumn = "ActivityMonthName";
         
        RadChartProjectActivityYearly.DataBind();
        RadChartProjectActivityYearly.AutoLayout = true;
 
        foreach (Telerik.Charting.ChartSeries series in RadChartProjectActivityYearly.Series)
        {
            Debug.WriteLine(series.Name);
            //if (series.Name != "TotalValue")
            //{
            //    RadChartProjectActivityYearly.Series.Remove(series);
            //}
        }
 
        //RadChartProjectActivityYearly.RemoveSeriesAt(2);
        //RadChartProjectActivityYearly.RemoveSeriesAt(0);

I thought about creating the series manually but then I lose the X-axis labels so ideally I'd like to be able to databind to only one property of the object in the underlying list.  Her is the declaration:
<telerik:RadChart ID="RadChartProjectActivityYearly" runat="server" skin="Forest" Width="1000px" >
<Legend>
 <Appearance Position-AlignedPosition="TopRight"></Appearance>
 </Legend>
    <PlotArea>
        <XAxis AutoScale="False" DataLabelsColumn="ActivityMonthName" ></XAxis>
    </PlotArea>
</telerik:RadChart>
thanks for the help
Petar Kirov
Telerik team
 answered on 04 Oct 2012
11 answers
235 views

HI Telerik,

I am looking for a file explorer for web application (web page) which should look like vista explorer or your FirstLook exploerer at http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/default/defaultcs.aspx. Do you have any sample code to go ahead with this control? Can i add my own button in the menu? I would prefer vista explorer but i am ok with the example provided also. Could you please suggest me regarding this? I am using  Rad file explorer for the first time and does not have much idea about its properties, how to bind etc.
Please do the needful ASAP.

Regards,
Srikanth
Vessy
Telerik team
 answered on 04 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?