Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
249 views
We have a RadGrid with multiple columns.  Two of the columns are Bound to some Lazy Loaded properties.

The first looks like this:

<telerik:GridBoundColumn DataField="Contact.FullName" DataType="System.String" FilterControlAltText="Filter Portfolio Manager column" HeaderText="Portfolio Manager" HeaderButtonType="TextButton" SortExpression="PortfolioManager" UniqueName="PortfolioManager" FilterControlWidth="60%">
     <HeaderStyle CssClass="GridHeaderControlColor" Width="25%" />
</telerik:GridBoundColumn>

The other looks like this:
<telerik:GridBoundColumn DataField="Contact1.Fullname" FilterControlAltText="Filter Compliance Officer column" SortExpression="ComplianceOfficer" HeaderText="Compliance Officer" HeaderButtonType="TextButton" UniqueName="ComplianceOfficer" DataType="System.String" FilterControlWidth="60%">
     <HeaderStyle CssClass="GridHeaderControlColor" Width="20%" />
</telerik:GridBoundColumn>


They are bound to different columns obviously but both are lazy loaded from the Contact table.

The first one (Portfolio Manager) Filters fine.

The second (Compliance Officer), when you Filter we get errors about Null Reference.
The error does not trigger any stoppage in Debug mode, it just goes straight back to the page and the Stack Trace doesn't touch any of our code.

I THINK the issue is that the second column can have NULLs, but I have no idea how to handle Null values on Lazy Loaded Bound objects.



Here is the Stacktrace:

[NullReferenceException: Object reference not set to an instance of an object.]
   lambda_method(Closure , PMD_ComplianceLoanAdminReport ) +62
   System.Linq.WhereEnumerableIterator`1.MoveNext() +141
   System.Linq.Enumerable.Count(IEnumerable`1 source) +225
   lambda_method(Closure ) +149
   System.Linq.EnumerableExecutor`1.Execute() +94
   System.Linq.EnumerableExecutor`1.ExecuteBoxed() +23
   System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute(Expression expression) +94
   Telerik.Web.UI.GridDynamicQueryable.Count(IQueryable source) +296
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData35() +4216
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +1064
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +58
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +45
   Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +31
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +221
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +154
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +566
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +223
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +622
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +800
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +66
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   Telerik.Web.UI.GridTableView.DataBind() +363
   Telerik.Web.UI.GridTableView.Rebind() +100
   Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source) +954
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +200
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +66
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +142
   Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object commandArgument) +80
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +9998
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Bryan
Top achievements
Rank 1
 answered on 06 Jul 2015
4 answers
744 views
Every time I start VS 2010 I am prompted to update Telerik WebUI VSExtensions from 2013.2.611 to 2013.3.1022 however when I click on the Install button after the update is downloaded the install just hangs and does nothing indefinitely.

The biggest problem is that I cannot even Uninstall 2013.2.611. When I go to Installed Extensions and click on Uninstall button I am prompted with "Are you sure you want to uninstall..." but when I click on Yes absolutely nothing happens.

This is in VS 2010 both when I choose "Run as Administrator" or run it normally...

How do I fix this problem?
Dyanko
Telerik team
 answered on 03 Jul 2015
5 answers
92 views

Hi guys.

 

I´m new using RadImageGallery, and I was wondering if is it possible  to change the image of previous and next image in the ImageArea.

Can you please help me how to achieve this goal?.

 

Best regards.

Cristian.

Cristian
Top achievements
Rank 1
 answered on 03 Jul 2015
1 answer
78 views

Is there a way to minimize the ammount of requests performed by the RadGrid control? Telerik controls are performing a lot of requests for retrieving skins and JS files required by the component. Is there anything already provided by Telerik for bundling these multiple requests in perhaps two requests? One would be for a single minified JS file and the other one for all of the styles required.

1) I am using the default Skin for the RadGrid.

2) I cannot rely in caching because it's disabled in a global scope. It cannot be enabled.

3) For security policies, I cannot use Telerik CDN's.

4) I am applying the following techniques but caching. The response time is still slow. The initial call takes about 5 seconds, changing pages takes just 2 seconds (Paging made via Ajax and implementing custom pagination). The main problem is the initial rendering. The target would be 2 seconds to process the page.

   http://docs.telerik.com/devtools/aspnet-ajax/general-information/performance/optimizing-performance
   http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/performance/grid-performance-optimizations

 

Does anyone have any suggestions or faced a scenario similar to the one I am describing?

 

Thanks in advance,
Carlos

Pavlina
Telerik team
 answered on 03 Jul 2015
1 answer
347 views

