Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
104 views
Hello,

I have a form outside of a grid that has textboxes and a button.  When the button is clicked the data is added to the grid and a database on a full postback.  But inorder to see the data in the grid I must perform another postback.  In looking for a solution to this problem I saw something about the data not being written to the database until the first postback is completed, not sure if thats true or not.  But I was hopeing someone could help me out with this problem because I would like the grid to have the newly inserted data after the add button is clicked.

Thanks,
Kirk
Schlurk
Top achievements
Rank 2
 answered on 15 Oct 2009
2 answers
156 views
Hello,

I'm using an SQL Datasource for my list.  It receives the value, text, and sort order from the SQLDataSource.  I would like to put an icon to the left of each list item (it will be the same icon each time - it isn't different on each item).  Almost like a bullet point icon.  I'm just doing this to dress up my list a little bit.  Can someone give me an example of how to do this with an SQLDataSource?  Here is an example of my ListBox:

<telerik:RadListBox ID="RadListBox1" runat="server"   
                                        DataKeyField="TopicAssign_ID" DataSourceID="SqlDataSource1"   
                                        DataTextField="TopicName"   
                  DataValueField="TopicAssign_ID" Skin="Office2007"   
                                        Width="100%" AllowAutomaticUpdates="True"   
                  AllowReorder="True" AutoPostBackOnReorder="True" DataSortField="SortOrder"   
                  EmptyMessage="The curently selected Role has no Topics"   
                  onreordered="RadListBox1_Reordered" TransferMode="Copy"   
                  EnableDragAndDrop="True" Height="300px" style="top: 0px; left: 0px">  
                                    <EmptyMessageTemplate> 
                                        The curently selected Role has no Topics  
                                    </EmptyMessageTemplate> 
                                    </telerik:RadListBox> 

I have an image named TopicListItems.png and will use that image for each item on the list.

Any help appreciated!
Heath Brown
Top achievements
Rank 1
 answered on 15 Oct 2009
1 answer
123 views
Hi there,

I have a Radgrid and in it I've got a GridBinaryImageColumn.

                <telerik:GridBinaryImageColumn DataField="Logo" HeaderText="Logo" UniqueName="Logo" 
                    ImageHeight="80px" ImageWidth="120px" ResizeMode="Fit" DataAlternateTextField="AgencyName" 
                    DataAlternateTextFormatString="Logo of {0}"> 
                    <HeaderStyle Width="10%" /> 
                </telerik:GridBinaryImageColumn> 

When I insert a new record I would like to check and make sure the user has selected an image to upload.
How can I do this?

Thanks,
Darren
Schlurk
Top achievements
Rank 2
 answered on 15 Oct 2009
1 answer
174 views

The TreeView control works fine in the page. However, it does not work in the Popup.

What confuses me is that the node expand and collapse works for TreeView even in the popup, but not the Contextmenu
 

To understand more about this, I added the alert() in the onClientContextMenuShowing to show the property values. First, I get the menu object:

treeNode.get_contextMenu()

It shows that enable state is "undefined" and visible is false. (it displays correctly if NOT in popup).
So I add these two lines:

 

menu.set_enabled();
menu.show(evt);

It still does not work.

What I don't understand is that same code works in the non-popup scenario.

I need help.

Here is the code:

<asp:ScriptManager ID="sm" EnablePageMethods="true" runat="server" ></asp:ScriptManager>
<telerik:RadEditor ID="htmlEditor" runat="server" OnClientLoad = "OnClientLoad"
         AllowScripts="True" Width="100%" Height="500" Skin="Vista" EditModes="Design,Html"  >
 <Tools>
                <telerik:EditorTool Name="btnSave" Text="Save" ShowIcon="false" showText="true" />
                <telerik:EditorSeparator Visible="true" />

  <telerik:EditorToolGroup>
   ..................
  </telerik:EditorToolGroup>
  </Tools>
</telerik:RadEditor>
 
