Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
214 views
Hi,
I have a radgrid with a custom command bar (commanditemtemplate) with a few linkbuttons on it.
Also I have the radgrid ClientSettings AllowKeyboardNavigation="true" and KeyboardNavigationSettings AllowSubmitOnEnter="true"
When I move to the command bar with the TAB key  and select a linkbutton (or use the associated AccessKey to select it immedeately), then use the ENTER key to fire the button, instead the selected record is opened for editing.
How can I skip the SubmitOnEnter when I have the linkbutton selected?

I tried the code below, it gets fired when the enter key is pressed, but still the record is selected instead of the command fired.
Any ideas?

Thanx in advance,

Regards,
Frank
Telerik.Web.UI.RadGrid.prototype._canHandleKeyboardAction = function (e) {
                var keyCode = e.keyCode || e.charCode;
                if ((keyCode == 32 || keyCode == 13)
                && this.ClientSettings.KeyboardNavigationSettings.EnableKeyboardShortcuts) {
                    var target = Telerik.Web.UI.Grid.GetCurrentElement(e);
                    if (target.tagName.toLowerCase() == "a") {                        
                        return false;
                    }
                }
                return true;
            }

Antonio Stoilkov
Telerik team
 answered on 03 Oct 2012
5 answers
212 views
hello everybody
can i insert a row like "all day row" in this exemple
http://demos.telerik.com/aspnet-ajax/scheduler/examples/webservice/defaultcs.aspx.
sorry for my english. :D
thanks!

Princy
Top achievements
Rank 2
 answered on 03 Oct 2012
2 answers
139 views
how to rebind radgrid from codebehind in c#
Prab
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
190 views
Please give me a suggestion like normal asp control have checkboxlist and radiobuttonlist . Is telerik having the same control like checkboxlist and radiobuttonlist control which is available in asp controls.
Princy
Top achievements
Rank 2
 answered on 03 Oct 2012
11 answers
343 views
I have a web form and would like to client validation and show pop up with validation error using alert box and would like to hightlight telerik radtextbox, combobox and textarea etc. Is there any example how to achieve this functionality? I am using telerik 2010 controls.

thank you.
Princy
Top achievements
Rank 2
 answered on 03 Oct 2012
0 answers
53 views
Hi 
I created a thread some days ago but it was never answered, it seems I might have marked it as "Answered" by mistake.

Here's the thread:
http://www.telerik.com/community/forums/aspnet-ajax/panelbar/adding-button-control-to-dynamically-created-radpanelbar.aspx#2305626
Eric
Top achievements
Rank 1
 asked on 02 Oct 2012
1 answer
155 views
I have a grid which is set to 100% height. The grid displays search results. When a user clicks on the "find" button, the results are loaded in the grid. In IE (9), the grid appears correctly. In Firefox (15), there is a vertical space of about 125px below the grid pager and the grid doesn't extend all the way down to the bottom of its container. If the user clicks on "search" a second time, the grid extends properly. I have attached two screen captures demonstrating what it looks like in ie (correct) and firefox (incorrect). I have added a panel with colored background as a container for the grid so you can see it appears to be the grid which is not extending and not the container. This effect occurs even if I do not include this panel. My markup is below.
<asp:Panel id="pnlSR" runat="Server" Height="100%" style="padding:5px; background-color:Red;">
                    <telerik:RadGrid id="rgSearchResults"
                            runat="server"
                            AutoGenerateColumns="False"
                            Skin="Simple"
                            Height="100%"
                            AllowPaging="True"
                            AllowSorting="True"
                            AllowCustomSorting="True"
                            AllowMultiRowSelection="True"
                            EnableLinqExpressions="false"
                            ShowStatusBar="True"
                            ShowGroupPanel="False"
                            PageSize="30"
                             
                    >
                        <MasterTableView 
                                    DataKeyNames="CVID"
                                    ClientDataKeyNames="CVID"
                                    Width="100%"
                                    TableLayout="Fixed"
                                    GroupLoadMode="Client"
                                    >
                             
                            <Columns>  
                                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" Resizable="False" Visible="False">
                                    <HeaderStyle width="30px" HorizontalAlign="Center" CssClass="GridSelectColumnItem"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" CssClass="GridSelectColumnItem" ></ItemStyle>
                                </telerik:GridClientSelectColumn>
                                <telerik:GridImageColumn UniqueName="detailIcon" ImageWidth="16px" ImageUrl="~/global/images/icons/search.png" ImageAlign="Middle" AlternateText="View Visit Detail"  AllowSorting="False" AllowFiltering="false" Visible="False">
                                    <HeaderStyle width="30px" HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" CssClass="HoverCursor"></ItemStyle>
                                </telerik:GridImageColumn>
                                <telerik:GridBoundColumn HeaderText="CVID" DataField="CVID" SortExpression="CVID">
                                    <HeaderStyle width="125px" HorizontalAlign="Left"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="SpacerColumn" AllowFiltering="false" SortExpression="" ></telerik:GridTemplateColumn>
                            </Columns>
                             
                            <CommandItemTemplate>
                                 
                            </CommandItemTemplate>
 
                            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="True"/>
                             
                        </MasterTableView>
                         
                        <ClientSettings AllowExpandCollapse="True" >
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False"  />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100%" />
                            <Resizing AllowColumnResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"/>
                            <ClientEvents OnGridCreated="GridCreatedHandler_VFC" OnRowSelecting="CancelNonInputSelect" OnRowSelected="GridRowSelectedHandler_VFC" OnRowDeselected="GridRowDeselectedHandler_VFC"   />
                        </ClientSettings>
                         
                    </telerik:RadGrid>
 
                   
                     
                </asp:Panel>

