Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views

Hi . 

I am having a radgrid with having  3 EditItemTemplate which uses 2 Combobox  and one RadTextBox . When the page is loaded for first time the insert/Add section on top of the grid is available . But after first insertion only the item binded is shown in the grid . The add section is not rendered . However on delete command the Add section reapper and I am able to add the items but then again on adding item insert row vanishes . 

 

I am providing the code of .ascx and code behind below . Kindly help as it is stuck for quite long time .

 

  <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyReasonReflight" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="GrdReasonReflight">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="GrdReasonReflight" LoadingPanelID="DefaultLoadingPanel"
                        UpdatePanelRenderMode="Inline" />
                </UpdatedControls>
            </telerik:AjaxSetting>          
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

    <asp:Panel ID="Panel1" runat="server" Style="padding: 5px;">
       <div style="margin-top: 0px">
             You have 
                <telerik:RadNumericTextBox ID="TxtTotalOnBoardValue" runat="server" EnableViewState="true" MinValue="0" Value="0" Width="20">
                    <NumberFormat DecimalDigits="0" />
                    <IncrementSettings InterceptArrowKeys="false" InterceptMouseWheel="false" />
                </telerik:RadNumericTextBox>
             reasons for reflight from A/C Follow up.                                   
         </div>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <telerik:RadGrid ID="GrdReasonReflight" runat="server"  AutoGenerateColumns="false"
            AllowMultiRowSelection="false" Width="100%" OnPreRender="GrdReasonReflight_PreRender"
            OnItemCommand="GrdReasonReflight_ItemCommand" OnItemDataBound="GrdReasonReflight_ItemDataBound"
            OnNeedDataSource="GrdReasonReflight_NeedDataSource">
            <ValidationSettings ValidationGroup="GrpValReasonReflight" CommandsToValidate="PerformInsert,Update"
                EnableValidation="true" />
            <MasterTableView EditMode="InPlace" InsertItemDisplay="Top"
                EnableNoRecordsTemplate="false" DataKeyNames="TemporaryId">
                <NoRecordsTemplate></NoRecordsTemplate>
                <Columns>

                      <telerik:GridTemplateColumn UniqueName="Details" HeaderText="Details" AllowFiltering="false">
                        <ItemStyle Width="40%" />
                        <HeaderStyle Width="40%" />
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "AdditionalDetail")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadTextBox runat="server" ID="Details" Text='<%# Bind("AdditionalDetails") %>' MaxLength="50" Rows="2" TextMode="MultiLine" EmptyMessage="Enter details" 
                                Width="95%" onfocus="focusOnInsertButton(this);" Visible="true" ValidationGroup="GrpValReasonReflight">
                            </telerik:RadTextBox>
                            <asp:RequiredFieldValidator ID="ValAdditionalDetail" runat="server" ControlToValidate="Details" Display="None"
                                ErrorMessage="Required field." ValidationGroup="GrpValReasonReflight"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>

                     <telerik:GridTemplateColumn UniqueName="Category" HeaderText="Category" ItemStyle-Width="400px">
                        <ItemStyle Width="20%" />
                        <HeaderStyle Width="20%" />
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "CategoryName") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox runat="server" ID="CmbCrewCategory" DropDownWidth="150" DataTextField="ReasonCategoryName" EmptyMessage="Select a Reason Category"  
                                DataValueField="IdReasonCategory" Filter="StartsWith" HighlightTemplatedItems="true" 
                                Width="99%"  AllowCustomText="true" OnClientKeyPressing="OnGrdCrewsCmbCrewTrigramKeyPressing"
                                OnClientTextChange="OnTrigramClientTextChange" ValidationGroup="GrpValReasonReflight"
                                OnClientFocus="RadCombobox_OnFocus"  AutoPostBack="true"
                                EnableLoadOnDemand="true"  OnItemsRequested="CmbCategory_ItemsRequested"  OnSelectedIndexChanged="CmbCategory_BoundToReason">
                                <ItemTemplate>
                                    <asp:Label ID="LblCmbCategoryNameTrigram" runat="server"><%# Eval("ReasonCategoryName") %></asp:Label>
                                </ItemTemplate>
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>


                 <telerik:GridTemplateColumn UniqueName="Reason" HeaderText="Reason" ItemStyle-Width="400px">
                        <ItemStyle Width="20%" />
                        <HeaderStyle Width="20%" />
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "ReasonName") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                             <telerik:RadComboBox runat="server" ID="CmbCrewReason" DropDownWidth="150" DataTextField="ReasonName" EmptyMessage="Select a reason" 
                                DataValueField="IdReason" Filter="StartsWith" HighlightTemplatedItems="true" 
                                Width="99%"  AllowCustomText="true" OnClientKeyPressing="OnGrdCrewsCmbCrewTrigramKeyPressing"
                                OnClientTextChange="OnTrigramClientTextChange" ValidationGroup="GrpValReasonReflight"
                                OnClientSelectedIndexChanged="OnTrigramClientSelectedIndexChanged" OnClientFocus="RadCombobox_OnFocus" EnableLoadOnDemand="true">
                                <ItemTemplate>
                                    <asp:Label ID="LblCmbCrewTrigram" runat="server"><%# Eval("ReasonName") %></asp:Label>
                                </ItemTemplate>
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                  
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"  
                        EditImageUrl="~/Content/images/Edit.gif">
                        <ItemStyle HorizontalAlign="Center" Width="15%" />
                        <HeaderStyle Width="15%" />
                    </telerik:GridEditCommandColumn>

                    <telerik:GridButtonColumn UniqueName="DeleteCommandColumn" CommandName="Delete" ButtonType="ImageButton" ImageUrl="~/Content/images/delete.png"
                        ConfirmText="Are you sure you want to delete this crew member?">
                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                        <HeaderStyle Width="5%" />
                    </telerik:GridButtonColumn>

                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                <ClientEvents OnRowDblClick="GrdReasonReflightRowDblClick" OnCommand="GrdReasonReflight_OnCommand" />
                <KeyboardNavigationSettings EnableKeyboardShortcuts="true" AllowSubmitOnEnter="true" ValidationGroup="GrpValReasonReflight" />
            </ClientSettings>       
        </telerik:RadGrid>
    </asp:Panel>

 

 

 

 

 

 

 

 

