Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
295 views
Hello, I am having an issue with a custom edit form for rad grid.  I have cascading drop downs in an edit form template, basically, user selects a state and then the city dropdown pre populates with cities in that state.  I bind the initial item lists in the ItemDataBound event like I saw in some examples.  I have no issues pre populating the drop downs with the initial lists and selected values, however if a user changes the value of the States drop down, it causes a postback (which it should) but it resets the whole form back to the original values.

<MasterTableView EditMode="PopUp" EditFormSettings-PopUpSettings-Width="600" DataKeyNames="Id">
<EditFormSettings EditFormType="Template"   >
<FormTemplate  >
<table cellspacing="8">
<tr>
<td class="style2">Title:</td>
<td>
    <telerik:RadTextBox ID="txtTitle" Visible="true" Text='<%# DataBinder.Eval( Container, "DataItem.Title" ) %>' MaxLength="100" Width="400" runat="server">
    </telerik:RadTextBox>
</td>
</tr>
<tr>
<td class="style1" valign="top" >State:</td>
<td>
    <telerik:RadComboBox ID="RadComboBoxState" runat="server">
    </telerik:RadComboBox>
 
</td>
</tr>
<tr>
<td class="style1" valign="top" >City:
 
</td>
<td>
    <telerik:RadComboBox ID="RadComboBoxCity" runat="server">
    </telerik:RadComboBox>
 
</td>
</tr>

protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
   {
       if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
       {
           GridEditFormItem editFormItem = e.Item as GridEditFormItem;
           GridDataItem parentItem = editFormItem.ParentItem;
 
           Literal debug = (Literal)editFormItem.FindControl("ltr_debug");
 
           int _EntityId = Convert.ToInt32(parentItem["OwnerEntityId"].Text);
 
           //*******************************
           //Load states
           //*******************************
           RadComboBox cbStates = editFormItem.FindControl("RadComboBoxState") as RadComboBox;
           DataTable dtStates = ApplicationInterface.GetActiveStates();
           cbStates.DataSource = dtStates;
           cbStates.DataValueField = "id";
           cbStates.DataTextField = "name";
           cbStates.DataBind();
           cbStates.SelectedValue = parentItem["SelectedState"].Text;
           cbStates.AutoPostBack=true;
           cbStates.SelectedIndexChanged += new System.EventHandler(StateSelected);
 
           //*******************************
           //Load cities
           //*******************************
           RadComboBox lbCities= (RadComboBox)editFormItem.FindControl("RadComboBoxCity");
           DataTable dtCitiesByState = ApplicationInterface.GetCitiesForState(parentItem["SelectedState"].Text);
           lbCities.DataSource = dtCitiesByState;
           lbCities.AutoPostBack = true;
           lbCities.DataValueField = "id";
           lbCities.DataTextField = "name";
           lbCities.DataBind();
           lbCities.SelectedValue = parentItem["SelectedCity"].Text;
         
       }
   }

protected void StateSelected(object sender, EventArgs e)
{
   RadComboBox dc = (RadComboBox)sender;
 
   GridEditFormItem editedItem = dc.NamingContainer as GridEditFormItem;
   RadComboBox cities=editedItem.FindControl("RadComboBoxCity") as RadComboBox;
   ...
   ..Binding code here
 
 }


So the edit form populates correctly, user changes some text boxes etc... but if they select a different state the whole form resets.  Is there anything special I need to do to use cascading combo boxes with async postbacks in my edit form.  I have read some other posts but I cant find anything that replicates the issue I am having.
Pavlina
Telerik team
 answered on 16 Feb 2011
1 answer
81 views
Telerik Team

Does RadSpell support contenteditable iframes.As in our screen we have 4-5 contenteditable iframes along with textareas and we are using client side API's to do spell check like following.But its not taking the data in contenteditable iframe in spell check dialog.

var

 

_spellid = _spell.id;

 

 

 

var spell = GetRadSpell(_spellid);

 

 

 

