Hi all
I had being giving an assigment to constuct an application that involve two datagrid. To do that, I create a collection object call colObj and bind the datagrids with something similar to the following
colObj1.add(obj) or colObj2.remove(obj)
dg1.datasource=colObj1
dg1.databind()
colObj2.add(obj) or colObj2.remove(obj)
dg2.datasource = colObj2
dg2.databind()
Then I create a button column in each datagrid so user can select which row of datagrid to be move or remove. I am also using a event onSelectedIndexChanged to trigger the "moving" procedure. The challenge part is, how do i use the datakey to indicate which object I would like to add or remove from the collection according to which button user had click.
Any help or suggestion will be greatly help. Thank you
I had being giving an assigment to constuct an application that involve two datagrid. To do that, I create a collection object call colObj and bind the datagrids with something similar to the following
colObj1.add(obj) or colObj2.remove(obj)
dg1.datasource=colObj1
dg1.databind()
colObj2.add(obj) or colObj2.remove(obj)
dg2.datasource = colObj2
dg2.databind()
Then I create a button column in each datagrid so user can select which row of datagrid to be move or remove. I am also using a event onSelectedIndexChanged to trigger the "moving" procedure. The challenge part is, how do i use the datakey to indicate which object I would like to add or remove from the collection according to which button user had click.
Any help or suggestion will be greatly help. Thank you