ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
In DotNet languages call to item by index is surrounded with round brackets "()", for example: table.Rows(counter).Index, while in MaxScript with square brackets "[]", like: table.Rows[counter].Index.
So, fix that too (in all places), and lets hope there no more chunks.
I not use DataGridView so take my words as friendly attempt to help. What I did is just quick search.
I'm not sure if there exist #Selection property for CurrentRow, but found that CurrentCell cannnot be set to Nothing. You s'd set that property to valid Cell which s'd be visible as well, i.e. need to scroll if necessary. Shortly, something like this:
--counter = ...--DVG.ClearSelection()
DGV.FirstDisplayedScrollingRowIndex = DGV.Rows(counter).Index
DGV.Refresh()-- refresh after scroll
DGV.CurrentCell = DGV.Rows(counter).Cells(1)
DGV.Rows(counter).Selected = True-- use #Selected with Boolean
Comments
THANKS A LOT
this code worked for me:
STILL ERROR
Even with counter = 0
change all (counter) to [counter]
Yep, I think we miss the syntax conversion :)
In DotNet languages call to item by index is surrounded with round brackets "()", for example:
table.Rows(counter).Index, while in MaxScript with square brackets "[]", like:table.Rows[counter].Index.So, fix that too (in all places), and lets hope there no more chunks.
my recent MAXScripts RSS (archive here)
I didn't use uny value
I have just used your code! I don't what value should I use for counter!
integer
the "counter" in the example code serve as variable, it s'd be integer value, for example 0.
counter = 0my recent MAXScripts RSS (archive here)
Thx Anubis!
I get error
table.CurrentRow.Selected = Falsegives -- Unknown property: "selected" in undefined
probably something missed
what you used for "counter" value?
counter = ?.. --some integermy recent MAXScripts RSS (archive here)
...
I not use DataGridView so take my words as friendly attempt to help. What I did is just quick search.
I'm not sure if there exist #Selection property for CurrentRow, but found that CurrentCell cannnot be set to Nothing. You s'd set that property to valid Cell which s'd be visible as well, i.e. need to scroll if necessary. Shortly, something like this:
I hope this help
my recent MAXScripts RSS (archive here)