Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
137 views
I have grid that allow keyboard navigation in it .I wanna to refresh another grid while row navigation of the first one
I follow the solution in this thread
http://www.telerik.com/forums/radgrid-keyboard-navigation-trigger-select-row-on-keypress
 but still the first row i selected exist within navigation by keyboard and can not get the id of the selected row  by keyboard

JS :

function OnRowSelectedMP(sender, args) {
                alert("Row selected");
                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("SelectedMP");
            }

Aspx:

<telerik:RadGrid runat="server" ID="grd_ManPower_list" PageSize="5" CellSpacing="0" GridLines="None" OnSelectedIndexChanged="grd_ManPower_list_SelectedIndexChanged" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" ClientSettings-ClientEvents-OnRowDblClick="OnRowDblClick" OnNeedDataSource="grd_ManPower_list_NeedDataSource">
                    <MasterTableView DataKeyNames="id" ClientDataKeyNames="id">
                        <Columns>
                            <telerik:GridBoundColumn DataField="id" FilterControlAltText="Filter column column" HeaderText="id" UniqueName="column" Visible="False">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Code" FilterControlAltText="Filter column1 column" HeaderText="Staff Code" UniqueName="column1">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter column2 column" HeaderText="Name" UniqueName="column2">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Trade" FilterControlAltText="Filter column3 column" HeaderText="Trade" UniqueName="column3">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                        </Columns>
 
                        <PagerStyle Mode="NumericPages" />
                    </MasterTableView>
                    <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
                        <ClientEvents OnRowSelected="OnRowSelectedMP" />
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2" ScrollHeight="162px" />
                    </ClientSettings>
                </telerik:RadGrid>

Ajax:
<AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="grd_ManPower_list">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadGrid_prop_add" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="grd_ManPower_list">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grd_ManPower_list" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>

C# :
else if (e.Argument == "SelectedMP")
            {
                foreach (GridDataItem item in grd_ManPower_list.SelectedItems)
                {
                    if (item.Selected)
                    {
//// function load the other grid according to the selected item in first grid
                    }
               }
          }

Thanks....
Sahar
Top achievements
Rank 1
 answered on 18 Feb 2014
6 answers
1.0K+ views
I have a RadGrid where I expect the "Add New" button to appear on the top of the grid even when there are no records present. In fact, it only appears when there are 1 or more records present. Furthermore, the "No records to display" text is not being shown when the grid is empty. Here is my code:

 

