ecommerce web developer development freelance website designer India
{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}}
{\colortbl\red0\green0\blue0;}
\deflang1044\pard\plain\f0\fs17 This is used to align the flexgrid currently to center, but can be changed to something else. Call this sub after each time you change the amount of rows and cols, because after a row or column is added, the current alignment is not retained.
\par
\par Sub AlignGrid()
\par Dim I As Integer, Y As Integer
\par
\par 'FG1 is currently the name of the Flexgrid. Change it to
\par 'whatever you called your Flexgrid. I make the grid invisible
\par 'before I change all the alignments, because it goes so much
\par 'faster, and it doesn't look funky.
\par
\par FG1.Visible = False
\par For I = 0 To FG1.Rows - 1
\par For Y = 0 To FG1.Cols - 1
\par FG1.Row = I
\par FG1.Col = Y
\par
\par 'Change this value to whatever, 2 is left/center,
\par '4 is center/center
\par
\par FG1.CellAlignment = 2
\par Next
\par Next
\par FG1.Visible = True
\par End Sub
\par }
Align Flexgrid Cells after Adding a Row or Column

901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050

Express News India | Freelance ecommerce web development India