vb.net - How to create group alpabet gridview devexpress? -
can 1 me create group alphabet gridview picture? i've tried code, rows not grouped alphabet.
private sub gridview1_customcolumndisplaytext(sender object, e customcolumndisplaytexteventargs) handles gridview1.customcolumndisplaytext if e.column.fieldname = "companyname" andalso e.isforgrouprow dim rowvalue string = gridview1.getgrouprowvalue(e.grouprowhandle, e.column) dim val string = microsoft.visualbasic.left(rowvalue, 1) e.displaytext = val end if end sub
there no need handle customcolumndisplay text event handler extract first letter of "companyname" value. instead, set gridcolumn.groupinterval property "companyname" gridcolumn "alphabetical". instance:
mygridview.columns("companyname").groupinterval = columngroupinterval.alphabetical
Comments
Post a Comment