Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
509 views
The documentation says there is a get_selected() boolean for a GridDataItem.  I tried to use this and it tells me "Object doesn't support property or method".  I'm using the OnRowClick event of the grid:

function RowClick(sender,item){
    alert("click:" + item.getitemIndexHierarchical());
     if(item.get_selected()){
        alert("selected");
        //do something
     }
}

The first alert shows but then the error occurs and the 2nd one is never shown.  I took the if statement out and I still didn't get the 2nd alert so I know it's that call to get_selected() that is the problem.

How do I use that function? 
Sebastian
Telerik team
 answered on 12 Mar 2008
1 answer
155 views
I have a radMenu with 3 items.  I've set the skin to Default and the BackColor to #704165.  When I view the page, the first menu item still displays as the Default skin and the second and third menu items have the BackColor that I specified.  Is this a bug within radMenu?

<

telerik:RadMenu ID="rmMaster" runat="server" Skin="Default" Flow="vertical" BorderStyle="solid" BorderWidth="1px" BorderColor="black" BackColor="#704165" >

<Items>

<telerik:RadMenuItem Text="User Maintenance" ExpandMode="ClientSide" runat="server">

<GroupSettings ExpandDirection="Auto" Flow="Vertical" />

</telerik:RadMenuItem>

<telerik:RadMenuItem Text="Site Template Edit" ExpandMode="ClientSide" runat="server">

<Items>

<telerik:RadMenuItem Value="site" ExpandMode="ClientSide" runat="server">

<ItemTemplate>

<asp:DropDownList ID="ddWebsite" runat="server"></asp:DropDownList>

<asp:Button ID="btnWebsiteEdit" runat="server" Text="Edit" />

</ItemTemplate>

<GroupSettings ExpandDirection="Auto" Flow="Vertical" />

</telerik:RadMenuItem>

</Items>

<GroupSettings ExpandDirection="Auto" Flow="Vertical" />

</telerik:RadMenuItem>

<telerik:RadMenuItem Text="Association Edit" ExpandMode="ClientSide" runat="server">

<Items>

<telerik:RadMenuItem Value="association" ExpandMode="ClientSide" runat="server">

<ItemTemplate>

<asp:DropDownList ID="ddAssociation" runat="server"></asp:DropDownList>

<asp:Button ID="btnAssocEdit" runat="server" Text="Edit" />

</ItemTemplate>

<GroupSettings ExpandDirection="Auto" Flow="Vertical" />

</telerik:RadMenuItem>

</Items>

<GroupSettings ExpandDirection="Auto" Flow="Vertical" />

</telerik:RadMenuItem>

</Items>

<DefaultGroupSettings ExpandDirection="Auto" Flow="Vertical" />

<CollapseAnimation Duration="200" Type="OutQuint" />

<ExpandAnimation Type="OutQuart" />

</telerik:RadMenu>

Paul
Telerik team
 answered on 12 Mar 2008
1 answer
115 views
Hello!

Currently I'm testing the new Prometheus Controls and I'm almost done: Great Controls! But now I noticed a strange behavior:

A RadGrid (for example) in a RadPane (inside of a RadSplitter) is updated via RadAjaxManager. The new Data is persisted to the Database. Now I'm changing the ContentUrl of the RadPane clientside via set_ContentUrl("...") to another page and then to the original page again. The new entry/changes are not displayed but only the old data is shown.

This behavior only occures in IE7 not in FF. If I manual reload the RadPane, the changes are shown.

Do you an idea to that?

Thanks and kind regards
Philip
Philip
Top achievements
Rank 1
 answered on 12 Mar 2008
5 answers
141 views
I like the default CommandItem template and style but I would like the "Add new record" button to open a new window with a custom form in it.  For most of my grids I can get away with the inline forms, but in this case I really need a new window and I was hoping to just use the existing command buttons in code somehow to open a new window with the form in it.  Is there a way to control the target or action behind that button either in source or programtically without having to create a whole CommandItemTemplate that replicates the built-in functionality?
Yavor
Telerik team
 answered on 12 Mar 2008