Attila Antal
Telerik team
 answered on 24 Jun 2019
1 answer
111 views

I would like an example to assemble a chart into columns from a datatable.

The information in the column named "Type" should be tiled.

The following is an example of the table.

Thank you very much in advance

I'm using an automatic translator.

Vessy
Telerik team
 answered on 24 Jun 2019
3 answers
178 views

     Hi,

  i am  trying  to achieve cascade filtering in Excel like Filtering. but there is no clear information available. Please help me out

Rumen
Telerik team
 answered on 24 Jun 2019
1 answer
94 views

hi all i have a nestedgrid with a theme, i give it the data from a stored procedure, but some row change color after the DataBind() method can you explain me why?

i attached to you an image

Attila Antal
Telerik team
 answered on 24 Jun 2019
1 answer
179 views

Hi,

I am using Kendo ComboBox for one of the functionality like Cascading comboboxes. I am not finding any option or property to have auto complete on ComboBox.

There is requirement to have autocomplete functionality on ComboBox.

Could you please help me out?

Thanks,

Pankaj

Rumen
Telerik team
 answered on 24 Jun 2019
8 answers
588 views
I have code and telerik versions that are the same in my development and production environments and I am getting 2 different looking screens. The columns are not lined up at all.

Attached are the production and development screenshots.

This appears to be an IE issue. Firefox looks good.
Dimo
Telerik team
 answered on 24 Jun 2019
10 answers
211 views

Hi,

i am trying to export multiple radgrid and radhtmlchart to multiple pdf pages. i am able to export but content on aspx page is very big on pdf file. the contents are getting cut and only left most part is partially printed. how can i make contents in my webform (aspx) get printed as is to pdf with same size.

page break is working fine, but the content is getting exported so big that only left more content is printed little.

i have followed the below links but no use:

https://docs.telerik.com/devtools/aspnet-ajax/controls/clientexportmanager/functionality/export-html-elements

https://docs.telerik.com/devtools/aspnet-ajax/controls/clientexportmanager/functionality/pdf-multi-page-export

Rumen
Telerik team
 answered on 20 Jun 2019
3 answers
272 views

Hello, 

How can I remove week numbers or GridDateTimeColumn filter please?

Rumen
Telerik team
 answered on 20 Jun 2019
1 answer
163 views

When item have long word data value does not fit and goes beyond

 

Input data: Value to be displayed in grid - "MylongLongLongLongWord cut" 

Actual Result: in my grid fiels i see in first line "MylongLongLo" in the second "cut".

Expected result: in first line "MylongLongLo" in the second "ngLongWord cut".

 

How to make text wrap or resolve this issue? 

Vessy
Telerik team
 answered on 20 Jun 2019
2 answers
190 views

Hello,

I have a grid that uses "EditForms" to edit a record. What I would like to achieve is to disable filtering while the grid is in edit mode (both for adding a new record or editing an existing one)

Thank you,

Marc

 

Mircea
Top achievements
Rank 1
 answered on 19 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?