on 06-24-2008 2:30 PM
Hi,
I am using Grid object.. and i am sorting all column's wise data on click event of all Grid Column headers.but i dont' have any option to show that this column has been sorted. my means that in a SAP b1 Grid there is red color picture come on column header when columns are sorted.so user knows that this column is sorted... i am also using Grid object.. so i want to show that this column is sorted then how it is possible.... i am trying to change header Caption with underline... but i am not able to do this... so please tell me is this possible to change column header text in Underline format by code.... if u have other view to show this column is sorted.
then please tell me.........
Ur efforts are apreciated in advance...
thnx
deepak
Deepak,
Im using it that in query for sorting Im using * sign and as clause. For example
oForm.DataSources.DataTables.Item(0).ExecuteQuery("select CardCode as 'Card Code*', CardName, DocDate, DocNum, DocTotal, DocStatus from OINV order by cardcode desc")
Maybe when you change the * fro some specific character, for example in unicode 25BC ▼
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reply,
I am not using ExecuteQuery for Load the data into Grid. I am using my own database not B1. so ExecuteQuery Method is not applicable for me... and i am filling the grid manually with Column and Row Object.... so please tell me how is it possible..... could i change Header of Column on runtime..
thnx
deepak
Thnx for reply,
but How is it possible... will u send me some peice of code... or details... basically i have already tried many ways... but i am also struck... so i am not able to unserstand what i will do....there are many limitations with grid object. Customized controls does not behaviour like SAP b1 Controls...
for Ex; We Can not Bind or Put Data on RowsHeader Column of Grid Object.so we can not give row number in Grid Object...
but now i require to notify user that this column is sorted and Search Row is working on this column.
ok,
when you run this c# code example:
oForm = globals.SBO_Application.Forms.Item(FormUID);
oForm.DataSources.DataTables.Add("MyDataTable");
((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).DataTable = oForm.DataSources.DataTables.Item("MyDataTable");
oForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT CardCode as 'CardName u25BC', CardName as 'CardName' FROM OCRD WHERE 1=2");
//((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).CollapseLevel = 2;
((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).AutoResizeColumns();
((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single;
oForm.Items.Item("grid").AffectsFormMode = false;
you will see you get an empty grid where the CardName has a symbol to show that it is sorted.
now you can fill the grid with your code.
but i think it would be better to try to use only executequery to fill the grid.
if everything fails do something what i did in past:
use a combobox or a label to show
"SORTED BY: CARDCODE"
i hope it anyway helps a bit.
lg David
User | Count |
---|---|
91 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.