Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
161 views
hi,
  I have 2 pages. Form1 is Grid page to show the data. Form 2 popup page which popup when a add button clicked in Form1 or click a particular data in the Grid for edit. The Form 2 have a Toolbar which have save and close button. The close button is for cancel so use java script to just close the window (Client click event of toolbar). This is fine. For save button i have server side event which saves the entered data in to the database and close the window and rebind the form 1 grid to update the new data. In the server side event i user Registerstartup script to call the javascript method to close and rebind the grid. This is working fine when i not used ajax. Now i enabled ajax for toolbar. Now when i click in save button data is saving but window is not closing. Can anyone help me?
Akhil Raj
Top achievements
Rank 1
 answered on 27 Mar 2013
4 answers
60 views

Hi,

Currently, we have implemented the RadTimePicker controller in our web application. But the customer wants to use the dropdownlist like outlook style? Could the control display like that?

If not, is there any code refactoring we could implement it to that style?

Alex

Alex
Top achievements
Rank 1
 answered on 27 Mar 2013
1 answer
54 views
I have a web application that is using RadAjaxManager to enable partial postback to the page.
I have a placeholder on the page that I am adding usercontrols to it's controls collection through code behind after a partial postback. 
The controls are created and displayed correctly. however when I go to retrieve the values, the placeholder controls collection is  null even though i am not updating the placeholder on partial postback via ajaxsetting.
Since I am not updating the placeholder on postback of the submit button, the controls do not dissapear off the page but the placeholder.controls collection is empty/null.
Any ideas?
Brett
Top achievements
Rank 1
 answered on 26 Mar 2013
4 answers
315 views
I am using a RadGrid and sorting is not working.  As an experiment I removed my grid and replaced with the grid from the
"Grid - Advanced Data Binding" demo. http://demos.telerik.com/aspnet-ajax/grid/examples/programming/needdatasource/defaultvb.aspx?#qsf-demo-source 

I linked to my data: RadGrid1.DataSource = GetSearchData() and the grid appeared displaying my data but sorting does not work.

When I click to sort,
        Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
            RadGrid1.DataSource = GetSearchData()
        End Sub

is called.  The data is returned but it is not sorted,

Any idea how I can get sorting to work?
David
Top achievements
Rank 1
 answered on 26 Mar 2013
10 answers
447 views
I want to use the Vista skin but override the chart background to white. Is this not possible without having to make my own skin? The following is not working for me:

<telerik:RadChart ID="chart" Skin="Vista" runat="server"
    <Appearance> 
        <Border Visible="false" /> 
        <FillStyle FillType="Solid" MainColor="White" /> 
    </Appearance> 
</telerik:RadChart> 

Thank you


Ab
Top achievements
Rank 1
 answered on 26 Mar 2013
1 answer
108 views
Hi,
I am using text wrap on the columns of the radgrid but when the text wraps, instead of moving complete words to the next line, it moves the words partially. Attached jpg file will show you the issue.
Any pointers on what am I missing here?

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 26 Mar 2013
2 answers
178 views
Hi
Need some guidance in Multirow Multicolumn combobox as the second combobox in the demo 
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultvb.aspx 

 (Image attached - want it without pictures though) to select individual cells. Studied the example but could not figure out how it was made, there is not much in the demo files about RadCombobox2

Any help is much appreciated.
thanks
Hamid

Hamid
Top achievements
Rank 1
 answered on 26 Mar 2013
4 answers
78 views
My apologies if this is somewhat similar to a problem I've posted earlier.  However this is a much simpler example.  (No RadGrid involved.)

I have a page on which I have (or rather had) 3 RadCombo boxes.  The 3 boxes (and their validators) are enclosed in a RadAjax panel.   The basic idea was that the 1st radcombo box would do a postback when it was changed and the values of the other two dropdowns would be updated accordingly.  The other 2 boxes have their AutoPostBack = false.

I could not get this to work.  The problem was that whenever I changed the 1st combo box, the custom validators of the other two would fire and prevent the update code from being called on the server side.  The custom validators call conventional JavaScript functions, much like all the others I use in this application.

My fix was similar to an earlier problem.  I changed the 1st combo box to a conventional asp:Dropdown list and everything works perfectly.  No other changes needed.

What, if anything, am I doing wrong?

