Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
In my popup edit form I have a templated column "TTL" and its TextBox   "TTLTextBox".
I want to suggest a value for this, and have used this code, which does not presen an inital value,
but has no error messages. Can you tell me why?
Thanks
Clive
Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated  
        If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then  
 
            If e.Item.OwnerTableView.IsItemInserted Then  
                'item is about to be inserted  
                Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)  
                Dim TxtBx As TextBox = DirectCast(item.FindControl("TTLTextBox"), TextBox)  
                TxtBx.Text = "21" 
 
            Else  
                'item is about to be edited  
            End If  
        End If  
    End Sub 

the rekevant column declaration is

<

 

telerik:GridTemplateColumn DataField="TTL"

 

 

DataType="System.Int16" HeaderText="TTL"

 

 

SortExpression="TTL" UniqueName="TTL">

 

 

<EditItemTemplate>

 

 

<asp:TextBox ID="TTLTextBox" runat="server" Text='<%# Bind("TTL") %>'

 

 

Width="30px" MaxLength="3" style="text-align:right"></asp:TextBox>

 

 

</EditItemTemplate>

 

 

<ItemTemplate>

 

 

<asp:Label ID="TTLLabel" runat="server"

 

 

Text='<%# Eval("TTL") %>'></asp:Label>

 

 

</ItemTemplate>

 

Shinu
Top achievements
Rank 2
 answered on 26 Nov 2009
3 answers
213 views
I have a RadTabStrip hooked up to a RadMultiPage, with a 1px border set on the RadMultiPage. I've then used some CSS on the RadMultiPage control (margin-top: -1px) so that it aligns properly to the bottom of the tabstrip.

This looks great, except the border is continous on the RadMultiPage and doesn't break for the selected tab. I'm trying to get this to work with the "Gray" skin, but I'm also seeing similar behaviour with the "Vista" skin.

I've had a search through the forums and can't find any posts on this, although there is a post for the old RadControl which describes the margin solution I'm already using.

I'm sure I didn't used to have this problem with the pre-Prometheus version, so maybe it's something new with the ASP.NET AJAX version?
Dave
Top achievements
Rank 1
 answered on 25 Nov 2009
4 answers
242 views
Here is the scenario:

SQL Database Tables involved:
Contacts
Numbers             (A contact can have multiple numbers)
Addresses           (A contact can have multiple addresses)
PracticeAreas     (A contact can have multiple Practiceareas)

When I combine the tables in a single query I get multiple rows of the same contact when the contact has multiple numbers, addresses, or practice areas.  So I went ahead and built a grid with the datasource from a query that included just the contacts table. 

On the grid ItemDataBound I do calls to the database to pull the correct numbers/addresses/practiceareas for each contact.
I save multiple numbers in a hidden field as a string.  (Example:  "number1+number2+number3" could be a string of 3 numbers for one contact)
(Everything is displayed in a single Template column with multiple controls)

This works good but is pretty resource intensive doing multiple calls to the DB for each record.....

Also on the ItemDataBound event, when e.Item.IsInEditMode I fill my controls in my edit template with the values from my Contact datasource.  However, I am not sure how to access the hidden fields because they are in the ItemTemplate  How do I do that?

Also, does anyone have a better idea on how to display this type of data in a grid and keep track of it for edits and updates?





Developer
Top achievements
Rank 1
 answered on 25 Nov 2009
6 answers
281 views

I have a RadGrid for a news management system. In EditFormSettings – FormTemplate I need a Treeview inside the FormTemplate which depends on the ArticleID of the news in edit mode. Data for Treeview comes from a stored procedure which expects ArticleID as parameter.

I expected that
<telerik:RadTreeView ID="RadTreeView1" runat="server" DataFieldID="PortalID"  
                                DataNavigateUrlField="PortalID" DataSourceID="SqlPortalTreeDataSource"   
                                DataTextField="PortalName" DataValueField="PortalID"> 
                            </telerik:RadTreeView> 
 
<asp:SqlDataSource ID="SqlPortalTreeDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"  
SelectCommand="peRedPlan_GetPortalsTree" SelectCommandType="StoredProcedure"> 
<SelectParameters> 
    <asp:ControlParameter  ControlID="RadGrid1" Name="ArticleID"  PropertyName="SelectedValue" Type="Int32" /> 
</SelectParameters> 
</asp:SqlDataSource> 
 
brings up the TreeView. SQL Server Profiler shows me, that the StoredProcedure is not started. If I set a default value in SelectParameters (e.g. 7272) all runs fine and TreeView is created. So I suppose, that RadGrid1 does not provide ArticleID for SelectParameters. Or what runs wrong?
Robert
Top achievements
Rank 1
 answered on 25 Nov 2009
