This is a migrated thread and some comments may be shown as answers.

EnablePostBackOnRowClick without AllowRowSelect disables Command Buttons

5 Answers 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 07 Mar 2008, 09:39 PM
I had a new grid on a new page that would not set a row into edit mode when the edit command button was clicked - though the OnEditCommand event was still firing.  After extended head-scratching I discovered that if you set ClientSettings-EnablePostBackOnRowClick="true" it will prevent the command buttons from functioning unless you include AllowRowSelect="true"...

<ClientSettings EnablePostBackOnRowClick="true">
     <Selecting AllowRowSelect="true" />
</ClientSettings>


5 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 10 Mar 2008, 02:01 PM
Hello Richard,

I have attached a page which does not suffer this issue. Try adding the latest RadControls "Prometheus" (2007.3.1425) and let us know if it works fine for you.

Best wishes,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Richard
Top achievements
Rank 1
answered on 10 Mar 2008, 03:10 PM
Interesting.  The bare page with just the grid on it works ok.  Try adding a few more controls to it though.  If I take your page and add 3 RadCalendar controls it no longer works.  I am using 2007.3.1425.

Richard
0
Ves
Telerik team
answered on 13 Mar 2008, 01:39 PM
Hi Richard,

Thanks for the details. I was able to reproduce it. This seems to be an issue in RadGrid. I have notified our developers of it, so they will investigate it.

For the time being you can use the following workaround: enable selection in RadGrid (this fixes the issue) and wire RowSelecting client-side event. In the javascript function you only need to cancel the event, so there will never be a selected item. Here is an example:

<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" > 
            <MasterTableView> 
                <Columns> 
                    <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings EnablePostBackOnRowClick="true"
                <Selecting AllowRowSelect="true" /> 
                <ClientEvents OnRowSelecting="RowSelecting" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
        <script type="text/javascript"
            function RowSelecting(sender, args) 
            { 
                args.set_cancel(true); 
            } 
        </script> 

Your Telerik points have been updated.

Best wishes,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
mjones
Top achievements
Rank 1
answered on 13 Aug 2008, 08:02 PM
Has this issue been fixed yet?
0
Iana Tsolova
Telerik team
answered on 18 Aug 2008, 12:37 PM
Hello mjones,

Indeed the issue is fixed and does not persists in the latest version of RadControls. Please try updating and let us know if any issues arise.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Ves
Telerik team
Richard
Top achievements
Rank 1
mjones
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or