Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
225 views
I have a boundcolumn with a column validator that looks like this:

<telerik:GridBoundColumn DataField="January" HeaderText="Jan" Aggregate="Sum" FooterAggregateFormatString="{0:n0}">
                            <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                <RequiredFieldValidator ForeColor="Red" ErrorMessage="January required" Text="*" Display="Dynamic"></RequiredFieldValidator>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>


The field January is an integer. How would I be able to make it allow ONLY integers. Currently I can enter "hello world" and save it.
Alexander
Top achievements
Rank 1
 answered on 27 Aug 2014
7 answers
541 views

I'm getting the following exception on a random basis.

My grid is bound to a datatable stored in the session.
I don't think it's related to session timeout...but I might be wrong...
How can I resolve the issue?

ID is neither a DataColumn nor a DataRelation for table .

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: ID is neither a DataColumn nor a DataRelation for table .

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: ID is neither a DataColumn nor a DataRelation for table .]
   System.Data.DataRowView.get_Item(String property) +1741034
   Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +313

[GridException: There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.]
   Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +1188
   Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +524
   Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +187
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1573
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +768
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +354
   Telerik.Web.UI.RadGrid.DataBind() +165
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +3869
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +177
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Jose
Top achievements
Rank 2
 answered on 27 Aug 2014
2 answers
45 views
Hi Everyone,

I was wondering if someone can provide me with some help or guidance.  I have a RadGrid that is being fill manually(code behind) using entity framework. One of the column contain a foreign key ID(DataField="CostCenterType_ID") which will make no sense to a user.  How can I get it to display primary table description column?  Below is the columns for my grid and code behind to fill it. Thank you in advance....

01.<Columns>
02.        <telerik:GridEditCommandColumn ButtonType="ImageButton" />
03.        <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="true"
04.                    ForceExtractValue="Always" ConvertEmptyStringToNull="true" DataType="System.Int32" />
05.                <telerik:GridBoundColumn DataField="CostCenterNumber" HeaderText="Cost Center No" Visible="true" DataType="System.Int32" />
06.                <telerik:GridBoundColumn DataField="CostCenterName" HeaderText="Cost Center Name" />
07.                <telerik:GridBoundColumn DataField="CostCenterType_ID" HeaderText="Cost Type"/>
08.                <telerik:GridBoundColumn DataField="UpdateBy" HeaderText="Last Update by" ReadOnly="True" Visible="True" AllowFiltering="False" />
09.                <telerik:GridBoundColumn DataField="UpdateDateTime" HeaderText="UpdateDateTime" Visible="true" DataType="System.DateTime" ReadOnly="True" AllowFiltering="False" />
10.                 <telerik:GridBoundColumn DataField="RowVersion" HeaderText="Row Version" DataType="System.Byte" Visible="false" ReadOnly="true"></telerik:GridBoundColumn>
11.                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
12.                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
13.         </Columns>

1.//Supply RadGrid with data from Entity Framework
2.       protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
3.       {
4.           RadGrid1.DataSource = DbContext.CostCenters;
5.       }
Anthony
Top achievements
Rank 1
 answered on 27 Aug 2014
2 answers
227 views
Hi,

I have RadHtmlChart inside a RadDock. I've got a refresh button on the RadDock command that refreshes the grid. When you click on the chart series it toggles the bars visibility.

If the user hide a series then clicks the refresh button on the dock, the hidden series is shown again.

Is it possible to maintain the visibilty toggle state after a postback? Using the RadPersistenceFramework perhaps?

Thanks in advance,

Matt
Matt
Top achievements
Rank 1
 answered on 27 Aug 2014
2 answers
44 views
Starting with the grid grouping demos using summed numeric data, I also turned on column reordering. When I reorder a column, the group footer cells don't move with the rest of the columns - the normal data cells moves, and the grid "total" footer" cells move, but each group footer cell stays in the old location.

Am I doing something wrong? Anything I should try?


I see someone had a similar problem a year ago, but had to write his own javascript solution. I'd prefer to avoid that if possible. :)
http://www.telerik.com/forums/radgrid-question-about-grouping-aggregate-functions-and-column-reorder

Using asp.net ajax 2014 Q1 release
Joel
Top achievements
Rank 1
 answered on 27 Aug 2014
1 answer
80 views
I don't know why but I am encountering problems with the Telerik ASP.net Ajax platform.  I am attempting to replicate a demonstration located at the following link: http://demos.telerik.com/aspnet-ajax/imageeditor/examples/imageupload/defaultcs.aspx

Now I copied everything, the same controls, the same markup for the front end code and still, it doesn't work.  What gives?  I'm confused, why the inconsistency?

Vessy
Telerik team
 answered on 27 Aug 2014
3 answers
52 views
It is very easy to right click a folder in visual studio and add a grid to a new page.

What I cannot find out is how to easily add a grid to an EXISTING page.  I've already successfully generated the grids I needed on their separate pages.

I did get it to work once by carefully by looking at the aspx code (and this was only one grid, not two), but I would prefer to use GUI interface if possible to drag and drop or use a menu to add the grid to an existing page.  I haven't had two grids working on the same page yet, GUI or no GUI!

The page is very simple - it's just a master page and not much else.
Viktor Tachev
Telerik team
 answered on 27 Aug 2014
1 answer
62 views
I was noticing on my Radscheduler implementation that in both Day and Timeline view that when you navigate using the "today" button the view displays today's date +1. Can someone tell me why that is? The demo site below does the same exact thing. Shouldn't "today" actually show the the current day? When you don't set the selecteddate on Radscheduler in the markup it does the same thing on initial render.

http://demos.telerik.com/aspnet-ajax/scheduler/examples/timelineview/defaultcs.aspx

The biggest issue that is a side effect of this is that if I set Radscheduler1.SelectedDate = DateTime.Now  on page load any appointment that is shown in the view starts a day prior to its actual all day date making it span 2 days instead of 1. 
Boyan Dimitrov
Telerik team
 answered on 27 Aug 2014
1 answer
78 views
Hi All,

In RadGrid,


   <rad:GridTemplateColumn HeaderText="Is Critical" DataField="IsCritical"  ShowFilterIcon="true">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="IsCriticalLbl" Text='<%# YesNo(Eval("IsCritical"))%>'></asp:Label>
                            </ItemTemplate>
   </rad:GridTemplateColumn>

Here, i have to filter that column by the return value of 'YesNo(Eval("IsCritical")' , which is the text field of the lable. But im unable set the datafield as 'YesNo(Eval("IsCritical")' in column property.  How to set that method in datafield for filter?
Marin
Telerik team
 answered on 27 Aug 2014
3 answers
196 views
I understand that you have to have a ScriptManager or a RadScriptManager on your page before you add any Ajax controls.  But what do you do if you have a RadMenu on your master page with the RadScript Manager and then on your content page you have a RadGrid?  How do you enable Ajax onto the RadGrid with your ScriptManager or RadScriptManager?  I'm a bit perplexed as to how this would work being that you can only have one ScriptManager or RadScriptManager per page.
Hristo Valyavicharski
Telerik team
 answered on 27 Aug 2014
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?