Clikable gridview
Dear All,
I want to populate dashboard.
Currently dashboard populates Count of cases in all queues.
What i want is.. when user clicks on count, it should populate all records belongs to that count.
Dashboard gets populated based on some filters so main gridview columns are dynamic. now i want those columns to be clickable. Once user clicks count it should populate records belong to that column.
Please check code i wrote so far..
This is main Grid
<table width="95%" align="center">
<tr>
<td>
<div style="width: 99%; height: 100%; overflow-x: scroll; overflow-y: scroll; scrollbar-arrow-color: blue;
scrollbar-face-color: #e7e7e7; scrollbar-3dlight-color: #a0a0a0; scrollbar-darkshadow-color: #888888">
<%----%>
<asp:DataGrid ID="datag" runat="server" SkinID="DataGrid" Height="10px" width="100%"
AllowPaging="True" PageSize="7" CellPadding="4" ForeColor="#333333"
GridLines="None" onitemdatabound="datag_ItemDataBound">
<AlternatingItemStyle BackColor="White" />
<EditItemStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<ItemStyle BackColor="#EFF3FB" />
<PagerStyle Font-Size="XX-Small" ForeColor="White" BackColor="#2461BF"
Mode="NumericPages" HorizontalAlign="Center">
</PagerStyle>
<SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
</asp:DataGrid>
</div>
</td>
</tr>
</table>
Code to Populate Data in DataGrid
protected void GetDashboard()
{
SqlParameter[] sqlparam = new SqlParameter[8];
sqlparam[0] = new SqlParameter("@Project_Code", "PE081507");
sqlparam[1] = new SqlParameter("@User_Level", Convert.ToString(Session["UserLevel"]));
sqlparam[2] = new SqlParameter("@User_Name", Convert.ToString(Session["User"]));
sqlparam[3] = new SqlParameter("@DocTypeCode", Convert.ToString(ViewState["InvTypeFilter"]));
sqlparam[4] = new SqlParameter("@QueueCode", Convert.ToString(ViewState["QueueFilter"]));
sqlparam[5] = new SqlParameter("@Header", "");
sqlparam[5].Direction = ParameterDirection.Output;
sqlparam[6] = new SqlParameter("@ResponseId","");
sqlparam[6].Direction = ParameterDirection.Output;
sqlparam[7] = new SqlParameter("@Message","");
sqlparam[7].Direction = ParameterDirection.Output;
datag.DataSource = SqlDBHelper.ExecuteTable(CommandType.StoredProcedure, "usp_Web_GetDashBoard_filter", sqlparam, "PEARSON");
datag.DataBind();
}
Please help me for making cells in my grid clickable.
Thanks in Advance.