Galin
Telerik team
 answered on 02 Oct 2012
1 answer
1.3K+ views
How do I work with the RadGrid GridButtonColumn if in case I want to use the button to edit a record?  I have not seen any documentation as far as this control is concerned, can somebody point me in the right direction as far as programming a datasource with this control? 
Thank you!
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Oct 2012
3 answers
94 views
I have a strange problem. I am using a UserControl (say UserControlA) that has a RadGrid on it which is inside another UserControl (say UserControlB) that is Ajax enabled with RadAjax. So it looks like this:


Page > UserControlB (Ajax Enabled) > UserControlA > RadGrid


On a test page this works fine with the ItemCommand of RadGrid firing properly.


Now when I put the UserControlB in my final page (that has many other controls), the ItemCommand of the RadGrid does not fire at all! The funny thing is that this page has many other usercontrols that has its own grid which fires just fine!


So, the only thing I can think of is the Ajax Enabled UserControlB.


The ItemCommand is used in the straignt forward way:


...
        <telerik:GridTemplateColumn HeaderText="Actions">
            <ItemTemplate>
                <asp:Panel id="iconsPanel" runat="server" Visible="<%# IsActionVisible() %>">
                <asp:ImageButton ID="btnDelete" runat="server"ImageUrl="~/images/icons/Small/delete.gif"
                    ToolTip="Delete Document" CommandName="Delete" />
                    </asp:Panel>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
...


Then I am using normal DataSource() and DataBind()


finally the ItemCommand is created as:


private void InitializeComponent()
   {
       this.Init += new System.EventHandler(this.Page_Init);
       this.Load += new System.EventHandler(this.Page_Load);
       grdDocuments.ItemCreated += newTelerik.Web.UI.GridItemEventHandler(grdDocuments_ItemCreated);
       grdDocuments.ItemDataBound += newGridItemEventHandler(grdDocuments_ItemDataBound);
       grdDocuments.ItemCommand += newGridCommandEventHandler(grdDocuments_ItemCommand);
   }


Any ideas on how to proceed? I am running out of options, tried many things but nothing worked! 
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Oct 2012
3 answers
246 views
Hey there,

Anyone know how to get a custom attribute from a RadNumericTextBox?  I've tried:

<telerik:RadNumericTextBox ID="RadNumericTextBox0" testAtrb="Hello world" ... 


function ValueChanged(sender, eventArgs) 
     alert(sender.testAtrb); 
     alert(sender.get_element().testAtrb); 
     alert(sender.get_element().getAttribute("testAtrb")); 
         

But no worky :(
Kavitha
Top achievements
Rank 1
 answered on 02 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?