We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Handling "Select All" in a datagrid

Thread ID:

Created:

Updated:

Platform:

Replies:

75948 Aug 18,2008 04:31 AM Aug 20,2008 03:09 AM Windows Forms 1
loading
Tags: FAQ
Administrator [Syncfusion]
Asked On August 18, 2008 04:31 AM

I have a reqmt. wherein rows are selected in a datagrid and users can add information by using a add button.

I have putin code in Click and CurrentCellChanged event handlers to enable/disable the add button based on if a row is selected or not.

But in the datagrid if i do a A, all rows get selected but the control does not go to the above two handlers and hence the add button is not enabled.

Can someone kindly let me know how to handle this or how do i disable the Ctrl A option for the datagrid.

Thanks,
Kannan



Nisha Arockiya A [Syncfusion]
Replied On August 20, 2008 03:09 AM


Hi Kannan,

Thanks for your interest in Syncfusion products.

You can make the add button enabled by including the following code snippet into KeyDown event of your Form.


if (e.Control)
if(e.KeyCode==Keys.A)
this.add.Enabled = true;


Please let me know if it helps you.

Regards,
Nisha


>I have a reqmt. wherein rows are selected in a datagrid and users can add information by using a add button.

I have putin code in Click and CurrentCellChanged event handlers to enable/disable the add button based on if a row is selected or not.

But in the datagrid if i do a A, all rows get selected but the control does not go to the above two handlers and hence the add button is not enabled.

Can someone kindly let me know how to handle this or how do i disable the Ctrl A option for the datagrid.

Thanks,
Kannan





CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;