<asp:Panel ID="pnlTemplateSave" Wrap="false" style="background-color:White;" runat="server">
<asp:UpdatePanel ID="updpnlSave" runat="server" UpdateMode="Conditional" >      
<ContentTemplate>
            <telerik:RadTreeView ID="RadTreeView2" MultipleSelect="false" AllowNodeEditing="true" runat="server" Height="300px"
                OnClientContextMenuShowing="onClientContextMenuShowing"
                OnClientContextMenuItemClicking="onClientContextMenuItemClicking"
                OnContextMenuItemClick="RadTreeView2_ContextMenuItemClick"
                OnNodeExpand="RadTreeView2_NodeExpand"
                OnNodeEdit="RadTreeView2_NodeEdit"
                Skin="Vista" >
                <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="RootFolderContextMenu" runat="server">
                        <Items>
                            <telerik:RadMenuItem Value="New" Text="New Folder" ></telerik:RadMenuItem>
                        </Items> 
                        <CollapseAnimation Type="none" />            
                    </telerik:RadTreeViewContextMenu>
                    <telerik:RadTreeViewContextMenu ID="ChildFolderContextMenu" runat="server">
                        <Items>
                            <telerik:RadMenuItem Value="New" Text="New Folder" ></telerik:RadMenuItem>
                            <telerik:RadMenuItem Value="Rename" Text="Rename Folder" PostBack="false"></telerik:RadMenuItem>
                            <telerik:RadMenuItem Value="Delete" Text="Delete Folder" ></telerik:RadMenuItem>          
                        </Items>           
                        <CollapseAnimation Type="none" />
                    </telerik:RadTreeViewContextMenu>
                    <telerik:RadTreeViewContextMenu ID="FileContextMenu" runat="server">
                        <Items>
                        </Items>           
                        <CollapseAnimation Type="none" />
                    </telerik:RadTreeViewContextMenu>
                </ContextMenus>
            </telerik:RadTreeView>          
            <ajaxToolkit:ModalPopupExtender ID="mpeTemplateSave" runat="server"
                                TargetControlID="btnSave"
                                BehaviorID="mpeTemplateSaveBhvr"
                                PopupControlID="pnlTemplateSave"
                                PopupDragHandleControlID="tblTemplateSave"                                                  
                                CancelControlID="btnCancel"                               
                                BackgroundCssClass="ext-el-mask" />

            </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>

<script type="text/javascript">

Telerik.Web.UI.Editor.CommandList["btnSave"] = function(commmandName, editor, args) {
                var mpe = $find('mpeTemplateSaveBhvr');
                if (mpe)
                    mpe.show();
            }

function onClientContextMenuShowing(sender, args) {
                var treeNode = args.get_node();
                var evt = args.get_domEvent();
                treeNode.set_selected(true);
                if (treeNode) {
                    var menu = treeNode.get_contextMenu();
                    if (menu) {
                        menu.set_enabled();
                        alert(menu.get_enabled());
                        menu.show(evt);
                        alert(menu.get_enabled() + "  " + menu.get_visible());
                    }

}
</script>


 

Atanas Korchev
Telerik team
 answered on 15 Oct 2009
3 answers
255 views
Hi,

I have a problem on displaying the target control that retains the first selected information.

Here my codes.

 

protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e)

 

{

 

Control ctrl = Page.LoadControl("~/UserControls/PersonalDetails.ascx");

 

e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);

 

PersonalDetails oPersonalDetails = (PersonalDetails)ctrl;

 

oPersonalDetails.Initial(

int.Parse(e.Value), 0, "", false);

 

}

 

protected void RGGP_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

{

BaseClass.

PeopleCareTeam oPeopleCareTeam = (BaseClass.PeopleCareTeam)e.Item.DataItem;

 

 

if (e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem || e.Item.ItemType == Telerik.Web.UI.GridItemType.Item)

 

{

RadToolTipManager1.TargetControls.Add(e.Item.ClientID, oPeopleCareTeam.LinkedPeopleID.ToString(),

true);

 

}

}

What shall I do to get refresh target control?

Regards,

Duy

Svetlina Anati
Telerik team
 answered on 15 Oct 2009
1 answer
122 views
Ive developed a website that makes use of modules and http handlers (for RADUpload, DialogHandlers, etc)

After deploying the site for further testing to the hosting company (Fasthosts.co.uk)  I had a problem which the support department told me was down to my web.config file.  They told me to remove the modules and handlers sections.

These provide a major part of my sites functionality so I cant remove then, is there a way around this.  Heres the part of the web.config file