Hi,

 Currently I am using RadCombobox with EnableLoadOnDemand="True" and CheckBoxes="True".Loading Items using OnItemsRequest Event. After postback, selected RadComboBox values are not persisting. Is it not supported in latest version also? Is there any solution for this issue in future release.

 <telerik:RadComboBox ID="pCompany" Width="300px" runat="server" EnableLoadOnDemand="True"
                                    ShowMoreResultsBox="true" EnableVirtualScrolling="true" ItemsPerRequest="10" OnItemsRequested="pCompany_ItemsRequested"
                                    CheckBoxes="true" EnableCheckAllItemsCheckBox="true" OnSelectedIndexChanged="ppCompany_SelectedIndexChanged"
                                    AutoPostBack="true" Height="140px">
</telerik:RadComboBox>

 

Dimitar
Telerik team
 answered on 03 Jul 2015
1 answer
149 views

I have the following Grid. The problem is I can not add a RequiredFieldValidator for the GridDateTimeColumn in edit mode, as I did for the other columns. I would like to know if it is possible, in the code behind C#, to disable the insert button (the tick sign) when the date is not valid or if I can add a validator for the date, that would not allow to insert an item if the corresponding date is not valid. I have also attached a picture. 

 Thank you very much for any idea, Alexandru Popa.

<telerik:RadGrid ID="rgMealPlanPrices" runat="server" AutoGenerateColumns="false"
                                AllowFilteringByColumn="False" AllowSorting="True" AllowPaging="True" PageSize="30"
                                OnNeedDataSource="rgMealPlanPrices_NeedDataSource"
                                OnDeleteCommand="rgMealPlanPrices_DeleteCommand"
                                OnItemDataBound="rgMealPlanPrices_ItemDataBound"
                                OnInsertCommand="rgMealPlanPrices_InsertCommand"
                                OnItemCommand="rgMealPlanPrices_ItemCommand"
                                OnItemCreated="rgMealPlanPrices_ItemCreated">
                                <MasterTableView DataKeyNames="Id" CommandItemDisplay="TopAndBottom" ShowHeadersWhenNoRecords="True"
                                    TableLayout="Fixed" EditMode="InPlace" meta:resourcekey="rgMealPlanPricesResource">
                                    <CommandItemSettings AddNewRecordText="Adauga" ShowRefreshButton="False" ExportToPdfText="Export to PDF" />
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False">
                                        <HeaderStyle Width="19px"></HeaderStyle>
                                    </ExpandCollapseColumn>
 
                                    <Columns>
                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" HeaderStyle-Width="30px">
                                        </telerik:GridEditCommandColumn>
 
                                        <telerik:GridBoundColumn DataField="Id" HeaderText="Id" ReadOnly="true" UniqueName="Id"
                                            ForceExtractValue="Always" ConvertEmptyStringToNull="true" Display="False" />
                                        <telerik:GridBoundColumn DataField="Code" HeaderText="Cod" meta:resourcekey="MealPlanCodeResource" Display="False" UniqueName="MealPlanCode">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn DataField="MealPlan" HeaderText="Regim de masa" UniqueName="MealPlanName" meta:resourcekey="MealPlanResource">
                                            <EditItemTemplate>
                                                <telerik:RadComboBox ID="rcbMealPlan" runat="server" AppendDataBoundItems="True"
                                                    DataTextField="DisplayName" DataValueField="Id" Filter="Contains" MarkFirstMatch="true"
                                                    DropDownWidth="240" EmptyMessage="Search by name" meta:resourcekey="rcbMealPlanResource" Width="240">
                                                </telerik:RadComboBox>
                                                <asp:RequiredFieldValidator ID="rfvMealPlan" runat="server" ControlToValidate="rcbMealPlan" EnableClientScript="true" SetFocusOnError="true"
                                                    meta:resourcekey="rfvMealPlanResource"
                                                </asp:RequiredFieldValidator>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <%# Eval("DisplayName") %>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="MealPlanPrice" HeaderText="Pret" UniqueName="MealPlanName" meta:resourcekey="MealPlanPriceResource">
                                            <EditItemTemplate>
                                                <telerik:RadNumericTextBox ID="txtPrice" runat="server" DataType="System.Decimal" Width="50px">
                                                    <NumberFormat DecimalDigits="2" DecimalSeparator="." GroupSeparator="" KeepNotRoundedValue="true" AllowRounding="false" />
                                                </telerik:RadNumericTextBox>
                                                <asp:RequiredFieldValidator ID="rfvPrice" runat="server" ControlToValidate="txtPrice" EnableClientScript="true" SetFocusOnError="true"
                                                    meta:resourcekey="rfvMealPlanResource" />
 
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <%# Eval("Price") %>
                                            </ItemTemplate>
                                            <HeaderStyle Width="80px" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="MealPlanCalories" HeaderText="Calorii" UniqueName="MealPlanCalories" meta:resourcekey="MealPlanCaloriesResource">
                                            <EditItemTemplate>
                                                <telerik:RadNumericTextBox ID="txtCalories" runat="server" DataType="System.Decimal" Width="50px">
                                                    <NumberFormat DecimalDigits="0" DecimalSeparator="." GroupSeparator="" KeepNotRoundedValue="true" AllowRounding="false" />
                                                </telerik:RadNumericTextBox>
                                                <asp:RequiredFieldValidator ID="rfvCalories" runat="server" ControlToValidate="txtCalories" EnableClientScript="true" SetFocusOnError="true"
                                                    meta:resourcekey="rfvMealPlanResource" />
 
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <%# Eval("Calories") %>
                                            </ItemTemplate>
                                            <HeaderStyle Width="180px" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="MealPlanConfortSporit" HeaderText="ConfortSporit" UniqueName="MealPlanConfortSporit">
                                            <EditItemTemplate>
                                                <asp:CheckBox ID="ckbConfortSporit" runat="server" ></asp:CheckBox>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <%# Eval("ConfortSporit") %>
                                            </ItemTemplate>
                                            <HeaderStyle Width="180px" />
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridDateTimeColumn DataField="IssueDate" HeaderText="Valid de la" HeaderStyle-Wrap="true" DataFormatString="{0:dd.MM.yyyy}"
                                            meta:resourcekey="ValidFromResource" PickerType="DatePicker" Resizable="true">
                                            <HeaderStyle Width="80px" />
                                        </telerik:GridDateTimeColumn>
                                        <telerik:GridButtonColumn ConfirmText="Delete this meal plan?" ConfirmDialogType="RadWindow" ConfirmDialogHeight="110px"
                                            ConfirmTitle="Delete" ButtonType="ImageButton" Text="Delete" CommandName="Delete" meta:resourcekey="DeleteCommandResource"
                                            ImageUrl="~\Image\icon\16x16_Microsoft_Style\delete_16_OLD.gif" UniqueName="DeleteServiceColumn">
                                            <HeaderStyle Width="40px" />
                                        </telerik:GridButtonColumn>
                                    </Columns>
 
                                </MasterTableView>
                            </telerik:RadGrid>

