Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
148 views
Hi all,

I have a grid containing orders with IDs. This main grid have a nestedview in which I have a tab containing some text and another containing a new grid with the orderlines.

How can I give the information about the order id to the grid containing the orderlines. My code looks something like beneath (I have cutted out a lot of code to get a better overview of the essential code):

<telerik:RadGrid ID="RgOrders" AutoGenerateColumns="false" OnNeedDataSource="RgOrders_NeedDataSource" runat="server"
    <MasterTableView ClientDataKeyNames="id"
        <Columns> 
            <telerik:GridBoundColumn DataField="OrderNumber" HeaderText="OrderNumber" UniqueName="OrderNumber" /> 
            <telerik:GridBoundColumn DataField="OrderFirstName" HeaderText="OrderFirstName" UniqueName="OrderFirstName" /> 
            <telerik:GridBoundColumn DataField="OrderLastName" HeaderText="OrderLastName" UniqueName="OrderLastName" /> 
        </Columns> 
        <NestedViewTemplate> 
            <asp:Panel runat="server" ID="OrderNestedView" Visible="false"
                <telerik:RadTabStrip runat="server" ID="TabStrip1" Visible="true" SelectedIndex="0" MultiPageID="Multipage1" Align="Justify"
                    <Tabs> 
                        <telerik:RadTab runat="server" Text="OrderInformation" PageViewID="PageViewOrderInformation"
                        </telerik:RadTab> 
                        <telerik:RadTab runat="server" Text="OrderLines" PageViewID="PageViewOrderLines"
                        </telerik:RadTab> 
                    </Tabs> 
                </telerik:RadTabStrip> 
                <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false"
                    <telerik:RadPageView runat="server" ID="PageViewOrderInformation"
                        [... some orderinformation ...] 
                    </telerik:RadPageView> 
                    <telerik:RadPageView runat="server" ID="PageViewOrderLines"
                        <telerik:RadGrid ID="RgOrderLines" AutoGenerateColumns="false" OnNeedDataSource="RgOrderLines_NeedDataSource" runat="server"
                            <MasterTableView> 
                                <Columns> 
                                    <telerik:GridBoundColumn DataField="OrderLineNumber" HeaderText="OrderLineNumber" UniqueName="OrderLineNumber" /> 
                                    [... some more GridBoundColumn ...] 
                                </Columns> 
                            </MasterTableView> 
                        </telerik:RadGrid> 
                    </telerik:RadPageView> 
                </telerik:RadMultiPage> 
            </asp:Panel> 
        </NestedViewTemplate> 
    </MasterTableView> 
</telerik:RadGrid> 



Ahrensberg
Top achievements
Rank 1
 answered on 15 Dec 2009
3 answers
154 views
Hi all,

Here in the combobox i am getting problem with ItemsRequested event i am unable to get related data of which the word i had typed in the RadComboBox here is the code