My current Telerik.Web.UI is version 2012.2.607.40.  (I know.  Once again I'll try to get an upgrade if that is actually the problem.)

Boris
Top achievements
Rank 1
 answered on 26 Mar 2013
1 answer
527 views
I have a column defined as:
<telerik:GridCheckBoxColumn ConvertEmptyStringToNull="False"
    FilterControlAltText="Filter checked column" SortExpression="Checked"
    UniqueName="Checked" DataField="Checked" HeaderText="Remove" ToolTip="Check this box to remove this item from your cart" DataType="System.Boolean">
    <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="80px" CssClass="grid-header grid-header-first" />
    <ItemStyle HorizontalAlign="Center" Width="100%" VerticalAlign="Top" />
</telerik:GridCheckBoxColumn>

This column is the only edit-able field in the grid, the rest are bound columns marked as ReadOnly.  The grid always has all rows in edit mode using the following:
protected void grdItems_PreRender(object sender, EventArgs e)
{
    try
    {
        foreach (GridDataItem colGridField in grdItems.MasterTableView.Items)
            colGridField.Edit = true;
 
        grdItems.Rebind();
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.Print("Error: " + ex.ToString());
        Exceptions.ProcessModuleLoadException(this, ex);
    }
}

I have a button which needs to look at each row's check box and remove any items that are checked (perfromed by the CleanUpData method).  The button's click handler is:
protected void btnUpdateCart_Click(object sender, EventArgs e)
{
    try
    {
        //grdItems.MasterTableView.Items[grdItems.MasterTableView.Items.Count - 1].FireCommandEvent("UpdateAll", string.Empty);
        grdItems.EditItems[0].FireCommandEvent("UpdateEdited", string.Empty);
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.Print("Error: " + ex.ToString());
        Exceptions.ProcessModuleLoadException(this, ex);
    }
}

Here is the UpdateCommand event from the grid's code:
protected void grdItems_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    GridEditableItem itmUpdatedRow = null;
    Hashtable tblUpdatedValues = null;
 
    try
    {
        //Get the details of the item that needs to be updated
        itmUpdatedRow = e.Item as GridEditableItem;
        tblUpdatedValues = new Hashtable();
 
        //Parse out the updated data
        e.Item.OwnerTableView.ExtractValuesFromItem(tblUpdatedValues, itmUpdatedRow);
 
        //Update the underlying data table with the updated information (THIS IS ALWAYS FALSE REGARDLESS OF CHECKED STATUS)
        _propsSettings.Records.Rows[e.Item.DataSetIndex]["Checked"] = tblUpdatedValues["Checked"].ToString().GetBoolean();
 
        grdItems.Rebind();
 
        CleanUpData();
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.Print("Error: " + ex.ToString());
        Exceptions.ProcessModuleLoadException(this, ex);
    }
    finally
    {
        SaveControlState();
 
        //Clean up
        if (tblUpdatedValues != null)
        {
            tblUpdatedValues.Clear();
            tblUpdatedValues = null;
        }
    }
}

Here, the line that uses 'tblUpdatedValues["Checked"]' is ALWAYS False regardless of the check boxes status.  I had a similar issue before using a dropdown column but I got around that by changing it's editor to a standard ASP.NET dropdown.  I tried doing the same here but I got the same results.  The value of the Checked column is ALWAYS False no matter what I do.

This method shouldn't matter but I'm including it for completeness' sake (this code would only have an impact if at least 1 checkbox is detected as checked):
/// <summary>
/// Cleans up the Items grid data to make sure any invalid rows are removed.
/// </summary>
private void CleanUpData()
{
    try
    {
        _propsSettings.TotalPrice = 0;
        _propsSettings.ShippingTotal = 0;
        _propsSettings.LateFees = 0;
 
        if (_propsSettings.Records.Rows.Count > 0)
        {
            //Start at the end so that removing rows won't cause the index to be incorrect
            for (int iItems = (_propsSettings.Records.Rows.Count - 1); iItems > -1; iItems--)
            {
                try
                {
                    //Item was selected for removal
                    if (_propsSettings.Records.Rows[iItems][0].ToString().GetBoolean())
                    {
                        //Delete the line item database record and remove it from the data set
                    }
                    else
                    {
                        //Track the calculated totals
                        _propsSettings.ShippingTotal += _propsSettings.Records.Rows[iItems]["ShippingPrice"].ToString().GetNumber();
                        _propsSettings.TotalPrice += ((_propsSettings.Records.Rows[iItems]["OriginalPrice"].ToString().GetNumber() * _propsSettings.Records.Rows[iItems]["Quantity"].ToString().GetNumber()) + _propsSettings.Records.Rows[iItems]["ShippingPrice"].ToString().GetNumber());
 
                    }
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.Print("Error: " + ex.ToString());
                }
            }
        }
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.Print("Error: " + ex.ToString());
        Exceptions.ProcessModuleLoadException(this, ex);
    }
    finally
    {
        SaveControlState();
 
        UpdateCartTotals();
        grdItems.Rebind();
    }
}


I've searched the forums, read the help articles, looked at the demos, but cannot figure out what is wrong.  Any ideas?
J
Top achievements
Rank 1
 answered on 26 Mar 2013
5 answers
100 views
Can someone look at this and see what style I need to modify to get rid of the white space or image that is appearing at the bottom of the radComboBox? 

I assume it's a styling issue.  This happens while rendering in IE7.

Thanks, Dave.

Hristo Valyavicharski
Telerik team
 answered on 26 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?