I am currently successfully compressing the server responses to HTTP requests for both regular requests and XMLHTTPRequests.
Unfortunately, some of my users are experiencing the following (per browser's debugging tools):
- The Request Header specifies its content-length at over three million bytes
- The Form Data section of the Request does in fact contain the key "__VIEWSTATE", whose value is 3MB (corroborating the Request Header size)
- The Request Sent time is over a minute, because the upload speed is abysmal.
So, I'm interested in compressing the view state specifically for XMLHTTPRequests, with the expectation that this will behave better with the user's upload speeds. I've attempted to use the RadCompression module to do this, and have been unsuccessful, which leads me to my question here:
How can I compress the Request Header of an AJAX request (containing the view state)?
I have been utilizing the asp:gridview and use this syntax to determine which columns to hide:
private int GetColumnIndex(GridView grid, string ColName)
{
foreach (DataControlField col in grid.Columns)
{
if (col.HeaderText.ToLower().Trim() == ColName.ToLower().Trim())
{
return grid.Columns.IndexOf(col);
}
}
return -1;
}
Now when converting to radgrid I get the error of
'Unable to cast object of type 'Telerik.Web.UI.GridBoundColumn' to type 'System.Web.UI.WebControls.DataControlField'.'
With the below syntax:
private int GetColumnIndexRad(Telerik.Web.UI.RadGrid grid, string colName)
{
foreach (DataControlField col in grid.Columns)
{
if (col.HeaderText.ToLower().Trim() == colName.ToLower().Trim())
{
return grid.Columns.IndexOf(col);
}
}
return -1;
}
What would be the proper way to conditionally hide columns based off a check box list selection?
Hello,
We upgraded our controls and now our toolbar buttons are moved to a drop down button to the right. There is plenty of room for our buttons, but they still go into the menu. I've attached a screenshot.
The drop down list is populated with values, but when they are selected nothing happens to the table.
I am trying to iterate through the column, get the distinct values and add them to a filter.
It works when i Add a new asp:SqlDataSource with a distinct sql statement, then add datasourceID, datavalue and datatext to the ComboBox, but need to get this working programmatically.
Column:
<telerik:GridBoundColumn DataField="OperationalTypeName" HeaderText="OperationalTypeName" SortExpression="OperationalTypeName">
<FilterTemplate>
<telerik:RadComboBox ID="operationtypeComboBox" runat="server" RenderMode="Lightweight"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("OperationalTypeName").CurrentFilterValue %>'
OnClientSelectedIndexChanged="OpertationalTypeIndexChanged">
</telerik:RadComboBox>
<telerik:RadScriptBlock runat="server">
<script type="text/javascript">
function OpertationalTypeIndexChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("OperationalTypeName", args.get_item().get_value();, "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
ItemDataBound:
protected void GridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridFilteringItem)
{
GridFilteringItem item = (GridFilteringItem)e.Item;
RadComboBox combo = (RadComboBox)item.FindControl("operationtypeComboBox");
//combo.Items.Add(new RadComboBoxItem("ALL"));
foreach (var filter in filterOperationalType())
//filterOperatiionType returns the correct list
{
combo.Items.Add(new RadComboBoxItem(filter, filter));
// they are added to the ComboBox but do not work, the html generated is exactly the same as the filter options that work through using DataSourceID used on the ComboBox.
}
}
}
private List<string> filterOperationalType()
{
DataView view = (DataView)this.SqlDataSource1.Select(DataSourceSelectArguments.Empty);
List<string> list = new List<string>();
foreach (DataRow item in view.Table.Rows)
{
list.Add(item.ItemArray[1].ToString());
}
var a = list.Distinct().ToList();
return a;
}
Thank you
In Chrome and IE the clicking of the SELECT button for the uploads is kinda difficult when using MATERIAL skin, see attached screenshot.
The cursor becomes caret when hovering the button's text and clicking it is not always working.
This not the case when we try the same at RadAsyncUpload itself so maybe something to do with IFRAME use?
MarcI have a RadGrid that uses a GridTemplate column along with two Gridbutton columns called Edit and Delete .When I click on Edit to edit a particular record, all my textboxes and combo boxes get filled from the grid column as these fields are also visible as the grid columns.In Edit panel ,we have also one treeview with checkboxes, which should populate with some checkboxes as checked depending on the dataset. Here our problem started.We are not able to set checkboxes as checked.While dubugging, I observed that it is making the nodes as checked depending on dataset data but still it is not showing in the page.
protected
void radTreeview_Load(object sender, EventArgs e)
{
RadTreeView radSelectPartner;
try
{
radSelectPartner = (RadTreeView)sender;
if (radSelectPartnerNodes.Count == 0)
{
DataSet dtatable = (DataSet)Session["SelectPartner"];
radSelectPartner.DataTextField = "Partner Name";
radSelectPartner.DataValueField = "OrdID";
radSelectPartner.DataFieldID = "OrdID";
radSelectPartner.DataFieldParentID = "ParentID";
radSelectPartner.DataSource = dtatable;
if (ViewState["ContactEmail"] != null)
{
DataSet dsSelectParners = chkitems(ContactEmail);
for (int count = 0; count < dsSelectParners.Tables[0].Rows.Count; count++)
{
if (dsSelectParners.Tables[0].Rows[count][0].ToString() != null)
{
foreach (RadTreeNode radNode in radSelectPartner.GetAllNodes())
{
radNode.Checkable = true;
// for checking only child node.Currently RadTreeView depth is 2.
if (radNode.Level != 0 && radNode.Level != 1)
{
if (radNode.Value.ToString() == dsSelectParners.Tables[0].Rows[count][1].ToString())
{
radNode.Checked = true;
}
}
}
}
}