Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
144 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
63 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
106 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
58 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.8K+ 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
2 answers
77 views

I have nested RadMenuItems hard coded in an aspx file with 3 different but similar menus.  Under a certain condition I need to remove the second menu item in each menu which works fine in the Visual Studio 2013 test environment. When I deploy to GoDaddy, remove on the third menu does not work in Page_Load. 

GoDaddy the items in the third menu in the aspx file are not fully instantiated in Page_Load. 

I was forced to code to check if the hard coded menu items exist and abandon the remove to avoid run-time errors.

if (JoinButtonMenu.Items.Count > 2 && JoinButtonMenu.Items.Count > 2)  {     
     JoinButtonMenu.Items[1].Items[1].Remove();
}

<telerik:RadContextMenu ID="JoinButtonMenu" CssClass="RadContextMenu3" runat="server">
    <ExpandAnimation Type="None" Duration="0" />
    <CollapseAnimation Type="None" Duration="0" />
    <Items>
        <telerik:RadMenuItem Text="Edit"  NavigateUrl="javascript:MenuItemSelected('Edit');" PostBack="False" ></telerik:RadMenuItem>
        <telerik:RadMenuItem Text="Insert" PostBack="False" >
            <Items>
                <telerik:RadMenuItem Text="Insert Display Text..."  NavigateUrl="javascript:MenuItemSelected('AddText');" PostBack="False" ></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Insert Checkboxes..."  NavigateUrl="javascript:MenuItemSelected('AddChecks');" PostBack="False" ></telerik:RadMenuItem>

....

The menu items missing in the Page_Load code all show up fine in the page including the one I need to get rid of.

Any ideas how to work around this problem and why it is happening?

George
Top achievements
Rank 2
 answered on 03 Jul 2015
1 answer
91 views

Hello there,

I am using a RadGrid that contains one DetailTable. The MasterTable is set to 100% total width and the DetailTable to 95%. In Details table i have a column of long string (like $0000,0000,000,00). This column stretches out the detail table beyond the Master Table in Mobile or Tablet View (testing using chrome inbulit simulators). If i set the TableLayout property of DetailTable to fixed, then it crops the header and text of some columns. I can set the columns to AutoResize mode but don't want to follow this approach.

Is there any better approach where everything will become responsive in the Mobile and Tablet view? Please help

 

thanks in advance

Pavlina
Telerik team
 answered on 02 Jul 2015
1 answer
100 views

 

Hi guys.

 

Is me again, now I want to make my gallery fully responsive and adaptative to any device(Desktop, tablet, smartphone), reading  the documentation I noticed that RenderMode feature was introduced in Q1 2015, Im working now with Q2 2014.

How can I implement responsive behavior to the gallery in the version tha I´m working?

 

Thanks.

Cristian.

Pavlina
Telerik team
 answered on 02 Jul 2015
1 answer
97 views

We would like to display data from ESRI Shapefiles with up to 200,000 points and are wondering if this is possible with the asp.net ajax RadMap.

Right now, we're looking just at performance with a RadClientDataSource loading from a JSON file with 40,000 Points displayed as simple black circles.  Panning is fairly fast, but zooming in or out one level takes about 4 seconds, even when none of the points are in view.

I've seen a lot of information on the Silverlight and WPF forums about getting decent performance with ~200,000 points as long as very few are in view at one time, which would be acceptable, but unfortunately we cannot use these platforms.

Does the UI for ASP.NET AJAX have anything like the dynamic layer that would improve performance when a lot of data is out of view? Or are there any other strategies to improve performance when this much data needs to be loaded?

Thanks in advance,
-Andrew

Ianko
Telerik team
 answered on 02 Jul 2015
4 answers
264 views

Hi,
    First i'm sorry for my bad english, I'm not really good. But I will try to explain my problem for you can understand.

 

In the project, we have a RadComboBox who get data by a ItemRequest. This comboBox serve for select a Person who are view in DataList

<telerik:RadComboBox ID="radPersonCombo" runat="server" Width="400" DropDownWidth="700" Height="300" AccessibilityMode="true" AutoPostBack="false" EnableScreenBoundaryDetection="true" EnableVirtualScrolling="true" ItemsPerRequest="10" ShowMoreResultsBox="true" EnableLoadOnDemand="true" OnItemsRequested="radPersonCombo_ItemsRequested" CheckBoxes="true" CheckedItemsTexts="FitInInput">
    <HeaderTemplate>
         <table style="width: 682px" cellspacing="0">
         <tr>
            <th style="width: 32px"></th>
            <th style="width: 125px"><asp:label ID="radTitleLN" runat="server"><%= LocalizationTools.RM.GetString("lblName") %></asp:label></th>
             {...}
         </tr>
         </table>
    </HeaderTemplate>
    <ItemTemplate>
         <table style="width: 682px" cellspacing="0">
         <tr>
            <td  style="width: 32px"></td>
            <td style="width: 125px"><%# DataBinder.Eval(Container, "Attributes['LastName']")%></td>
            {...}
         </tr>
         </table>
    </ItemTemplate>
</telerik:RadComboBox>

 

 <asp:datalist id="dtlPerson" runat="server"> {...} </asp:datalist>

 That comboBox can have more 1000 DataItem. For this  reason  we use EnableLoadOnDemand, but the EnabledLoadOnDemand don't preserve item server-side.

 When I check the elements and I close the ComboBox. If AutoPostBack option is True.

I get the error:

Index was out of range. It must not be negative and must be less than the size of the collection.
Parameter name: index

 

I tried using the following example. However, this example remains the client side. And when I try to spent AjaxRequest to call the Fill methods that data DataList. Nothing displays.

http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultvb.aspx

 

Otherwise these is possible to align the check box in the center of the element? Since it is not included in my Template. (See Image CheckBoxMiddleAlign)

 

The desired final result should be like the image finalResult attached.

MathieuB
Top achievements
Rank 1
 answered on 02 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?