Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
185 views
I am attempting to use a radgrid with  in-place editing of multiple cascading drop-downs. The user enters a term, which populates a combobox to get a list of 'preferred terms'... then, depending on the preferred term, the user can then select a classification.

Based on examples, found on the Telerik site, I crafted the below code. However, my ComboBox_SelectedIndexChanged Event handler never fires.

Any ideas why? I can step through the code and see the below code executes and attaches the event handlers to the combobox, and the drop-down does contain the correct list of values based on the user's entered term, but when the user selects a preferred term the event never fires (thus I never get to update the classification combobox based on the user's selection.)

What am I missing? Thanks!
protected void RadGrid_Terms_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
        if (e.Item.DataItem != null)
        {
            String term = ((DataRowView)e.Item.DataItem)["Term"].ToString();
 
            SqlDataSource_PTCodeEdit.SelectCommand = "SELECT * FROM dbo.udt_PreferredTerm('" + term + "')";
            SqlDataSource_PTCodeEdit.Select(DataSourceSelectArguments.Empty);
 
            RadComboBox list = (e.Item as GridEditableItem)["FK_PT_GUID"].Controls[0] as RadComboBox;
 
            list.DataTextField = "PT_Name";
            list.DataValueField = "RowGuid_Key";
            list.DataSource = SqlDataSource_PTCodeEdit;
            list.DataBind();
            list.SelectedValue = ((DataRowView)e.Item.DataItem)["FK_PT_GUID"].ToString();
            list.Text = ((DataRowView)e.Item.DataItem)["PT_NAME"].ToString();
            list.AutoPostBack = true;
            list.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(ComboBoxControl_SelectedIndexChanged);
        }
    }
}
Jayesh Goyani
Top achievements
Rank 2
 answered on 27 Sep 2012
1 answer
102 views
Hi,

I am trying to get the datakey value of a row when expanding it to display a nestedViewTemplate.

When the grid is initially populated, I get the datakey values fine within the ItemCreated event.

Dim myID = CInt(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("whatever"))


But when the expand icon is clicked that code throws an error - {"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"}

Any thoughts on what I am doing wrong here? Thanks.
Jayesh Goyani
Top achievements
Rank 2
 answered on 27 Sep 2012
6 answers
229 views
I have a chart the need to change the bottom order for a Spline chart I have create.

<telerik:RadChart
    ID="RadChartDemographic"
    runat="server"
    DefaultType="Spline"
    Skin="Gray"
    ChartTitle-TextBlock-Text="Demographic%">
    <Series>
        <telerik:ChartSeries DataYColumn="Minority" Name="Minority" Type="Spline">
            <Appearance>
                <FillStyle MainColor="0, 116, 119" />
            </Appearance>
        </telerik:ChartSeries>
        <telerik:ChartSeries DataYColumn="White" Name="White" Type="Spline">
            <Appearance>
                <FillStyle MainColor="195, 167, 10" />
            </Appearance>
        </telerik:ChartSeries>
    </Series>
</telerik:RadChart>


For example:

1 |
2 |
3 |          -   -   - 
4 |       /             \
5 |     /                 \
    ----------------------------------
         1           2            3

I need to change the bottom number order to 3, 2, 1. I have reorder my query, but the numbers stay the same on the bottom. The confusing thing is that the data points in the graph change and do not correlate to the bottom row...

TIA
Steve
Top achievements
Rank 1
 answered on 27 Sep 2012
1 answer
126 views
When I upload some document and click a button to process a batch job, it will display  RadProgressArea. The IE works fine and Chrome will show white background like attached screenshot. I don't know why.
Kate
Telerik team
 answered on 27 Sep 2012
1 answer
131 views
Hi all,

My scenario is Iike that: Main page let's say A has a button and after it's clicked a rad window is opened. Let's say this page B. In page B after a button clicked, a new page called C is opened. My problem was at first C page was surrounded by page B. I could not get out of boundaries of the page B.

After i read the document on http://www.telerik.com/help/aspnet-ajax/window-programming-opening-from-within-dialog.html i solved my problem.

But here is another issue. When i close page C, i could not handle OnClientClose event on page B. I tried many things but i could not success.

Some codes from page B :

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
function OpenDefectStockItemPanel() {
                var getRecordId = document.getElementById("<%= getRecordId.ClientID %>").value;
                var url = "DefectStockItemPanel.aspx?ID=" + getRecordId;
                var oBrowserWnd = GetRadWindow().get_windowManager();
                oBrowserWnd._width = 1100;
                oBrowserWnd._height = 600;
                setTimeout(function () {
                    oBrowserWnd.open("DefectStockItemPanel.aspx?url=" + encodeURIComponent(url),
"asda");
                }, 0);
                 return false;
            }
                    </script>
    </telerik:RadCodeBlock>
     
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="DefectStockDialog2" runat="server" Title="Hasar-Ürün Yönetimi"
                Width="400px" Height="600" ReloadOnShow="true" OnClientClose="RadWindowOnClientClose"
                ShowContentDuringLoad="false" Modal="true" />
        </Windows>
    </telerik:RadWindowManager>

