Rob
  • Rob
  • Newbie Topic Starter
2013-04-04T14:58:42Z
I'm using MS Access 2007, iGrid ActiveX control 5 build 74 on Windows 7 x64. When my main form is opened, I populate the grid (using the .FillFromRS method with data from a MS SQL server). Dynamic Row formatting works at this point. When the user double clicks a row, another data form opens with specific data. On closing the data form, I clear the grid on the main form, reload the data (using same code as on initial open) and set the row index back to what it was before the data form was open. I do this to refresh the data in case it was changed by another user. The rows are not painted with the correct background color. If I scroll up, each row I select is then refreshed. Scrolling left or right recolors each row.

I tried to add a .Refresh at the end of the loading of the data but it doesn't force the row dynamic formating to fire.

Any ideas?

-- Rob
Igor/10Tec
2013-04-05T11:32:06Z
Rob,

Do you really need to update the entire grid? If the data form can be used to change only the current row in the main form, maybe, it's better just to update one row? And iGrid has the DrawCell method for that (in fact, it repaints the whole row for the specified cell because of the internal double buffering drawing optimization).

In any case, we would like to see a sample that demonstrates the issue to tell you how to overcome the problem.
Rob
  • Rob
  • Newbie Topic Starter
2013-04-08T20:54:25Z
The database is a front end to a MS SQL server that is being accessed by multiple users. The whole list is being update to pick up any changes that another user may have made on a different record. i will need to strip the MS Access ADP down to just the form and data, and if I'm able to recreate the issue, I will send you the database.

--Rob
Theo
2013-10-21T13:00:34Z
Hi Igor,

First let me tell you i love your control! It does everything we want it to do.

We use FillFromRS with data from MS SQL Server in an Access 2010 ADP. It works perfectly!
Like Rob we use a form to select a sinlge record and change it. I tried to use the method 'Drawcell' after
the record is changed but the grid still shows the same old values
as before i ran the Drawcell method. Could it be i did something wrong in calling the method?

In the help files i only found:


Sub DrawCell( _
ByVal vRow As Variant, _
ByVal vCol As Variant _
)

Parameters
vRow The row index (numeric index or string key) of the specified cell.
vCol The column index (numeric index or string key) of the specified cell.


Looking forward to your reaction. Have a lovely day!

Kind regards,

Theo
RaymondC
2013-10-21T20:11:06Z
Theo...Try using the CellDynamicFormatting event. I do something similar in my Access iGrid and this event works for me.

Rob...Is the row you are trying to update a "group row"?
Theo
2013-10-31T09:01:00Z
Hey Raymond,

Thanks for your reply!

Could you please give me directions about what you do in de the CellDynamicFormatting event to get the party started?
Have a nice day.

Greetings,

Theo



Theo
2013-10-31T14:03:01Z
Hey Raymond,

Thought i had it working but it still is a showstopper.
Hope that you give me a pointer how you made this work.

Theo
RaymondC
2013-11-05T18:19:22Z
Hi Theo,

Sorry for the late reply; I just saw your post today.

I read your question again and I “think” I understand it better now. You use a form to edit only one record at-a-time and then you want the iGrid to show the changes you made to that record.

What I have learned is that an iGrid control is not actually linked to a data source even though you populated it with the FillFromRS method. With a native Access listbox control you can call Requery to update the data but Requery does not work with iGrid.

If you want to update all the data displayed in an iGrid control then you need to use the FillFromRS method again. But since your form is only editing one record then you can also just directly edit the cells in that one affected row. That would be faster.

Ray