Another Datagrid Question....

G

Guest

Hi,

I am developing a application that has a MainForm and a panel loading a
child Form.

Inside the child form there is a datagrid with tabStop = true and TabIndex =
0.

When I press up or down the Selected row on the datagrid doesn't move, I
need to click on it first and then I can move it all the way.

I've already done dGrid.Focus(); and stuff like that but it just doesn't
work...
What am I doing row?

Another issue that I have is that I want the grid to ignore selections
higher than the row 10, so if I have 30 rows I am only allowed to select them
until the 10th row... is this possible? how?

Thanks for your attention and Thanks in Advance

Best Regards
 
D

DBC User

Hi, I am not an expert but here is my suggestion

1. have you tried trapping key down method on the main form, child form
and the data grid to see who is getting control?
2. You can use selected rows count and if the count is more than 10
throw a message box. Or using the key down or mouse down trap how many
rows user have selected and if it is more than 10 throw message or
disable. When user select 11th row you already know with the
selected.rows.count it is more than 10.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top