Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
104 views
hi
How can use ScrollMode when chart data bounded programmatically?
my c# code is look like this:
protected void Page_Load(object sender, EventArgs e)
{
    ConnectionStringSettings connectionString = ConfigurationManager.ConnectionStrings["database"];
    SqlConnection connection = new SqlConnection(connectionString.ConnectionString);
    SqlCommand command = new SqlCommand("selectDetails", connection);
    command.CommandType = CommandType.StoredProcedure;
    SqlDataAdapter dataAdapter = new SqlDataAdapter();
    dataAdapter.SelectCommand = command;
    DataSet dataSet = new DataSet();
    dataAdapter.Fill(dataSet, "info");
    chart.ClientSettings.EnableZoom = true;
    chart.ClientSettings.ScrollMode = Telerik.Web.UI.ChartClientScrollMode.XOnly;
    chart.DataSource = dataSet.Tables["info"];
    chart.DataBind();
}

but I get this exception:
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.ScriptObjectBuilder.RegisterCssReferences(Control control) +182
   Telerik.Web.UI.RadChart.OnPreRender(EventArgs e) +61
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
  
  
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

any body can help me?














Ves
Telerik team
 answered on 29 Jun 2011
5 answers
143 views

Hello,

I have two GridTemplate columns in a Radgrid and they have two DropDownLists controls in each column. I need to update the 2nd grid column depending on the selected value from the first. I have the following code from my project:

<telerik:GridTemplateColumn UniqueName="State" HeaderText="State" SortExpression="State" HeaderStyle-Width="140px">
    <ItemTemplate>
        <asp:Label ID="lblState" runat="server" Text='<%# Eval("State") %>'></asp:Label>
        <asp:DropDownList ID="ddlState" runat="server" DataTextField="State"
            CssClass="cadddl" OnSelectedIndexChanged="ddlState_SelectedIndexChanged"
            AutoPostBack="true" DataValueField="State" Style="display: none">
        </asp:DropDownList>
    </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="City" HeaderText="City" SortExpression="City"
    HeaderStyle-Width="140px">
    <ItemTemplate>
        <asp:Label ID="lblCity" runat="server" Text='<%# Eval("City") %>' />
        <asp:DropDownList ID="ddlCity" runat="server" DataTextField="City" CssClass="cadddl"
            Width="120px" DataValueField="City" Style="display: none" />
    </ItemTemplate>
</telerik:GridTemplateColumn>

#region DropDownList
protected void ddlState_SelectedIndexChanged(object sender, EventArgs e)
{
    DropDownList ddlState = (DropDownList)sender;
}
#endregion

I've used the "Grid / Client edit with batch server update " demo to implement the grid (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx).

The ddlState_SelectedIndexChanged event updates the hole Grid, so i miss the earlier changes on the grid and i don't know how to find the corresponding ddlCity to the selected State.

Thanks in advance,

Tiago Gerevini Yoshioka

Maria Ilieva
Telerik team
 answered on 29 Jun 2011
1 answer
181 views
Greetings, I am trying to make a detailed invoice in a grid, which I hope is that the grid remains on all blank lines available to be edited, similar to a spreadsheet for execl, typically the grid is what makes give only one new line and I want it all unfold.

Thanks, I hope to help me.

Marin
Telerik team
 answered on 29 Jun 2011
1 answer
60 views


how to get whole value in Radeditor

Radeditor1.html (or) text , (or) some other

what i give there in place
 

Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 29 Jun 2011
1 answer
44 views
Hello,

I am very new to the RadGrid control. I am trying to implement the Virtual Scrolling feature. All the examples I see use a datasource that is pretty simple. I have a datasource that is a select statement pretty simple. The issue comes in the results. On some records, if a value in one of the columns equals a certain value then I want that cell to show a checkbox. If the same column has a value of a different value then I want the cell to show an image.

Are there examples of the Virtual Scrolling where the system has to go through each record before displaying to set the cell type correctly?

Thanks
Tsvetina
Telerik team
 answered on 29 Jun 2011
2 answers
111 views
Hi,

I need a new page in pdf. 

Sample:
radeditor1.content = " pdf document page1 <br /> page1 new line -new page- pdf document page2"

Thank you.
Hasan Can
Top achievements
Rank 1
 answered on 29 Jun 2011
1 answer
156 views
Hello,

I am displaying radgrid data, some columns using GridTemplateColumn and some are dynamically binding from the code behind. the grid is rendering the static columns first and dynamic columns later. I want to display one of the static columns as last column in the grid. can you please suggest how to achieve this?

Thanks in advance.

Regards,
Hari.
Sebastian
Telerik team
 answered on 29 Jun 2011
1 answer
112 views
Hi all,

I have the following issue:

In Site.Master I have the following:

<head runat="server">
    <title>
        <asp:ContentPlaceHolder ID="TitleContent" runat="server" />
    </title>
    <telerik:RadCodeBlock runat="server">
        <%= Html.MinifyStylesheet("~/Content/Site.css") %>
        <%= Html.MinifyStylesheet("~/Content/dark-hive-custom/jquery-ui-1.7.2.custom.css")%>
        <%= string.Format("<link REL='SHORTCUT ICON' HREF='{0}'>", CompilationSymbol.IsCableSolve ? Html.ResolveUrl("~/content/images/cs_icon.ico") : Html.ResolveUrl("~/content/images/id.ico"))%>
    </telerik:RadCodeBlock>
    <asp:ContentPlaceHolder ID="CssContent" runat="server">
    </asp:ContentPlaceHolder>
</head>

and, at the bottom of the page right before the closing body tag, I put my RadScriptManager declaration.

When my RadScriptManager is on the Master page, I encounter a weird error in my View. The view is acknowledging that it sees the RadScriptManager, but AJAX RadSplitter is saying that Telerik is undefined. If I move my RadScriptManager to the view page, removing it from the master page, AJAX RadSplitter works as expected.

Now, I was completely happy keeping my RadScriptManager on my view. I only use Telerik AJAX controls on this view. Unfortunately, I need the RadScriptManager on my Master Page in order to make the RadCodeBlock work on all pages which are not my view. If I remove the RadCodeBlock from Site.Master then my view throws an error mentioning the code blocks. 

You see my problem? I have a circular reference of errors. Any suggestions on how to support this other than adding a ScriptManager to every other view?
Simon
Telerik team
 answered on 29 Jun 2011
1 answer
49 views
Hi,

I'm trying to apply and inprove D'n'D from http://www.telerik.com/community/forums/aspnet-ajax/treelist/treelist-drag-n-drop-example-jquery.aspx

Unfortunately, OnItemCreated event fires only after mouse click anywhere on RadTreeList control, which is unexpected behaviour, as I understood.

Telerik version is 2011.1.526.40
Tsvetina
Telerik team
 answered on 29 Jun 2011
4 answers
105 views
Hello,

    I am unable to set the font size and color for rad editor. Even after setting it is taking the default settings values. In this regard, i need help urgently.

Thanks,

R. Vikram Goud
Dobromir
Telerik team
 answered on 29 Jun 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?