//var spell = GetRadSpell(_spell);

 

spell.set_textSource(

new Telerik.Web.UI.Spell.MultipleHtmlElementsSource(sources));

 

 

SetDebugPoint(LabelCTR,

"in startSpellCheck");

 

 

spell.startSpellCheck();

Kindly provide some help in this regard as its very crucial for our application

Thanks
Sonia Dhamija

Rumen
Telerik team
 answered on 16 Feb 2011
3 answers
160 views
I have a situation where a http WCF service is hosted in IIS, and this service is called by a Winforms client based on Telerik's radcontrols for winforms.
My question is, can I use RadCompression to compress the WCF service responses and if yes, then how would I implement it? I would think it should be possible since the http WCF is just another http website with a web.config file like any other ASP.Net website.

Thanks
Sunil
Nikolay Rusev
Telerik team
 answered on 16 Feb 2011
1 answer
143 views
Hi! I tried to put a RadTooBar inside the CommandItemTemplate of RadGrid and it works perfectly in IE, Firefox, Opera and Safari, but not Chrome. Google browser instead of showing the items of the RadToolBar it doesn't show anything at all (just a little square). I tried to surraund the object with a <div> or modifying the size of it (or both), but nothing happens (the square gets bigger, but nothing inside).

I tried both 8 and 9 version of Chrome.

Here my code:

<telerik:RadGrid ID="Grid" runat="server" AutoGenerateColumns="False" ShowHeader="false"
    GridLines="None" CellPadding="0" Width="205" DataSourceID="Source">
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" DataSourceID="Source">
        <CommandItemTemplate>
            <telerik:RadToolBar ID="Toolbar" runat="server" Width="100%">
                <Items>
                    <telerik:RadToolBarButton runat="server" Width="95%">
                        <ItemTemplate>
                            <telerik:RadTextBox ID="Textbox" runat="server" Width="100%"></telerik:RadTextBox>
                        </ItemTemplate>
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Value="filter" ImageUrl="~/Imgs/funnel.png"></telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </CommandItemTemplate>
        <NoRecordsTemplate>No records!</NoRecordsTemplate>
        <Columns>
            <telerik:GridBoundColumn UniqueName="ID" DataField="ID" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Field" DataField="Nominativo"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="True"></Selecting>
    </ClientSettings>
</telerik:RadGrid>
Luke
Top achievements
Rank 1
 answered on 16 Feb 2011
1 answer
109 views
I am working in SiteCore 6.0.2.  In the media library, I upload a flash file.  I use the Flash Manager to select and insert the media into the content and when I do, it works correctly the first time.  When I come back to edit the content, the src attribute is empty. 

Code after inserting:

<object id="myMovieName" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="630" height="209">
        <param name="_cx" value="16668" />
        <param name="_cy" value="5529" />
        <param name="FlashVars" />
        <param name="Movie" />
        <param name="Src" value="%7E/media/introduction2.ashx" />
        <param name="WMode" value="Window" />
        <param name="Play" value="-1" />
        <param name="Loop" value="-1" />
        <param name="Quality" value="High" />
        <param name="SAlign" />
        <param name="Menu" value="-1" />
        <param name="Base" />
        <param name="AllowScriptAccess" />
        <param name="Scale" value="ShowAll" />
        <param name="DeviceFont" value="0" />
        <param name="EmbedMovie" value="0" />
        <param name="BGColor" />
        <param name="SWRemote" />
        <param name="MovieData" />
        <param name="SeamlessTabbing" value="1" />
        <param name="Profile" value="0" />
        <param name="ProfileAddress" />
        <param name="ProfilePort" value="0" />
        <param name="AllowNetworking" value="all" />
        <param name="AllowFullScreen" value="false" />
      </object>

When I come back to edit the content, the code changes to:

<object id="myMovieName" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="630" height="209">
        <param name="_cx" value="16668" />
        <param name="_cy" value="5529" />
        <param name="FlashVars" />
        <param name="Movie" />
        <param name="Src" />
        <param name="WMode" value="Window" />
        <param name="Play" value="-1" />
        <param name="Loop" value="-1" />
        <param name="Quality" value="High" />
        <param name="SAlign" />
        <param name="Menu" value="-1" />
        <param name="Base" />
        <param name="AllowScriptAccess" />
        <param name="Scale" value="ShowAll" />
        <param name="DeviceFont" value="0" />
        <param name="EmbedMovie" value="0" />
        <param name="BGColor" />
        <param name="SWRemote" />
        <param name="MovieData" />
        <param name="SeamlessTabbing" value="1" />
        <param name="Profile" value="0" />
        <param name="ProfileAddress" />
        <param name="ProfilePort" value="0" />
        <param name="AllowNetworking" value="all" />
        <param name="AllowFullScreen" value="false" />
      </object>

With Sitecore, it is linking the src attribute as a .ashx file.   Do you have any workarounds?  I am assuming the src parameter is not kept as the item is not a .swf, but the .ashx, returns the swf file.

Thanks,
Andy
Rumen
Telerik team
 answered on 16 Feb 2011
3 answers
107 views
I am using a RadMenu at the top of my Master Page and all works fine, however, I want to have a section that has no text and spans to the end of the page kind of like the ibm.com website.  If you notice on the IBM.com website, first there are a few drop down menu buttons and as you go further to the right, there is a blank space that spans pretty wide until the IBM Sign In/Register text menu.  How do I do that with a RadMenu so that it spans across the entire page?
Kate
Telerik team
 answered on 16 Feb 2011
2 answers
306 views
Hi:

I have  a RadComboBox that is using an ItemTemplate.
<telerik:RadComboBoxItem Value="0" Text="Report 1" ReportName="Report 1" About="Select product(s) and view details" Dir="/Invent/" Prompts="False"></telerik:RadComboBoxItem>

I was hoping to use this as a repository per my reports.  Is there a way to get to the various attributes.

Phil
Phil
Top achievements
Rank 2
 answered on 16 Feb 2011
5 answers
96 views
Hi,

I have Windows Vista Ultimate SP1 and VS 2008.
I had successfully installed Telerik 2009 Q3, but when I run Live Example Rad Control, page shows "sys is undefined" JS error and all of controls shows like a lot of bullet.
I tried all of related solutions in this forum but the problem is still exist.
In the other hand I have the same problem when I use controls in VS2008.
It seems very unusual :-)
Any ideas?
Rumen
Telerik team
 answered on 16 Feb 2011
4 answers
105 views
Hi,

How can I show Ajaxloading panel on tabclick.? I am setting the  content  url of of each page view  on tabclick event and its takes around 1 minute to render it.
Any idea?

Thanks
Prava

Veronica
Telerik team
 answered on 16 Feb 2011
2 answers
198 views
Hi!

I have an issue that I can not seem to find a solution for in the forum. When using the grid and select 7 out of 10 check boxes if I happen to click anywhere on a row outside the check box then all 7 selections deselect. How can I change this functionality so that any previously selected check boxes stay enabled?

I'm using Visual Studio 2010 with the Telerik ASP.NET AJAX (v.2010.3.1215.35) controls.

I have followed the example provided in the forum post cancel OnRowSelecting when clicked outside clientselect checkbox

The logic works in that I can only enable a check box by clicking directly in the check box and not any where else in the row.  However, when I try to get a count of the selected items I always get a value of 0.  In the code behind here is how I'm trying to get a count when the user clicks a 'submit' button...
If (RadGrid1.SelectedItems.Count > 0) Then
    For Each item As GridDataItem In RadGrid1.SelectedItems
        selectedWriters.Add(item("UserID").Text)
    Next
Else
    lErrorMsg.Text = "You must select at least on Writer."
    Return
End If

Could someone please provide some insight as to why I am unable to get a count, or if there is a better/different solution I should try?
Thank you!!
Amy
Top achievements
Rank 1
 answered on 16 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?