<telerik:RadGrid   
ID="RadGrid"   
Width="820"   
runat="server"   
AutoGenerateColumns="False"   
OnNeedDataSource="RadGrid_NeedDataSource"   
OnDeleteCommand="RadGrid_Command"   
OnInsertCommand="RadGrid_Command"   
OnUpdateCommand="RadGrid_Command"    
GridLines="None"   
ShowFooter="True"   
GroupingEnabled="False"   
Skin="Telerik">    
<MasterTableView   
DataKeyNames="CategoryID"   
GridLines="None"   
CommandItemDisplay="Top"   
NoMasterRecordsText="No Categories have been added.">    
<CommandItemSettings   
AddNewRecordText="Add New Category"   
RefreshText="Refresh Category List" />    
<Columns>    
<telerik:GridButtonColumn   
CommandName="Delete"   
Text="Delete"   
UniqueName="Delete"   
ButtonType="ImageButton">    
</telerik:GridButtonColumn>    
<telerik:GridBoundColumn   
DataField="CategoryID"   
HeaderText="CategoryID"   
UniqueName="CategoryID"   
ReadOnly="True">    
</telerik:GridBoundColumn>    
<telerik:GridBoundColumn   
DataField="CategoryTitle"   
HeaderText="CategoryTitle"   
UniqueName="CategoryTitle">    
</telerik:GridBoundColumn>    
<telerik:GridBoundColumn   
DataField="CategoryDescription"   
HeaderText="CategoryDescription"   
UniqueName="CategoryDescription">    
</telerik:GridBoundColumn>    
<telerik:GridEditCommandColumn   
ButtonType="ImageButton">    
</telerik:GridEditCommandColumn>    
</Columns>    
<EditFormSettings   
ColumnNumber="2"   
CaptionFormatString="Edit details for category with ID {0}"   
CaptionDataField="CategoryID">    
<FormTableItemStyle   
Wrap="False">    
</FormTableItemStyle>    
<FormCaptionStyle   
CssClass="EditFormHeader">    
</FormCaptionStyle>    
<FormMainTableStyle   
CellSpacing="0"   
CellPadding="3"   
Width="100%" />    
<FormTableStyle   
GridLines="Horizontal"   
CellSpacing="0"   
CellPadding="2"   
CssClass="module"   
Height="110px"   
Width="100%" />    
<FormTableAlternatingItemStyle   
Wrap="False">    
</FormTableAlternatingItemStyle>    
<FormStyle   
Width="100%"   
BackColor="#EEF2EA">    
</FormStyle>    
<EditColumn   
UpdateText="Update record"   
UniqueName="EditCommandColumn1"   
CancelText="Cancel edit">    
</EditColumn>    
<FormTableButtonRowStyle   
HorizontalAlign="Right"   
CssClass="EditFormButtonRow">    
</FormTableButtonRowStyle>    
</EditFormSettings>    
<ExpandCollapseColumn>    
<HeaderStyle   
Width="19px">    
</HeaderStyle>    
</ExpandCollapseColumn>    
<RowIndicatorColumn>    
<HeaderStyle   
Width="20px" />    
</RowIndicatorColumn>    
</MasterTableView>    
<FilterMenu   
EnableTheming="True">    
<CollapseAnimation   
Duration="200"   
Type="OutQuint" />    
</FilterMenu>    
</telerik:RadGrid>  

 

And some of code behind:

 

 