2 answers
103 views
Hi,

how can I achieve that the progress area do not close automatically after the process completed.
I would like to keep it open and the user has to close it by a click on a button.

Thanks for any help.
Phil H.
Top achievements
Rank 2
 answered on 25 Nov 2009
5 answers
732 views
I created a simple test app that builds a .NET Data Table and binds it using DataBoundColumns to a RadGrid using version 2009.1.311.35.  I have set the ExportSettings as ExportOnlyData=true, IgnorePaging=true and OpenInNewWindow=true.  Everything works fine if I set the Excel Format to Html, but if I set it to ExcelML I get the following error:

Object reference not set to an instance of an object. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +1395
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8676409
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderPage(HtmlTextWriter nullWriter, Control page) +146
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266

 Do I need to have Excel installed on the server for it to export to Excel?  Is there some setting I am missing?  I am following the demo located http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/exporting/defaultcs.aspx and other than my data source being from a built data table instead of a database table, everything else is the same.

Adam Gritt
Daniel
Telerik team
 answered on 25 Nov 2009
2 answers
103 views
I am trying to finish a project started by someone else. I am attempting to add a simple JavaScript.  On opening an onclick the spinning donut starts spinning and a table that was hidden is displayed. What I want to do is to run the script without anything happening but my script. How can I do this? 
Joel Moses
Top achievements
Rank 1
 answered on 25 Nov 2009
3 answers
210 views
I have a simple user control (.ascx) that will contain an <asp:ImageButton> control. I would like to expose a property of the control (i.e. message that will be displayed in the alert) and then when the user clicks on the image button, have the radalert display the message that was set in the property.

Any thoughts?
Dennis
Top achievements
Rank 1
 answered on 25 Nov 2009
1 answer
131 views
Hello,
I am currently evaluating Telerik controls (the latest Q3 release) to see if they fit in my current project and I was amazed with the tools and controls that you empower developers with. I was comparing Telerik radEditor to FCKeditor which is currently used in our project.
I noticed the following things which I don't know how to handle:
The majority of documents that our users work with are in Arabic and some times there might be both Arabic and English paragraphs in the same document. The documents are lengthy and include all sorts of things like annotations, Table of Contents, ...etc.

1- When I use the paste from word option (in radEditor), the output is not as clean as the one generated by FCKeditor, even when using the MSWordRemoveAll option. For example, I find tags like :

<p style="text-justify: kashida; text-align: justify; text-kashida: 0%; unicode-bidi: embed; direction: rtl; background: white;" dir="rtl"><b></b></p>
<p style="text-align: center; margin: 0in 0in 0pt; background: white;" dir="rtl">&nbsp;</p>

while, in FCKeditor, the output will be :

<div dir="rtl">
    <b>&nbsp;</b></div>
<div dir="rtl">
    <b>&nbsp;</b></div>

Is there a way to strip all the styling information coming from word? I thought about re-defining the function that strips word documents to include more rules but I don't know if this is possible or not! (I looked at the radeditor JS code and the file is minified but I was able to identify the place where word stripping occurs, is there a way to redefine the function without directly editing this file?)

Furthermore, radEditor includes some strange style attributes  markup when used in Mozilla firefox (FCKeditor includes some regex expressions to remove this markup) like :

<p style="background: white none repeat scroll 0% 0%; text-align: justify; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; direction: rtl; unicode-bidi: embed;" dir="RTL"><strong></strong></p>

Is there  a way to fix this?

2- Currently there is no direct,easy way to include both rtl and ltr content in the same edited document. I read the post that suggests adding two buttons to radEditor to switch between rtl and ltr but ,it's only a guess (I didn't test it) , I am afraid that it will affect the whole document not the selection because it didn't seem to me that it's surrounding the selection with markup to indicate the new direction. Is there a turn around?

I am still evaluating the editor, so I don't know if I will find any additional things, but till now, I am impressed and I guess that having the above points in place will be a great addition to radEditor.






Rumen
Telerik team
 answered on 25 Nov 2009
4 answers
344 views
I have a ComboBox that is hidden and I want to get the Text value of it not the SelectedValue.  RadComboBox1.Text will work if the combobox ISNT hidden but once you hide it the value is then blank.

ComboBox0 Passes the selected value to ComboBox1 (hidden) I then want to store the text of this combobox in a database now.
Veselin Vasilev
Telerik team
 answered on 25 Nov 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?