protected void cmbPlatformName_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e){DataTable data = objTaskmanLib.GetData(e.Text); //GetData(e.Text);RadComboBoxItem item = new RadComboBoxItem();int itemOffset = e.NumberOfItems;int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);e.EndOfItems = endOffset == data.Rows.Count;for (int i = itemOffset; i < endOffset; i++){cmbPlatformName.Items.Add(new RadComboBoxItem(data.Rows[i]["Platform_Name"].ToString(), data.Rows[i]["Platform_Name"].ToString()));}e.Message = GetStatusMessage(endOffset, data.Rows.Count);}private string GetStatusMessage(int endOffset, int total){if (total <= 0)return "No matches";return String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, total);}

Here is the library code of getdata()

 public DataTable GetData(string text)
        {
            DataTable data = new DataTable();
            //data = null;
            try
            {
                conn = new SqlConnection(connectionstring);
                SqlDataAdapter adapter = new SqlDataAdapter("Select Platform_ID, Platform_Name from T26_Platform_Main where Record_Status='Active' and Platform_Name LIKE '" + text + "%'", connectionstring);
                //adapter.SelectCommand.Parameters.AddWithValue("@text", text);
                //SqlDataAdapter adapter = new SqlDataAdapter("SELECT * from T26_Platform_Main WHERE Platform_Name LIKE @text + '%'",ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);
                adapter.Fill(data);
                //return data;
            }
            catch (Exception excep)
            { 
                Console.WriteLine(excep.Message); 
            }
            return data;  
        }
Simon
Telerik team
 answered on 15 Dec 2009
1 answer
156 views
Hello

One of our clients has an installation where the telerik editor is included to edit content. Now he had the issue, that the client produced some html in the design mode by using the editor functionallity. In html view the code looks like that

<p>

<table>

    <p><>&lt;&gt;&lt;&gt;

    <p> </p>

    </>

    <tbody>

        <tr>

            <td>

            <p>aösdkjflöaskjdflöaksjdf </p>

            </td>

            <td>

            <p> asdfasdfasdf</p>

            </td>

            <td>

            <p>asdfasdfasdfsadf </p>

            </td>

        </tr>

        <tr>

            <td>

            <p> asdfasdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

        </tr>

        <tr>

            <td>

            <p> asdfasdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

        </tr>

    </tbody>

    </p>

</table>

</p>

<table>

    <p><>&lt;&gt;

    <p> </p>

    </>

    <tbody>

        <tr>

            <td>

            <p>aösdkjflöaskjdflöaksjdf </p>

            </td>

            <td>

            <p> asdfasdfasdf</p>

            </td>

            <td>

            <p>asdfasdfasdfsadf </p>

            </td>

        </tr>

        <tr>

            <td>

            <p> asdfasdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

        </tr>

        <tr>

            <td>

            <p> asdfasdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

            <td>

            <p> asdf</p>

            </td>

        </tr>

    </tbody>

    </p>

</table>

Now, when the user switches from Design to html view and back a few times, every time, the brackets where duplicated.

I know, that the html isn't really a clean one, but i like to know if we can do something to avoid the duplication

regards
patrick

Rumen
Telerik team
 answered on 15 Dec 2009
3 answers
549 views
Hi everyone !!


I want to SHOW the the size of the file that has been uploaded by me on to the RAD GRID VIEW.

Though I have successfully uploaded the file with the size of 10485760, but Iam not able to get the extension name such as (KB or MB) with the file size.

How can i show the extension ?

Please help

Below is the screen shot :-

Fiko
Telerik team
 answered on 15 Dec 2009
5 answers
163 views
Hi,

I am using Q2 2009  version. if there more data in editor and i scroll down to  the bottom and set the cursor at the bottom and move the cursor to the out side of  the editor  the scroll bar goes to the top position. so i have to scroll down again.

Is it a problem of browser or editor?. Because when i set the compatibility mode True in IE 8.0 the problem occurs. and If i set false then problem does not occur.

Please give me the solution ASAP.

Regards

Rahul
Rumen
Telerik team
 answered on 15 Dec 2009
5 answers
109 views
Hello,

I'm using the "Use RadEditor to edit HTML fields" feature. This seems to be working reasonably well, except that the RadEditor is shown below the original PublishingWebControls:RichHtmlField editor. I expected this to be replaced by the RadEditor. Am I doing something wrong?

Also, it doesn't seem to be possible to use script tags in the editor (removed by sharepoint presumably), but in another site I've worked on, this does work (magically somehow). Any ideas?
I'm thinking of writing a hack that replaces script with zcript or whatever, when saving and back when rendering. How can I hook into the save / render calls?

Thanks in advance,
Matthijs Wensveen
Matthijs Wensveen
Top achievements
Rank 1
 answered on 15 Dec 2009
1 answer
386 views
I've dumbed down my page about as much as I can.

I'm setting the DataSource of my RadGrid to the EL4 Database.ExecuteReader result.
Then I'm calling DataBind.

When I have EnableViewstate=true all works fine.

When I set EnableViewstate=false it fails (error below).

Any thoughts?  Anyone seen this before?

Thanks,
Kevin

Server Error in '/InternalAspx' Application.

 


 

Invalid attempt to call FieldCount when reader is closed.

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.InvalidOperationException: Invalid attempt to call FieldCount when reader is closed.

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:

[InvalidOperationException: Invalid attempt to call FieldCount when reader is closed.]
   System.Data.SqlClient.SqlDataReader.get_FieldCount() +4872808
   System.Data.Common.DbEnumerator.BuildSchemaInfo() +19
   System.Data.Common.DbEnumerator.MoveNext() +156
   Telerik.Web.UI.GridResolveEnumerable.GetCollectionItemType(Boolean noItemsInEnumerator, Type& collectionItemType, Object& collectionFirstObject) +210
   Telerik.Web.UI.GridResolveEnumerable.ParseProperties() +90
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +13
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +20
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +158
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +129
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +383
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +141
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +33
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +4
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +239
   Telerik.Web.UI.RadGrid.DataBind() +80
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +2121
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +145
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 


 

Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

Rosen
Telerik team
 answered on 15 Dec 2009
1 answer
92 views
I would like to use the sds:SessionDataSource that is in this demo but have it work for LinqToSQL.  What is the recommended way of creating temporary data that doesnt persist back to the database when doing LinqToSQL CRUD?  

Basically, I want to create a data structure that can reset itself every session so my users can fully test a web app iteratively while focusing on and approving a fully working UI before I refine the data model.  Any suggestion is appreciated.  :)
Nikolay Rusev
Telerik team
 answered on 15 Dec 2009
