Reg:Data Grid Display index and Scrool bar problem
-
Hi all, I've two Datagridview controls. Each grid has different datasources. Eg. Datasource of grid1 is Hastable. Datasource of Grid1 is datatable. i want to display all the columns in both gridcontrol in the same order. Eg if Grid1 has columns in the order like Name,Age,DOB,SAL and i want the same order in grid2 also. i'm trying to set displayindex. but it's not displaying in the same order.and also want to add Scrollbars if necessary. Everything has to be done programatically. can anyone help me? thanks in advance sri
-
Hi all, I've two Datagridview controls. Each grid has different datasources. Eg. Datasource of grid1 is Hastable. Datasource of Grid1 is datatable. i want to display all the columns in both gridcontrol in the same order. Eg if Grid1 has columns in the order like Name,Age,DOB,SAL and i want the same order in grid2 also. i'm trying to set displayindex. but it's not displaying in the same order.and also want to add Scrollbars if necessary. Everything has to be done programatically. can anyone help me? thanks in advance sri
So you want the event from 1 datagridview to be replicated on the other DG and the event is the sorting of the columns when the user clicks the column header. Do you start to see a pattern here. Take a look at the events available for the DG, there are lots of them and many for the column header. Identify the one used by the DG for sorting and replicate the event on the other DG (you will need a flag to identify the source so you don't fall into an endless loop).
Never underestimate the power of human stupidity RAH