Regarding Grid View display none and block.Pl reply me soon

Posted by Bhasker under Regular Expressions on 12/17/2010 | Points: 10 | Views : 2478 | Status : [Member] | Replies : 1
Dear All
Can anyone tell me that in the below code why we are using e.Row.Style["display"] = "none"; and e.Row.Style["display"] = "block"; for
Grid view?

if (e.Row.RowType == DataControlRowType.DataRow)
{
if (hdRowCountItem.Value != string.Empty)
if (e.Row.RowIndex >= int.Parse(hdRowCountItem.Value))
{
e.Row.Style["display"] = "none";
}
else
{
e.Row.Style["display"] = "block";
}
}




Responses

Posted by: T.saravanan on: 12/17/2010 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi Bhasker,

e.Row.Style["display"] = "none"; means to hide the selected row.

e.Row.Style["display"] = "block"; means to show the selected row. // Its working in IE browser
for firefox browser e.Row.Style["display"] = "table-row";

Cheers :)

Thanks,
T.Saravanan

Bhasker, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response