6 answers
153 views
We are using Visual Studio 2008 with our web application and we are compiling it against the .NET 2.0 framework. We are still using the Telerik.Web.UI controls that are made for .NET 2.0. We've noticed that when we change the properties for the grid (add another column, change column width, modify the client settings, etc.), the change is reflected in the designer, however when you go and look at the HTML code, it never gets updated. When you run the application, the changes are not displayed either. The changes only appear when you manually modify the HTML and then run the application.

Is there something that we're doing wrong?

Thanks,
Adam
Sebastian
Telerik team
 answered on 15 Dec 2009
3 answers
97 views
Hi,

I am having an issue with a content page that gives a javascript error every time I click on a radtabstrip tab the code is below

<%

 

@ Register Assembly="Telerik.Web.UI, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

 

 

 

Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 



 

 

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="tabMain">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="multiMain" />

 

 

 

<telerik:AjaxUpdatedControl ControlID="tabMain" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManagerProxy>

 

 

 

<div style="position: absolute; top: 100px; left: 50px; text-align: center">

 

 

 

<telerik:RadTabStrip ID="tabMain" runat="server" MultiPageID="multiMain" Skin="Office2007"

 

 

 

SelectedIndex="0" Width="800px" OnTabClick="tabMain_TabClick" AutoPostBack="True"

 

 

 

ClickSelectedTab="True">

 

 

 

<Tabs>

 

 

 

<telerik:RadTab runat="server" Text="Login" PageViewID="PageLogin" Selected="True">

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" Text="Forgot Password" PageViewID="PageForgotPassword">

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab runat="server" Text="Change Password" PageViewID="PageChangePassword">

 

 

 

</telerik:RadTab>

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

 

 

 

<telerik:RadMultiPage ID="multiMain" runat="server" SelectedIndex="0" Width="800px"

 

 

 

BorderStyle="Outset" BorderColor="Blue" BorderWidth="2px">

 

 

 

<telerik:RadPageView ID="PageLogin" runat="server">

 

 

 

<telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="True">

 

 

 

</telerik:RadComboBox>

 

 

 

</telerik:RadPageView>

 

 

 

<telerik:RadPageView ID="PageForgotPassword" runat="server">

 

 

 

</telerik:RadPageView>

 

 

 

<telerik:RadPageView ID="PageChangePassword" runat="server">

 

 

 

</telerik:RadPageView>

 

 

 

</telerik:RadMultiPage>

 


the issue seems to be if there is a radcombobox within a radpageview,

the javascript error is on the following line.

Sys.WebForms.PageRequestManager.getInstance()._destroyTree(_3c);


I am running VS 2010, IE8 on Server 2008, I have attempted to recreate the page serveral times and the error occurs on every new page.

Regards


Alex

Carl
Telerik team
 answered on 15 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?