Hi everyone,
I have 2 questions and i`d be greatful if anyone could help me
1) Iam using a ajax post request
var xhr = false;
if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); }
else { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var grid = $("#grid1");
grid.parentNode.innerHTML = xhr.responseText;
}
}
var url = "jquegrid.aspx";
xhr.open("POST", url, false);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(sendData);
return false;
}
and on server side i want to find which columns are visible using reflection
via code
public List<PropertyInfo> GetPropertyListFromGrid<T2>(GridView objGrid)
{
List<PropertyInfo> lsproperties = new List<PropertyInfo>();
int columnIndex = -1;
foreach (TableCell cell in objGrid.Rows[2].Cells)
{
columnIndex++;
foreach (Control childControl in cell.Controls)
{
Type type = childControl.GetType();
string CtrlName = type.Name;
if (CtrlName == "TextBox" || CtrlName == "CheckBox")
{
bool isEnabled = (bool)type.GetProperty("Enabled").GetValue(childControl, null);
bool isVisible = (bool)type.GetProperty("Visible").GetValue(childControl, null);
if (isEnabled && isVisible )
{
}
}
}
}
return lsproperties;
}
but
(bool)type.GetProperty("Visible").GetValue(childControl, null);
always returns false,when using ajax request,but if iam using a callback server,i`m able to get the value of visible property.Please Help me out.
2)there is some rendering issue with the editable columns rendering in IE8 browser,sometimes,columns in a grid`s row get distorted,but when i get next set of result using ajax and goes back,everything appear normal.
Waiting for a positive reply from experts.
Thanks
Update
Please reply for 2nd question.