protected void RadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)   
{  
this.categories = new Categories();   
 
this.dataSet = this.categories.Select();   
 
this.RadGrid.DataSource = this.dataSet;   

 

 

Why is it not possible to add a new record when the dataset is empty (null) and why is the no records message not showing? I have insert/update/delete with ReBind working no worries apart from this.

Thanks in advance,
Richard
Matthias
Top achievements
Rank 1
 answered on 18 Feb 2014
12 answers
150 views
It seems that the last release ignore the "Label" inside the ControlToSkip property of the decorator.
Everything was working fine in previous release but now with 

<telerik:RadFormDecorator ID="RadFormDecorator1" ClientIDMode="Static" runat="server" EnableRoundedCorners="true" DecoratedControls="All" ControlsToSkip="H4H5H6, Buttons, Label" />

My <label> elements alla have those class applied

@media screen and (-webkit-min-device-pixel-ratio: 0)
.RadForm.rfdRadio label, .RadForm.rfdCheckbox label { .... }



Massimiliano
Top achievements
Rank 1
 answered on 18 Feb 2014
1 answer
84 views
In IE8 when I do drag and drop item for first time it drops. Again if I drag and drop same item it throws script error.
Below is my RadListBox code:

 <telerik:RadListBox ID="rlbId"
                                                runat="server" 
                                                AllowReorder="true" 
                                                ShowReorder="false" 
                                                EnableDragAndDrop="true"
                                                Width="375px" 
                                                Height="400px" 
                                                SelectionMode="Single">
                                                <ButtonSettings Position="Right" VerticalAlign="Top" />  
                                           <ItemTemplate>
                                                    <table class="bottomBorder" style="border-collapse: collapse; width: 100%;">
                                                        <tr>
                                                            <td style="width: 30%; border-bottom: 1px solid black; padding: 5px; text-align: left;"><%# Eval("Code")%></td>
                                                            <td style="width: 30%; border-bottom: 1px solid black; padding: 5px; text-align: left;" align="left"><%# Eval("Name")%></td>
                                                        </tr>
                                                    </table>
                                           </ItemTemplate>
                            </telerik:RadListBox> 
Nencho
Telerik team
 answered on 18 Feb 2014
4 answers
159 views
RadEditor layout issue in grid GridTemplateColumn

U have some funky layout issues in chrome and IE11 with RadEditor in a grid column..

When i open a row to edit or insert, the min-height on the RadEditor is very large over 2000px and there is a sctrroll bar in the contents and the text is not selectable and it is very large, if I refresh it works the second time.

I have attached 2 separate images to show you.

 here is the code for the column:

<telerik:GridTemplateColumn DataField="pages_body"
                        FilterControlAltText="Filter pages_body column" HeaderText="Pages Body"
                        SortExpression="pages_body" UniqueName="pages_body" Visible="false">
                        <ItemTemplate>
                            <asp:Label ID="lblField1" CssClass="text" runat="server" Text='<%# Eval("pages_body") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
 
                            <telerik:RadEditor ID="gridEditor_Body" runat="server"
                                Content='<%# Bind("pages_body") %>' ToolsFile="PagesFile.xml"
                                OnClientCommandExecuting="OnClientCommandExecuting">
                                <DocumentManager ViewPaths="~/Images/UserFiles" UploadPaths="~/Images/UserFiles"
                                    DeletePaths="~/Images/UserFiles"
                                    SearchPatterns="*.pdf" MaxUploadFileSize="4096000" />
                                <ImageManager ViewPaths="~/Images/UserFiles" UploadPaths="~/Images/UserFiles" DeletePaths="~/Images/UserFiles"
                                    SearchPatterns="*.gif,*.png,*.jpg" />
                            </telerik:RadEditor>
 
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
moegal
Top achievements
Rank 1
 answered on 18 Feb 2014
1 answer
107 views
I am trying to create a control that will allow me a calendar blocking view (By day) for a variety of meeting rooms.

Example:

 Dates   | Feb 10 | Feb 11 | Feb 12 | Feb 13 | Feb 14
------------------------------------------------------------------------
Room 1 |XXXXXXX   
Room 2 |                                   XXXXXXXXXXXXX
Room 3 |                   XXXXXXXX
Room 4 |XXXXXXXX
Room 5 |XXXXXXXXXXXXXXXXXXXXXXXXXX

Scheduler seems perfect with the drag and drop resizing and other functions I want it to support, but I can't seem to find out how to change the axis.

Is this possible?

Thanks very much,

Josh
Nencho
Telerik team
 answered on 18 Feb 2014
1 answer
90 views
Hi ,

Currently i am using a RadGrid in our application ,I am using context menu to display and hide columns at client side , Now the requirement is , suppose there are 5 columns in the grid by default  out of that using context menu i hided a column , so  there are 4 columns displaying , now when i will click on add new record of that grid view , in the edit mode i need only four text boxes instead of 5 ,it means the invisible column will take null or default value.


Please help.
Viktor Tachev
Telerik team
 answered on 18 Feb 2014
7 answers
121 views
I am working with RadMenu and I could not get my menus the way I want them to look like.
I want my menus to look like the menus on the telerik website. Only when I dropdown I need to show sub menu items. Can you help me with the skin.

I am attaching an image of what my menu looks like.
Kate
Telerik team
 answered on 18 Feb 2014
7 answers
219 views
When I am using the rad combobox and select an item and then hit backspace, the browser always navigates to the last page I was at.  How do I disable the backspace for navigation but leave it working for editing text.
Nencho
Telerik team
 answered on 18 Feb 2014
1 answer
62 views
Hi
I am using RadAsyUploader with  asp.net  updatepanel  in RadWindow  for uploading image , when image is uploaded and server site event get finish Rad Window get closes immediately. but my requirement is that it should be open and when i click on close button then it get close.
Marin Bratanov
Telerik team
 answered on 18 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?