Hi ALL,
I used radgrid with details view and I used DetailTableDataBind event to check if the row in a master table have specific value ,I bind the details table if not,I want to make it invisible like:
protected void rgStaffRequest_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
{
string iCertificate = string.Empty;
string[] iTypes ={ };
try
{
GridDataItem _dataItem = (GridDataItem)e.DetailTableView.ParentItem;
int _iRequestId = Convert.ToInt32(_dataItem["SRID"].Text);
switch (e.DetailTableView.Name)
{
case "TravelPermitDetails":
iCertificate = _dataItem[
"CERTIFICATE"].Text; // to check if the request for travel permit.
iTypes = iCertificate.Split(',');
foreach (string iType in iTypes)
if (iType.ToLower() == "Travel Permit".ToLower())
{
e.DetailTableView.DataSource = _Controller.TravelDetails(_iRequestId);
}
else
e.DetailTableView.visible=false;
break;
}
}
catch (Exception)
{
throw;
}
}
the problem that this code will hide the detailstable for all masetertable row!!!!!!!!
so how can I hide detalstable for some mastertable rows???????????
ghadeer