Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
770 views
"a Datatable named 'table' already belongs to this dataset" is the error I am getting in a message box on my page. Here is the scenario of what is going on. I am saving the users grouped columns in my database. Upon reentering the page I pull from the database and regroup the grid using the stored values. Example of stored value: Balance Type|balance_type - First item is the name I use to display and the second is the actual field name that we want to group on. This works beautifully. They can save this and renter the grid and the settings is there. BUT!!! When the user selects to change the grid page size is when it generates the above error. I cannot determine where this is happening or why.

I am using needdatasource to bind my data from the SQL server and settting the grids settings after I populate the grid. I only get the settings from the database on the first load of the page because I don't want to stomp on the users changes every time they do something that might cause a postback to the page, that would be annoying.

So any ideas on what this is or why it is happening would be greatly appreciated.
byoung
Top achievements
Rank 1
 answered on 31 Dec 2012
1 answer
38 views
Hi,

I've just been alerted by a user that the latest version of the RadTreeView is now rendering extra height on the page - using the Black skin.

If I set the row height to 20 px I seem to end up with an extra 1px border being added.  Interestingly when I do a mouse over the border for that row collapses and the row position moves up and to the left.

Please let me know what CSS hack I can apply to remove this behaviour.  I've played around with the CSS tools in Chrome but couldn't find the problem..

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 31 Dec 2012
7 answers
113 views
Is it possible to change the view of the row when you drag it? By default you get to see a full floating row when you start to drag it. I would like to change this to an icon, basically the way Windows Explorer works when you drag a row from the details view.

I'm looking at the row drag started client side event to achieve this but not sure if that is correct or if indeed this is possible?
Prasanna
Top achievements
Rank 1
 answered on 31 Dec 2012
4 answers
278 views
Hi There,

I'm trying to add some extra GridTemplateColumns on my Page_Init using my own custom template class. When the page loads the first time, everything is fine and dandy. Yet after a postback from a filter or paging command, things go horribly wrong. More specifically, the extra columns that I i'm adding on Page_Init remain, but for every postback, an extra set of blank columns are added to the grid. My initial thought was to just wrap my Page_Init inside a if(!isPostBack) statement, but then no extra columns show at all after a postback. Please help!

Here's my Page_Init:

protected void Page_Init(object sender, EventArgs e) 
    { 
        ListBuilderTableAdapters.listsTableAdapter listAdapter = new ListBuilderTableAdapters.listsTableAdapter(); 
        ListBuilder.listsDataTable dt = listAdapter.GetActive(); 
 
        foreach (ListBuilder.listsRow dr in dt.Rows) 
        { 
            GridTemplateColumn gtc = new GridTemplateColumn(); 
            gtc.HeaderText = dr.list_name; 
            gtc.ItemTemplate = new MailingListTemplate(dr.list_name, dr.id); 
            mlRadGrid.MasterTableView.Columns.Add(gtc); 
        } 
    } 

... and my custom template looks like this.

public class MailingListTemplate : ITemplate 
    { 
        protected string Text; 
        protected int listID; 
 
        public MailingListTemplate(string Text, int listID) 
        { 
            this.listID = listID; 
            this.Text = Text; 
        } 
 
        public void InstantiateIn(Control container) 
        { 
            HiddenField hf = new HiddenField(); 
            hf.Value = listID.ToString(); 
 
            CheckBox cb = new CheckBox(); 
 
            container.Controls.Add(hf); 
            container.Controls.Add(cb); 
        } 
    } 

Also, my NeedDataSource uses the same datasource that I bind to on my Page_Load:

protected void mlRadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
            mlRadGrid.DataSource = recipientAdapter.GetUnique(); 
    } 

Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
59 views
hi there,
     i have set sorting in grid. its working good. but i want to do away with these sorting background colors. can somebody help me out pls. thanks in advance

savyo
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
75 views
Hi,
  I have a problem setting the allowfiltering to true in radgrid. Filtering is appearing in all the columns. How do I disable filtering in the first 2 bound columns.

thanks
Allen
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
4 answers
146 views

Hello,

I have attached code that will allow you to recreate the issue. I want to embed google maps in a tab lay out. I want the map to be on the last tab.

It seems if the tab is selected on page load, the map renders correctly but if not, it will not. To illustrate this, I made a tab strip with two tabs, each with an IFRAME inside. Play with SelectedIndex and what not to see what is happening.

Essentially, whichever pageview will render the IFRAME correctly. I need a way to display the IFRAME on a tab that is not selected on load. Please advise.

