Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
186 views
Hi there,

For our application we are trying to show two series of data in a stacked bar chart, each series contains 2 items. We are finding a problem where we are getting both series items being displayed within the same stacked bar, so rather than having 2 items per bar...we have 4.

If we use the group databinding feature on a normal bar chart it seems to be working fine but under stacked bar chart type we are encountering problems

Hope you can help

Regards
Rosko
Telerik team
 answered on 06 Jun 2012
2 answers
107 views
Hi all, 

My requirement was to search a text the user gives inside the Grid and select that particular row. The user can also do find next in the grid. I was able to identify all the rows in which that particular text is there. And I am able to select each row as well and show it to the end user. But the problem is, it is a hierarchy grid. So assume that the row is present in the second level of grid. Then the row gets highlighted. But the second level is not expanded. The user has to expand and find out where the text is. Instead of this, is there any alternative approach that I can take. 

Sample Code:

 $.each(($("#ctl00_ContentPlaceHolder_SpreadSheet1").find(":contains('EXPNUM CHICKEN BRST AIRLINE CUT')")), function () {
        if ((this.nodeName == "TR") && (($(this).is('.rgRow')) || ($(this).is('.rgAltRow')))) {
            $find("ctl00_ContentPlaceHolder_SpreadSheet1")._spreadSheet().searchResults.push(this);
         this.focus();
           this._selected = true;
            this.click();
           this.setActive = true;
        }

($("#ctl00_ContentPlaceHolder_SpreadSheet1").find(":contains('EXPNUM CHICKEN BRST AIRLINE CUT')")) 

The above statement gives me all the results in an array. From that array, I am trying to filter only the rows and raising the click event. But the parent level of that particular row has to get expanded. So that the user can see the highlighted row. 

Regards,
Meenakshi Sekar. 
Meenakshi
Top achievements
Rank 1
 answered on 06 Jun 2012
1 answer
287 views
I'm trying to give the Captcha image rounded corners, and am not figuring it out.  I've attempted to use jQuery to wrap the image element in a span tag and setting the background image to use the same src, but that came up blank.  Now I'm trying to wrap in div tags, but they disappear whenever a new image is generated.

Perhaps I'm mistaken with my angle of attack - all I really want to do is give rounded corners and a border to the image.  Any advice on how to accomplish this would be most appreciated.

Thanks,
Joel
Shinu
Top achievements
Rank 2
 answered on 06 Jun 2012
1 answer
110 views
I have a page where I have a standard HTML Select element that is decorated using the RadFormDecorator.  I am dynamically updating the options in the list via javascript and making an asp.net ajax call to a webservice that has a call back that in turn clears out the select's options list and re-populates it.  The problem is that the options are being updated, but the portion of the drop down that is displayed and populated from the RadFormDecorator is not updated.  I have attached the dcode that shows how I am updating the control.  Any help in figuring out what I need to do to get the <ul> portion that is created by the radformdecorator would be much appreciated.

Thanks!

function populateSearchAttributesSuccess(result) {
    var drpSearchAttributeFixedList = document.getElementById('drp_SearchAttributeFixedList');
    var drpSearchAttributeAssociatedList = document.getElementById('drp_SearchAttributeAssociatedList');
    var drpSearchAttributeItemLookup = document.getElementById('drp_SearchAttributeItemLookup');
    var drpSearchAttributeBlackList = document.getElementById('drp_SearchAttributeBlackList');
    var drpSearchAttributeFilterAssociatedList = document.getElementById('drp_merchlist_search_attribute');
 
    var doFixed = false;
    var doAssociated = false;
    var doLookup = false;
    var doBlack = false;
    var doFilter = false;
 
    if (drpSearchAttributeFixedList != null) {
        doFixed = true;
        drpSearchAttributeFixedList.style.display = 'block';
        drpSearchAttributeFixedList.options.length = 0;
    }
    if (drpSearchAttributeAssociatedList != null) {
        doAssociated = true;
        drpSearchAttributeAssociatedList.style.display = 'block';
        drpSearchAttributeAssociatedList.options.length = 0;
    }
    if (drpSearchAttributeItemLookup != null) {
        doLookup = true;
        drpSearchAttributeItemLookup.style.display = 'block';
        drpSearchAttributeItemLookup.options.length = 0;
    }
    if (drpSearchAttributeBlackList != null) {
        doBlack = true;
        drpSearchAttributeBlackList.style.display = 'block';   
        drpSearchAttributeBlackList.options.length = 0;
    }
    if (drpSearchAttributeFilterAssociatedList != null) {
        doFilter = true;
        drpSearchAttributeFilterAssociatedList.options.length = 0;
    }
         
    var xmlCatalogsArray = result.getElementsByTagName('Table1');
 
    var o;
 
    for (var i = 0; i < xmlCatalogsArray.length; i++) {
        if (xmlCatalogsArray[i].getElementsByTagName('ResonanceField').item(0).firstChild != null && xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild) {
            if (doFixed) {
                //Populate the fixed list
                o = document.createElement('option');
                o.value = xmlCatalogsArray[i].getElementsByTagName('ResonanceField').item(0).firstChild.data;
                o.text = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
                o.label = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
 
                if (isInternetExplorer())
                    drpSearchAttributeFixedList.appendChild(o);
                else
                    drpSearchAttributeFixedList.add(o, null);
            }
 
            if (doAssociated) {
                //Populate the associated list
                o = document.createElement('option');
                o.value = xmlCatalogsArray[i].getElementsByTagName('ResonanceField').item(0).firstChild.data;
                o.text = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
                o.label = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
 
                if (isInternetExplorer())
                    drpSearchAttributeAssociatedList.appendChild(o);
                else
                    drpSearchAttributeAssociatedList.add(o, null);
            }
 
            if (doLookup) {
                //Populate the Item Lookup field
                o = document.createElement('option');
                o.value = xmlCatalogsArray[i].getElementsByTagName('ResonanceField').item(0).firstChild.data;
                o.text = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
                o.label = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
 
                if (isInternetExplorer())
                    drpSearchAttributeItemLookup.appendChild(o);
                else
                    drpSearchAttributeItemLookup.add(o, null);
            }
 
            if (doBlack) {
                //Populate the Blacklist search attribute selector
                o = document.createElement('option');
                o.value = xmlCatalogsArray[i].getElementsByTagName('ResonanceField').item(0).firstChild.data;
                o.text = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
                o.label = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
 
                if (isInternetExplorer())
                    drpSearchAttributeBlackList.appendChild(o);
                else
                    drpSearchAttributeBlackList.add(o, null);
            }
 
            if (doFilter) {
                //populate the associated merchandising list filtering box
                o = document.createElement('option');
                o.value = xmlCatalogsArray[i].getElementsByTagName('ResonanceField').item(0).firstChild.data;
                o.text = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
                o.label = xmlCatalogsArray[i].getElementsByTagName('CustomerField').item(0).firstChild.data;
 
                if (isInternetExplorer())
                    drpSearchAttributeFilterAssociatedList.appendChild(o);
                else
                    drpSearchAttributeFilterAssociatedList.add(o, null);
            }
        }
    }
Niko
Telerik team
 answered on 06 Jun 2012
1 answer
45 views
Hi,

I added export to Excel/Word/Pdf to my RadGrid. Export to excel works perfectly, but export to pdf and Word just corrupt my Grid's layout (header and footer aren't displayed anymore). After another postback (e.g. when sorting), the Grid is correctly 
displayed.

These are my settings:
grid.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;
grid.MasterTableView.CommandItemSettings.ShowExportToPdfButton = true;
grid.MasterTableView.CommandItemSettings.ShowExportToWordButton = true;
grid.ExportSettings.IgnorePaging = true;
grid.ExportSettings.ExportOnlyData = true;
grid.ExportSettings.OpenInNewWindow = true;


I don't have any special logic for excel. This is the only thing I do in the GridItemCommand event handler:

if (e.CommandName == RadGrid.ExportToExcelCommandName ||
   e.CommandName == RadGrid.ExportToPdfCommandName
   || e.CommandName == RadGrid.ExportToWordCommandName)
{
   foreach (GridColumn column in grid.MasterTableView.Columns)
   {
      if (!(column is GridBoundColumn) && !(column is GridCheckBoxColumn))
      {
         column.Visible = false;
      }
   }
}

I don't get any server or client-side errors/warnings when exporting, so what could that be?
JP
Top achievements
Rank 1
 answered on 06 Jun 2012
3 answers
102 views
Hi,

I have a RadComboBox defined as follows:

<telerik:RadComboBox
    ID="ddlValue"
    runat="server"
    AllowCustomText="True"
    Width="320px"
    MarkFirstMatch="True"
    AutoCompleteSeparator=";"
    AutoPostBack="true"
    OnSelectedIndexChanged="ddlValue_SelectedIndexChanged">
</telerik:RadComboBox>

And this code-behind

protected void Page_Load(object sender, EventArgs e)
{
    if (!this.IsPostBack)
    {
        var datasource = new RadComboBoxItemCollection(ddlValue)
        {
            new RadComboBoxItem("", ""),
            new RadComboBoxItem("David Larkin", Guid.NewGuid().ToString()),
            new RadComboBoxItem("Ahmed Warreth", Guid.NewGuid().ToString()),
            new RadComboBoxItem("Ryan Estes", Guid.NewGuid().ToString()),
            new RadComboBoxItem("Antonio Siqueira", Guid.NewGuid().ToString())
        };
 
        ddlValue.DataSource = datasource;
        ddlValue.DataTextField = "Text";
        ddlValue.DataValueField = "Value";
        ddlValue.DataBind();
    }
}
 
protected void ddlValue_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    ltrSelection.Text = (sender as RadComboBox).Text;
}
I'm experiencing the following behaviour:
  1. Choose David Larkin from the combo box
  2. David Larkin appears in the label as expected
  3. Place the cursor in the combo box at the end of the text, type ";Ah" and press Enter
  4. David Larkin;Ahmed Warreth appears in the label as expected
  5. Choose the first item in the combo box
  6. I would expect the text of the combo box to become an empty string, but it is actually "David Larkin;"

Is there some property that I'm not setting that would cause this, or is it a bug in the control?

I'm using version 2011.1.413.40.

Thanks,

David
Princy
Top achievements
Rank 2
 answered on 06 Jun 2012
1 answer
243 views
Hi,

Is there anyway I can hide the expand/collapse icons based on a value calculated in the GridGroupByExpression?

For example I want to hide the icon if the the GroupByField 'Count' aggregate = 0:

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <telerik:RadGrid ID="rdgSurveys" runat="server" AllowPaging="false" Skin="Office2010Silver"
                OnNeedDataSource="rdgSurveys_NeedDataSource" OnItemDataBound="rdgSurveys_ItemDataBound"
                OnItemCreated="rdgSurveys_ItemCreated">
                <MasterTableView AutoGenerateColumns="False" HeaderStyle-HorizontalAlign="Center" HierarchyDefaultExpanded="false">
                    <GroupByExpressions>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="Ref" FieldAlias="Survey" />
                                <telerik:GridGroupByField FieldAlias="Count" FieldName="SumField" Aggregate="Sum" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="Ref" SortOrder="Ascending"></telerik:GridGroupByField>
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>
                    <Columns>
                        <telerik:GridBoundColumn DataField="DateCreated" DataType="System.DateTime" HeaderText="Date Created"
                            UniqueName="DateCreated" DataFormatString="{0:dd MMM yyy hh:mm}" />
                        <telerik:GridBoundColumn DataField="Version" DataType="System.String" HeaderText="Version"
                            UniqueName="Version" />
                        <telerik:GridBoundColumn DataField="Respondent" DataType="System.String" HeaderText="Completed By"
                            UniqueName="Respondent" />
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </telerik:RadAjaxPanel>

 
Abhishek
Top achievements
Rank 2
 answered on 06 Jun 2012
0 answers
57 views
Hi all!

I have a RadGrid with rows and each row contains a RadNumericTextBox. When I edit the value of this RadNumericTextbox (using the spinbuttons) I have a AjaxLoadingPanel over the RadNumericTextbox which is edited (according to this demo). This is working fine in compatibility mode in IE9, but not in normal mode. This is the code:

.cs
RadAjaxManager.GetCurrent(Page).ClientEvents.OnRequestStart = "RequestStart";
RadAjaxManager.GetCurrent(Page).ClientEvents.OnResponseEnd = "ResponseEnd";

.ascx
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="grdItems">
        <UpdatedControls>          
            <telerik:AjaxUpdatedControl ControlID="grdItems" />
        </UpdatedControls>
        </telerik:AjaxSetting>        
    </AjaxSettings>        
</telerik:RadAjaxManagerProxy>


<script type="text/javascript">
    var currentLoadingPanel = null;
    var currentUpdatedControl = null;
    function RequestStart(sender, args) {
        currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
        currentUpdatedControl = args.get_eventTarget();            
        currentLoadingPanel.show(currentUpdatedControl);
    }
    function ResponseEnd() {
        //hide the loading panel and clean up the global variables
        if (currentLoadingPanel != null)
            currentLoadingPanel.hide(currentUpdatedControl);
                          
        currentUpdatedControl = null;
        currentLoadingPanel = null;
    }
</script>

What can I do so that it works fine in IE9?

Thanks in advance.

Regards,
Peter

Peter
Top achievements
Rank 1
 asked on 06 Jun 2012
1 answer
122 views

I have  radgrid  which  displays information on 2 grouping levels
Based on selction from dropdown  above the radgrid, it retrieves the  Radgrid.

On first load of the page or whenever there is change in the selection in the search drop down. I need the Group1 not to  expand and  user should able to expand the group  which should result the groups inside it  and then  expand I should able to expand the 2nd group again.

I was  able to to do the following  in the load


If
Not IsPostBack Then

 RadGrid1.MasterTableView.GroupsDefaultExpanded = False

Else

 RadGrid1.MasterTableView.GroupsDefaultExpanded = True   <--- I have to do this otherwise it stays FALSE on subsequest page loads

End If

And on the change selection of dropdown I am doing

 

RadGrid1.MasterTableView.GroupsDefaultExpanded = FALSE

With the above codigng  the first load of grid  displays fine with not expanded , when i click on the group expand button, the symbol changes that it expanded but it does not display the expanded groups. Now If I clcik again the same buttons ,it shows  everything with all 2 level groups also  expanded .
So basically on  1st time you don't see any change in the display of screen ( except the higher level group shows expanded sysmbol).
Clicking on it agian  it shows everything expanded.

How to control the two level groupings for the scenario I mentioned above.

Thanks
 



Tsvetina
Telerik team
 answered on 06 Jun 2012
1 answer
70 views
Hi,

Is it possible to clear the grouping/sorting expression clientside
I know I can do it serverside using the following, but I would like to do it clientside.

rgvGrid.MasterTableView.SortExpressions.Clear()

rgvGrid.MasterTableView.GroupByExpressions.Clear()

Also, can I set the expressions clientside.
I can set it serverside using the following;

 

rgvGrid.MasterTableView.GroupByExpressions.Add(New GridGroupByExpression(strExpression))



Thank you for your assistance.

Maria Ilieva
Telerik team
 answered on 06 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?