Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
187 views
Greetings,

Im trying to send multiple selected values from a radgrid, which is on a radwindow (acting as a dialogue). I can successfully send values that are in textboxes and comboboxes but the problem is when the code reaches a point where its supposed to send values from the radgrid. I get the NULL OBJECT ERROR. I have tried using Sys.application.add_load to noavail.

This is the function that im using to retrieve the selected values on the radgrid.
function returnToParent() {
             
               //create the argument that will be returned to the parent page
               var oArg = new Object();
               //THE NULL OBJECT ERROR IS ON THIS LINE
               var gridView = $find("<%= RdGRoles.ClientID %>").get_masterTableView();
                               
               oArg.selGroup = gridView.get_selectedItems();
               //get a reference to the current RadWindow
               var oWnd = GetRadWindow();
               oWnd.close(oArg);
               
           }

Im calling this function when a user clicks OK button:

Protected Sub btnOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOk.Click
       ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "returnToParent();", True)
   End Sub

Thanks in advance
Georgi Tunev
Telerik team
 answered on 22 Oct 2010
1 answer
118 views
hi all , in my application i am using Radtreeview but while binding i am getting the following error

"This constraint cannot be enabled as not all values have corresponding parent values"
and my tree view structure is like this
+Parenntname
----ChildName
----Childname
+Parenntname
----ChildName

my query will rerun following tabular data

parentID     Parentname                               ChildID        ChildName

271 BharatForge-1 1700 SO-2-81314-1601

274 KumarPlaza 1900 SO-7-91112-1801

276 JOG Classes 2000 SO-24-91112-1901

276 JOG Classes 2100 SO-24-91112-2001

276 JOG Classes 2200 SO-24-91112-2101

276 JOG Classes 2300 SO-24-91112-2201

276 JOG Classes 2400 SO-24-91112-2301

277 JOG rare
2500 SO-24-91112-2401

277 JOG rare
2600 SO-24-91112-2501

plz tell the solution
Yana
Telerik team
 answered on 22 Oct 2010
1 answer
116 views
I have very basic RadMenu that is Horizontal.  Sometimes when I click on a menu item the Menu 'flashes' and appears vertical for a split second then looks fine. It's on a MasterPage. Any ideas?   It has both a menu Item click and some are Nav URLs.
thanks!
Yana
Telerik team
 answered on 22 Oct 2010
3 answers
97 views
Hi,

When using a treeview control that is populating via a web service how can I delete a node (from client side) and pull all of its children up (if any) and make them children of the deleted node's parent? I only want to delete the single node, not the entire subtree.

Example A->B->C, if I delete B I want C to move up under A.

Also if the node that I am deleting has not been expanded, then it should be expanded first so that the children that get pulled up are not only the currently displayed children but all logical children from the web service population as well.

Thanks
Nikolay Tsenkov
Telerik team
 answered on 22 Oct 2010
6 answers
137 views
I use RadEditor list for MOSS2007, and add a custom button with showtext=true. This button open a custom dialog. However, every time the button is clicked, editor's selection is lost (focus returns to beginning of text). This does not happen if showtext is false.

Is there a way to show button text but keep selection intact when button is clicked?
Stanimir
Telerik team
 answered on 22 Oct 2010
14 answers
442 views
Hi all, is there a way to change the default tooltips of the items in the RadRating control to custom text? (instead of "1", "2", "3", ... I'd like to set "Poor", "OK", "Good", ...).

I've tried everything, even modifying the RadRating.js file (which BTW is obfuscated so it's a nightmare to change :-D).

Can I customize this behavior?

Thanks in advance.
Kind regards.
arnaud
Top achievements
Rank 1
 answered on 22 Oct 2010
1 answer
131 views
Hi, I'm trying to enable the page size combobox in a FileExplorer instance. I'm programmatically setting this:

        Me.RadFileExplorer1.Grid.MasterTableView.PagerStyle.AlwaysVisible = True
        Me.RadFileExplorer1.Grid.MasterTableView.PagerStyle.Mode = Telerik.Web.UI.GridPagerMode.NextPrevAndNumeric

But nothing happens when I change the page size in the combobox. I'm using version 2010.1.309.35. How can I fix this?