Thanks,
Nelson

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>

</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1"
EnablePartialRendering="true"
AsyncPostBackTimeOut="600"
runat="server" >
</telerik:RadScriptManager>

<div>

<telerik:RadTabStrip CausesValidation="false" ID="tabInspections" runat="server" Skin="Web20" Width="910px" CssClass="DetailsRadStrip" SelectedIndex="0" MultiPageID="mp1">

<Tabs>
<telerik:RadTab Text="1" Value="1" PageViewID="pv1" ></telerik:RadTab>
<telerik:RadTab Text="2" Value="2" PageViewID="pv2" ></telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>

<telerik:RadMultiPage ID="mp1" runat="server" CssClass="pageView" Width="910px">
<telerik:RadPageView ID="pv1" runat="server" Selected="true">
<iframe ID="externalFrame" runat="server" frameborder="0" height="100%"
scrolling="no" marginheight="0" marginwidth="0" style="display: block; text-align: left; " width="100%"></iframe>
</telerik:RadPageView>
<telerik:RadPageView ID="pv2" runat="server">
<iframe ID="externalFrame2" runat="server" frameborder="0" height="100%"
scrolling="no" marginheight="0" marginwidth="0" style="display: block; text-align: left; " width="100%"></iframe>
</telerik:RadPageView>
</telerik:RadMultiPage>
</div>
</form>
</body>
</html>


Partial Class test
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
externalFrame.Attributes.Add("src", "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=495 Eastern Avenue, Chelsea, MA&aq=0&sll=42.348776,-71.072316&sspn=0.028482,0.026565&vpsrc=0&ie=UTF8&hq=&hnear=495 Eastern Ave, Chelsea, Massachusetts 02150&z=14&iwloc=A&output=embed")
externalFrame2.Attributes.Add("src", "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=495 Eastern Avenue, Chelsea, MA&aq=0&sll=42.348776,-71.072316&sspn=0.028482,0.026565&vpsrc=0&ie=UTF8&hq=&hnear=495 Eastern Ave, Chelsea, Massachusetts 02150&z=14&iwloc=A&output=embed")

End Sub
End Class

Justin Wong
Top achievements
Rank 1
 answered on 31 Dec 2012
1 answer
118 views
Hi,
I have a radgrid. I have added a dropdown in the radgrid, which is as follows:

<ItemTemplate>
<asp:DropDownList ID="ddlGender" runat="server" SelectedValue='<%# Eval("UGender") %>' />
<asp:TextBox ID="txtUserId" ReadOnly="true" runat="server" Text='<%# Eval("UserId") %>'  />
  </ItemTemplate>
  
                                                <InsertItemTemplate>
                                                    <asp:DropDownList ID="ddlGender" runat="server">
                                                        <asp:ListItem Text="Male" Value="Male"></asp:ListItem>
                                                        <asp:ListItem Text="Female" Value="Female"></asp:ListItem>
                                                    </asp:DropDownList>
                                                    <asp:TextBox ID="txtUserId" runat="server" ></asp:TextBox>
                                                    </InsertItemTemplate>

In the Insertcommand, i am setting the value to a datatable as below:

DataTable test1 = new DataTable();
  
            GridDataInsertItem item = (GridDataInsertItem)e.Item;
  
            DropDownList ddlGender = (DropDownList)item.FindControl("ddlGender");
            string ddlGendervalue = ddlGender.SelectedValue;
        
            DataRow dr = test1.NewRow();
  
            dr["UGender"] = ddlGendervalue;
test1.Rows.Add(dr);
radgridl.DataSource = this.test1;

I am getting the selected value of the dropdown. However, i am getting the below javascript error and insert is not happening.

Sys.WebForms.PageRequestManagerServerErrorException: 'ddlGender' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

How to fix this?

Thanks
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
108 views
Hi all,

In my RadGrid, I have 3 columns. I need to give the Column header text dynamically. Please provide some solutions.
Shinu
Top achievements
Rank 2
 answered on 31 Dec 2012
1 answer
84 views
Telerik Support just explained why one of my RadDatePickers wouldn't pop up so I thought I'd pass it along.

I was using ClientIDMode="Static" to create non-changing IDs for my JavaScript routines. Bad Move!

Here's the explanation as to why you need to stick to AutoID:

"Since these are controls with complex hierarchies of child controls and templates, setting their ClientID mode to Static will break their functionality"

Maybe everyone else already knew this, but there you go.

Ken
vincent
Top achievements
Rank 1
 answered on 30 Dec 2012
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
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
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?