1 answer
126 views

Hello everybody,

Sys.InvalidOperationException: 'ınitalBehaviors' is not a property or...

Javascript Error Message:
http://img409.imageshack.us/my.php?image=93909295oj9.jpg

I built live demo with Turkish Regional setting so radwindow doesn't work.(In English work fine)

How can i fix this.??

Georgi Tunev
Telerik team
 answered on 12 Mar 2008
2 answers
147 views

Hi,

I would like to hide/show some columns at the start on the page.

I have tried to use showColumn and hideColumn js function. But the grid is first entirely displayed before columns are hidden. So users have the time to see all columns before the display was refresh.

Can I hide a column server-side and then still display it client side ? I have tried the visible property but the column is not rendered client side, so I can't manipulate it.

Regards

Maxime
Top achievements
Rank 1
 answered on 12 Mar 2008
8 answers
316 views
using the below code..

I select an item in the City combo and it does a SetFocus to the Zip combo. It automatically puts the first zipcode in the ZipCode.Text field. I can't seem to get this to work no matter what I've tried..It always has the previous ZipCode selection in the list

Based on a City selection I'd like to auto select a Zip if only one is available and then auto select the County and State. But I also have to allow custom text in City and Zip for Out Of State entries..

            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <asp:SqlDataSource ID="SqlradCity" runat="server"
                        ConnectionString="<%$ ConnectionStrings:db_DELJISDataConnectionString %>"                                
                        SelectCommand="SELECT DISTINCT [Description] FROM [Zip_Codes] ORDER BY Description ASC">
                    </asp:SqlDataSource>
                    <asp:SqlDataSource ID="SqlradZipMail" runat="server"
                        ConnectionString="<%$ ConnectionStrings:db_DELJISDataConnectionString %>"
                        SelectCommand="SELECT [Code],[County] FROM [Zip_Codes] WHERE ([Description] = @Description) ORDER BY Code ASC">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="radCityMail" Name="Description"
                                PropertyName="Text" Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    <table>
                        <tr>
                            <td>
                                City:&nbsp;
                                <telerik:RadComboBox id="radCityMail" runat="server" CausesValidation="False"
                                    Skin="Outlook" AllowCustomText="True" Height="150px" MarkFirstMatch="True"
                                    MaxLength="18" AutoPostBack="true" OnTextChanged="radCity_TextChanged"
                                    DataSourceID="SqlradCity" DataTextField="Description" CollapseAnimation-Type="None" />
                            </td>
                            <td>
                                Zip Code:&nbsp;
                                <telerik:RadComboBox id="radZipCodeMail" runat="server" MaxLength="9"
                                    Skin="Outlook" AllowCustomText="True" Height="150px" Width="70px" EnableLoadOnDemand="true"
                                    CausesValidation="False" AutoPostBack="true" OnTextChanged="radZipCode_TextChanged"
                                    DataSourceID="SqlradZipMail" DataTextField="Code" DataValueField="County" CollapseAnimation-Type="None" />
                            </td>
                            <td>
                                County:&nbsp;
                                <asp:DropDownList ID="ddlCountyMail" runat="server">
                                    <asp:ListItem />
                                    <asp:ListItem Value="N" Text="New Castle County" />
                                    <asp:ListItem Value="K" Text="Kent County" />
                                    <asp:ListItem Value="S" Text="Sussex County" />
                                    <asp:ListItem Value="O" Text="Other" />
                                </asp:DropDownList>
                            </td>
                            <td>
                                State:&nbsp;
                                <asp:DropDownList ID="ddlStateMail" runat="server" />
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>