Thanks,
Santiago.
Dobromir
Telerik team
 answered on 22 Oct 2010
1 answer
100 views
Hello!

I have a radgrid in an update panel. I use javascript to activate the inplace edit mode by double clicking the row. The problem is that when I double click directly on the text of databound columns the whole page is marked?!?! When I double click on free space in the row or columns which are not bound to a datafield everything works fine.

See the attachment.

Any suggestions?

Kind regards

Michael
Tsvetina
Telerik team
 answered on 22 Oct 2010
5 answers
579 views
Hey everyone,

I am using this radgrid
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" OnNeedDataSource="RadGrid1_NeedDataSource"
                AllowPaging="True" AllowSorting="True" GridLines="None" Skin="Office2007">
                <MasterTableView>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <EditFormSettings>
                        <FormTemplate>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td colspan="2" style="font-size: small">
                                        <b>Order Details</b>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            <tr>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Order Id:
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblOrderId" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Product Name:
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="ddlProductName" runat="server" DataSourceID="SqlDataSource1"
                                                        DataTextField="ProductName" DataValueField="Pid" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Rate:
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblRate" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Qunatity:
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtQuantity" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Amount:
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblAmount" runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </FormTemplate>
                    </EditFormSettings>
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                </ClientSettings>
            </telerik:RadGrid>
Now,i want to open insert form on button click that is outside the grid.My dataSource for radgrid is datatable--
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            dtValues = new DataTable();
            dtValues.Columns.Add("Items");
            dtValues.Columns.Add("Rate");
            dtValues.Columns.Add("Quantity");
            dtValues.Columns.Add("Amount");
            RadGrid1.DataSource = dtValues;
        }
How to proceed?...

Thanks
Amit
Tsvetina
Telerik team
 answered on 22 Oct 2010
2 answers
150 views
my gridview aspx code is..

<telerik:RadGrid ID="radGrid1" runat="server" AutoGenerateColumns="False"
            OnSelectedIndexChanged="radGrid1_SelectedIndexChanged" GridLines="None"
            AllowMultiRowEdit="True" OnItemDataBound="radGrid1_ItemdatBound">
             
            <MasterTableView  AutoGenerateColumns="false">
             
                <Columns>
             
                    <telerik:GridTemplateColumn HeaderText="Product Name">
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="cbo1" runat="server" AppendDataBoundItems="true" EnableLoadOnDemand="true" Width="300px" Height="100px"
                            DataValueField="product_id" AutoPostBack="true" Text='<%# Bind("Product_Name")%>' DataTextField="Product_Name" MarkFirstMatch="true" DropDownWidth="300px"></telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Product_rate">
                        <ItemTemplate>
                            <asp:Label ID="lblrate" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Product_Rate")%>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Product Quantity">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtQuantity" runat="server" />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Product Amount">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtAmount" runat="server" />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
and code behind is

for bind radgrid is
public void bindradGrid()
        {
            SqlConnection con=new SqlConnection(ConfigurationManager.AppSettings["connectionstring"].ToString());
            SqlCommand cmd=new SqlCommand("select * from product_detail",con);
            con.Open();
            SqlDataAdapter da=new SqlDataAdapter(cmd);
            DataSet ds=new DataSet();
            da.Fill(ds);
            radGrid1.DataSource=ds;
            radGrid1.DataBind();
            con.Close();
             
        }
and for item data bind is

protected void radGrid1_ItemdatBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
                GridEditableItem editItem = e.Item as GridEditableItem;
                RadComboBox combo = (RadComboBox)editItem.FindControl("Product_Name");
                SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connectionstring"].ToString());
                SqlCommand cmd = new SqlCommand("select product_id.product_name from product_detail", con);
                con.Open();
               SqlDataAdapter da = new SqlDataAdapter(cmd);
               DataTable dt = new DataTable();
               da.Fill(dt);
               radGrid1.DataSource = dt;
               radGrid1.DataBind();
 
               combo.DataTextField = "product_name";
               combo.DataValueField = "product_id";
               combo.DataBind();
                
               
            }
        }
i am using many article but i am unable to bind radgrid with radcombo plz suggest me......


thanks
shivesh
shivesh
Top achievements
Rank 1
 answered on 22 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?