Hi,
How to populate a gridview from database? Is there any inbuilt functions? I used this coding, but i dont know how to populate headers to enable sorting.
Code:
while($userdata=mysql_fetch_array($result,MYSQL_ASSOC))
		{
			$userid = $userdata['id'];
			$username = $userdata['username'];
			$active = $userdata['active'];
			if($active == 0)
			{$act="checked='checked'";}
			else
			{$act="";}
		?>
			<table border="0">
				<td>
					<tr>
						<td width="30px"><?PHP echo($userid); ?></td>
						<td width="50px"><?PHP echo($username); ?></td>
						<td width="3px"><input type="checkbox" <?PHP echo($act); ?> /></td>
					</tr>	
				</td>
			</table>
		<?PHP	
		}