And Code Behind
        #region City/ZIP Events
        /* Handles ALL rad city textchanged events */
        protected void radCity_TextChanged(object sender, EventArgs e) {
            Telerik.Web.UI.RadComboBox zip = null, city = null;
            if(sender.Equals(radCityMail)) { // mail address
                zip = radZipCodeMail; city = radCityMail;
            }
            if(sender.Equals(radCityPhysical)) { // physical address
                zip = radZipCodePhysical; city = radCityPhysical;
            }

            if(city.SelectedIndex > -1) { // in-state
                zip.AllowCustomText = false;
            } else { // out of state
                zip.AllowCustomText = true;
            }
            SetFocus(zip);
            radZipCode_TextChanged(zip, null);
        }

        /* Handles ALL rad zip code textchanged events */
        protected void radZipCode_TextChanged(object sender, EventArgs e) {
            Telerik.Web.UI.RadComboBox zip = null, city = null;
            DropDownList county = null, state = null;
           
            if(sender.Equals(radZipCodeMail)) { // mail address
                zip = radZipCodeMail; city = radCityMail;
                county = ddlCountyMail; state = ddlStateMail;
            }
            if(sender.Equals(radZipCodePhysical)) { // physical address
                zip = radZipCodePhysical; city = radCityPhysical;
                county = ddlCountyPhysical; state = ddlStatePhysical;
            }

            if(city.SelectedItem != null) { // in-state
                state.ClearSelection(); state.SelectedIndex = -1;
                county.ClearSelection(); county.SelectedIndex = -1;
                county.Items.FindByValue("O").Enabled = false;
                state.Items.FindByValue("DE").Enabled = true;
                state.Items.FindByValue("DE").Selected = true;
                state.Enabled = false; county.Enabled = true;
                county.Items.FindByValue(zip.SelectedValue).Selected = true;
                SetFocus(county);
            } else { // out of state
                state.ClearSelection(); state.SelectedIndex = -1;
                county.ClearSelection(); county.SelectedIndex = -1;
                state.Items.FindByValue("DE").Enabled = false; state.Enabled = true;
                county.Items.FindByValue("O").Enabled = true;
                county.Items.FindByValue("O").Selected = true; county.Enabled = false;
                SetFocus(state);
            }
        }
        #endregion

Trimox
Top achievements
Rank 1
 answered on 12 Mar 2008
1 answer
130 views
I am using the tree view control with context menu associated with nodes. I have observed this strange event generation behavior of context menus and I was hoping if anyone can help me resolve this issue. Following are the repro steps/observations:

1. Associate a context menu to different nodes of a tree view control. The menu has a couple of menu items.
2. Right click on a node. The context menu shows up. Don't select or hover over any menu item.
3. Right click on another node. The context menu shows up again as expected. Now click on any menu item. No events are generated.

I have a MenuItemClick handler on the server side as well as OnClinetContextMenuItemClicked handler set on the tree. None of these handlers are invoked in this particular scenario. I would have expected that right clicking a node and selecting one of its context menu item should always generate event irrespective of what I had done in the preceding steps.

We are stuck with this issue in our implementation and I was hoping if someone can please help me with this.

Thanks!


Erjan Gavalji
Telerik team
 answered on 12 Mar 2008
2 answers
119 views
Hi,

I'm using Prometheus (1425) and I have a master page which lays out the page using RadSplitter.  The master page contains two content areas.

In my content page, I have a user control in the first content area and a grid in the second content area. The grid is set to take up 100% x 100% of the content area and works fine when the page loads (at least in IE).

However, following a callback via RadAjaxManager, the grid loses its settings.  Rows are no longer selectable and the grid data area resets to 300px high.

I've debugged on the server side and all the corrrect values are there as far as pre-render so I can only presume it's something thats happening on the client as a result of the callback.

Any ideas?

Thanks,
Mark.

Vlad
Telerik team
 answered on 12 Mar 2008
1 answer
139 views

Couldn't find anything on this:  Is RadEditor known to work, not work, with MaintainScrollPosition?  I know this could be affected by several things.. being that it's not that reliable in the first place.  But, when I open the editor on a page scroll position is not maintained.  Other page postbacks do.

Also, is there a way to (like, by role) allow folder navigation above/outside of the folders in image, doc, templates view/upload/delete declarations?

Thanks again!
David
Rumen
Telerik team
 answered on 12 Mar 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?