Kostadin
Telerik team
 answered on 03 Jul 2015
3 answers
70 views
Is there any way to show a break while we have a very long duration to show in RadGantt?

For eg: when we have 25 years to show in Gantt, is there a way I can just show the first year and the last year with a break indication in between the duration Gantt line?
Bozhidar
Telerik team
 answered on 03 Jul 2015
3 answers
115 views
I have a RadGrid in my .aspx file. The second to last column is GridDateTimeColumn:<telerik:GridDateTimeColumn DataField="IssueDate" HeaderText="ValidFrom"
HeaderStyle-Wrap="true" DataFormatString="{0:dd.MM.yyyy}"
meta:resourcekey="ValidFromResource" PickerType="DatePicker" Resizable="true">
<HeaderStyle Width="80px" />
</telerik:GridDateTimeColumn>
and the last column is a GridButtonColumn. In Edit mode (InPlace), the GridDateTimeColumn becomes a RadDatePicker. However, it can't fit in the 80px of the column (only a part of the textbox is visible, and the calendar not at all). I want the RadTimePicker to overflow over the GridButtonColumn Column (which doesn't appear in edit mode). I want to do that either in the .aspx file (if possible) or in the radGrid_ItemDataBound event.Any idea is appreciated. Thank you :)
Pavlina
Telerik team
 answered on 03 Jul 2015
3 answers
64 views

Hello,

I'm using AjaxManager in my MasterPage, and AjaxManagerProxy inside my content pages.

I would like to update a label (error or success result) included into my masterpage after clicking any button included inside content pages ajaxified.

But why ajaxify all buttons because each postback done must imperatively refreshing my masterpage label...

I think i can not write dynamically an ajaxsettings with an unknown AjaxifiedControlID, doesn't it ?

Thank you.

Maria Ilieva
Telerik team
 answered on 03 Jul 2015
12 answers
1.9K+ views
I am hoping this is a fairly easy one - but have not found any documentation on it.

I have several ComboBoxes on a page that use the new(ish) checkbox feature for each item.  When the user clicks a Clear button, I would like to uncheck any checked items in each Combobox, and if necessary, reset to the EmptyMessage.  This does not seem to work:

function clearFilters(sender, args) {
                var combo = $find("<%= RadComboBox1.ClientID %>");
                combo.clearItems;
                combo.clearSelection;
}

Gowtham
Top achievements
Rank 1
 answered on 03 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?