GetRadWindow().get_windowManager(); connects RadWindowManager of page A not B so this RadWindowManager1
is useless right ? Otherwise i will again hangout to the boundaries of B. Ok add_close method can not be
bind 
to a radwindowmanager right ? What should i do to be aware Page C is closed or not. (My aim is to refresh page B on Page C close)

Thank you.
Matthew
Top achievements
Rank 1
 answered on 27 Sep 2012
1 answer
91 views
I have submitted this as a support ticket but not gotten a response yet and I am on a deadline.

I am using the telerik controls to create a wizard for adding items to a SharePoint list.  I am using a RadPanelBar to allow the users to enter data into the detail sections of the wizard on the third page.  There will be a variable number of items in the panel bar and I am creating them dynamically.  This is working as expected on the development box but when I deploy to my test server or the clients integration server the panels will not expand.  Here is the code that is creating the panels.

            ucItemEditV2 ucEditor = (ucItemEditV2)LoadControl("ucItemEditV2.ascx");
            ucEditor.ID = "ucItemEdit" + itemID;
            using (RadPanelItem pnlItem = new RadPanelItem())
            {
                RadPanelItem pnlInsideItem = new RadPanelItem();
                SPListItem itm = SPContext.Current.Web.Lists[itpCommon.STR_ITProvItems].GetItemById(itemID);
                pnlInsideItem.Text = " ";
                pnlInsideItem.Controls.Add(ucEditor);
                pnlInsideItem.Expanded = false;
                ucEditor.ParentItem = pnlItem;
                pnlInsideItem.TabIndex = -1;
                pnlItem.Items.Add(pnlInsideItem);
                pnlItem.Text = itm.Title;
                ucEditor.SetItemInfo(itemID);
                pnlChildren.Items.Add(pnlItem);
            }

I am attaching a diagram of the way that the pages loads.  I have been struggling with this for a couple of days so any help would be greatly appreciated.

Thanks,

john  
John
Top achievements
Rank 2
 answered on 27 Sep 2012
4 answers
146 views
When exporting grouped data, the exports do not contain previous page data when the page selection is anything other than page 1.  Example: If page 2 is selected, the export data begins on page 2 and doesn't contain the data from page 1.  This doesn't happen when the data isn't grouped.  Is this by design?

Christine
Top achievements
Rank 1
 answered on 27 Sep 2012
3 answers
103 views
I've found a minor bug in the listbox client-side function findItemByValue. If you pass it an INTEGER with the value zero, it always returns null. Passing it any other integer (where an item with that value exists) will work correctly. The cause of the problem is that the function findItemByValue is coded as:
function(g){if(!g){return null;}...

When g is an integer 0, !g is true, so the function returns null. (When g is an integer 1, !g is false, when g is a string "0", !g is false.)

The work-around is simple, just don't pass an integer, but to work correctly and consistently, the function should check for "undefined" or null or "" instead of using !g, or it should check the type of the value passed first.

Since findItemByValue actually works correctly when a non-zero integer is passed, it took me a little work to figure out what the problem was. Hopefully this post will help others avoid the problem (I haven't checked, but I'd bet that the same problem occurs in other Telerik controls as well).

Ivana
Telerik team
 answered on 27 Sep 2012
1 answer
173 views
Hello!

AutoCompleteBoxEntry allows to store only two meaningful fields of data: DataTextField, DataValueField

I try to store an object (with many other fields, beside DataTextField and DataValueField) for further processing in a corresponding AutoCompleteBoxEntry.DataItem (within RadAutoCompleteBox.EntryAdded event's code). But DataItem seems not to be stored anywhere (in ViewState?) along with the AutoCompleteBoxEntry instance, so I cannot access a particular AutoCompleteBoxEntry.DataItem later in Button's click event, for example.

Which practice of storing full data object in DataItem would you advise?
Kalina
Telerik team
 answered on 27 Sep 2012
1 answer
111 views
Hi,

This is a weird one, and I am not sure it's a Telerik problem, but I'm hoping you can shed some light on the issue.
The symptom is that the user cannot expand the very last node in the treeview unless they "very carefully" move the mouse over the top portion of the expand image (+) ; then they see the mouse pointer change to the hand and can click to expand.
The user can move the mouse over any portion of the other nodes' expand image without difficulty - it's only the last (bottom) one that exhibits this weird behavior.

The RadTreeView is within a RadPageView within a RadMultiPage within a RadTabStrip within a RadSplitter.
This symptom does not occur in IE or FF, and only in Chrome and Safari for "some" users with small laptop screens (13").

I have attached a screenshot.

Any ideas or suggestions?

Jim
Plamen
Telerik team
 answered on 27 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?