<system.webServer> 
        <validation validateIntegratedModeConfiguration="false"/>  
        <modules> 
            <remove name="ScriptModule"/>  
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>  
        </modules> 
        <handlers> 
            <remove name="WebServiceHandlerFactory-Integrated"/>  
            <remove name="ScriptHandlerFactory"/>  
            <remove name="ScriptHandlerFactoryAppServices"/>  
            <remove name="ScriptResource"/>  
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
            <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI"/>  
            <add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"/>  
            <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>  
            <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>  
        </handlers> 
    </system.webServer> 






im really desparate to sort this out asap as i need to get the site up and running for my client, can anyone help ?
Atanas Korchev
Telerik team
 answered on 15 Oct 2009
1 answer
152 views
I have a Master/Content application and within the content page I dynamically load a user control (ascx). This user control can be loaded many times, and can be viewed with the use of tabs. Each user control has many labels and five image buttons.

On the master page, I have an ajax manager and a loading panel. On the content page, I have an ajax manger proxy and a loading panel, and on the user control, I also have an ajax manager proxy and loading panel.

I have setup the ajax manager proxy on the user control so when a user clicks on one of the image buttons a loading panel is displayed (or should be displayed). This is where I'm having issues. The loading panel only works on the first user control that is loaded. Any other user control created doesn't display the loading panel, however ajax is still working as you don't see the post back.

Any thoughts?

Thnaks!
Iana Tsolova
Telerik team
 answered on 15 Oct 2009
1 answer
103 views
I have two rad tree views in my aspx page. I am binding one of the tree views with a dataset returned from the business method. I am trying to drag a node from this tree view into the empty tree view, but, the node does not get dropped. I am using the code given in this site demo. Please help me.
Schlurk
Top achievements
Rank 2
 answered on 15 Oct 2009
1 answer
176 views
I'm getting the following js errors when trying to use RadListBox as in the 'first look' demo (transfer items between two listboxes)

Line: 2
Char: 13
Error: '$telerik' is undefined
Code: 0
URL: http://localhost:1653/Lighthouse/Candidate/listbox.aspx

I get three of the above errors followed by ...

Line: 111
Char: 1
Error: 'Telerik.Web.UI.RadListBox' is null or not an object
Code: 0
URL: http://localhost:1653/Lighthouse/Candidate/listbox.aspx

Has anyone seen this?  Did I miss a resource file somewhere?
Our company just moved from the Q1 release to the Q2 release.

Thank you.
Atanas Korchev
Telerik team
 answered on 15 Oct 2009
1 answer
123 views
25 Days and $999 spent and I'm still no closer to determining if these products were worth the purchase price. 

This article is very close to what I am trying to accomplish, with some exceptions and many of the samples I have looked at are using inline SQL versus ObjectDataSource or even CslaDataSource. 

I have already created a grid, populated it with Company profile data using CslaDataSource.  Then I have a details grid inside the Company profile grid which I populate with Company Address information.  The Company profile information is pretty straightforward  (Name, Description, etc.) nothing which requires another control with databinding. 

The Company Address grid however, needs to have three RadComboxes on Insert and Update which are databound in the form of: (Select Country, country causes a postback passing countryId to a stored proc to select Regions for that country and bind region; Select Region, region causes a postback passing countryId and regionId to get States for the region and country selected and bind States ComboBox.  For the life of me I cannot figure things out like what events to use during insert versus update or vice versa.  This is really becoming a frustrating product to use.   Both tables have an EditFormType=Template, but I'm willing to not go this route if I find a solution on how to implement the ComboBoxes. 

I faithfully followed the follwing video and was able to make it work very well: http://tv.telerik.com/aspnet/radgrid/telerik-trainer-+-radgrid-nested-tables
I read everything under the following location (everything under the hierarchy folder): http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/declarativerelations/defaultcs.aspx, unfortunately there's not much there for objectdatasources and nothing for csladatasource.

Something like this using objectDataSource would be very helpful: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx

Can anyone give me a sample that uses either object datasource or csladatasource with hierarchal grid, using templates and bound controls inside the nested table's edit and inert template?????

 

Rosen
Telerik team
 answered on 15 Oct 2009
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?