Telerik Forums
UI for ASP.NET AJAX Forum
15 answers
138 views
Hello,

My RadGrid was working fine when loading a datasource before I set AllowFilterByColumn="true" on it. Now I get a pop-up with a page error "Expected ')'". I try to debug the page but it doesn't break on the error, so I'm assuming it's being raised in one of the Telerik js files. Any idea what's going on here?

Thanks.
Princy
Top achievements
Rank 2
 answered on 02 Jul 2014
4 answers
317 views
I am trying to replace a textbox in a grid edit form with an autocomplete. The autocomplete is correctly suggesting the possible entries but does not bind the selected value to the db on insert.
So far this is the markup I am using where you see the old text box and the autocomplete.

<%-- <telerik:RadTextBox ID="ProjManag" TabIndex="2" runat="server" Width="200px" onkeypress="return this.value.length<=25" Text='<%# Bind( "ProjManag" ) %>'>
</telerik:RadTextBox>--%>
   
<telerik:RadAutoCompleteBox ID="ProjManag" runat="server" AllowCustomEntry="True" Culture="it-IT" DataSourceID="SqlDataSource1"  DataTextField="ProjManag" DataValueField="ProjManag" Filter="StartsWith" InputType="Text" Skin="Outlook">
</telerik:RadAutoCompleteBox>

How can I bind the selected value to the db? 
Shinu
Top achievements
Rank 2
 answered on 02 Jul 2014
9 answers
1.1K+ views
I am using a GrdTemplateColumn in order to display a CheckBox (Instead of a CheckBoxColumn) because I need the user to be able to check and uncheck the checkbox without first having to click EDIT.

The checkbox needs to be able to do an Asynchronus postback to the database (bit value).

I can get the checkbox to display, but I don't know how to get it to fire in the CodeBehind in order to update the appropriate row in the database.

                <telerik:GridTemplateColumn Reorderable="true" DataField="isSold" HeaderText="Sold" UniqueName="Sold">  
                    <HeaderStyle ForeColor="Blue" Font-Underline="true" /> 
                    <ItemTemplate> 
                        <asp:CheckBox AutoPostBack="true" OnCheckedChanged="CheckBox1_Changed" ID="CheckBox1" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem, "isSold") %>' /> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
Shinu
Top achievements
Rank 2
 answered on 02 Jul 2014
12 answers
373 views
Any chance to have that barcode type in the Q2 release ?

SR
lucysome
Top achievements
Rank 1
 answered on 02 Jul 2014
4 answers
139 views
I have created a RadDropDownTree inside a Popup WebUserControl for editing a row in the grid.
In the grid's UpdateCommand event, I grab a handle to the RadDropDownTree like this:

RadDropDownTree ddtMount = userControl.FindControl("ddtMount") as RadDropDownTree;

Even if the user check-marks some of the items in the tree, they all come back as "checked = false".

Anyone have an idea what I could be doing wrong? I can post more code details if needed.

TIA,

Jeffrey Taylor
Jeffrey
Top achievements
Rank 1
 answered on 01 Jul 2014
4 answers
122 views
Hi,

Would you have the SQL for the two tables used in the Datasource provider demo please?
Or even a sample?

Cheers,
jon
Jon
Top achievements
Rank 1
 answered on 01 Jul 2014
5 answers
506 views
I have a RADGrid named 'RadGrid1' in my ASPX page.
RadGrid1 has Form Template Edit form and this edit form contains RADEditor named 'RadEditor1'.

If I want to get the content of the RADEditor 'RadEditor1' in the code behind file of this ASPX page, what is the correct way of referencing the contents in the RadEditor1?

I tried the code shown below:
RadEditor radEditor = ((RadEditor)e.Item.FindControl("RadEditor1"));
string content = radEditor.Content;

But I get the error 'System.EventArgs' does not contain a definition for 'Item' and no extension method 'Item' accepting...'

I have also tried the code shown below to get the content stored in the RadEditor1 but it still didn't work.
string content = RadGrid1.RadEditor1.Content;

Thank you.
Soismel
Top achievements
Rank 1
 answered on 01 Jul 2014
1 answer
94 views
Hi,

Is there a 100% stacked chart available?

Regards,

Sanj
Danail Vasilev
Telerik team
 answered on 01 Jul 2014
1 answer
87 views
Is it possible to save a HtmlChart as an image? The goal is to use it in excel or similar products.
Danail Vasilev
Telerik team
 answered on 01 Jul 2014
3 answers
124 views
Hi,
I am trying to use the Telerik RadListView Darg-Drop feature: 
http://demos.telerik.com/aspnet-ajax/listview/examples/datagrouping/defaultcs.aspx

I want to be able to drag an item from one data group to another datagroup. How can I do that?

ASPX code:

<telerik:RadListView runat="server" ID="Lsv_Vis" AllowPaging="True" PageSize="50"
    ItemPlaceholderID="Phi_Vis_I" GroupPlaceholderID="Phi_Vis_G"
    DataKeyNames="url_id, lst_id, url_name, url_address" ClientDataKeyNames="url_id, lst_id, url_name, url_address"
    OnItemDrop="CsVisItemDrop" OnItemDataBound="CsVisIDB" DataSourceID="Sql_Vis">
</telerik:RadListView>

<DataGroups>
    <telerik:ListViewDataGroup GroupField="lst_id" DataGroupPlaceholderID="Phi_Vis_G">
        <DataGroupTemplate>
            <div class="Div_Vis_Grp"><span class="Spn_Vis"><%# (Container as RadListViewDataGroupItem).AggregatesValues["lst_name"].ToString() %></span></div>
            <asp:Panel ID="Pnl_Vis" runat="server" CssClass="Pnl_Vis" ToolTip='<%# (Container as RadListViewDataGroupItem).DataGroupKey %>' onmouseover='this.className += " Vis_Sel";' onmouseout='this.className = this.className.split(" Vis_Sel").join("");'>
                <asp:PlaceHolder ID="Phi_Vis_I" runat="server" />
            </asp:Panel>
        </DataGroupTemplate>
        <GroupAggregates>
            <telerik:ListViewDataGroupAggregate Aggregate="Max" DataField="lst_name" />
        </GroupAggregates>
    </telerik:ListViewDataGroup>
</DataGroups>
<ItemTemplate>
    <div class="Div_Vis_Item rlvI">
    <asp:Panel ID="Pnl_Vis" runat="server" ToolTip='<%# Eval("lst_id") %>' CssClass="Div_Vis_Item" onmouseover='this.className += " Vis_Sel";' onmouseout='this.className = this.className.split(" Vis_Sel").join("");'>
        <a class="Hyp_Vis" runat="server" href='<%# Eval("url_address") %>' target="_blank">
            <div class="Div_Vis_Body">
                <div class="Div_Vis_Con">
                    <asp:Panel ID="Div_Vis_Con" runat="server" class="Div_Vis_Con" ToolTip='<%# Eval("lst_id") %>' ></asp:Panel>
                </div>
            </div>
            <div class="Div_Vis_Link">
                <asp:Label ID="Lbl_VisI" runat="server" Text='<%# Eval("url_name_short") %>' ToolTip='<%# Eval("url_name") %>'/>
            </div>
        </a>
    </asp:Panel>
    </div>
</ItemTemplate>

C# Code:

protected void CsVisItemDrop(object sender, RadListViewItemDragDropEventArgs e)
{
    if (e.DestinationHtmlElement.IndexOf("Div_Vis_Con") < 0)
    {
        return;
    }
 
    foreach (RadListViewDataItem di in Lsv_Vis.Items)
    {
        Panel pnl = di.FindControl("Div_Vis_Con") as Panel;
 
        if (pnl != null && pnl.ClientID == e.DestinationHtmlElement)
        {
            string uid = e.DraggedItem.GetDataKeyValue("url_id").ToString();
            string lid = pnl.ToolTip.ToString();
 
            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Con_Str"].ToString()))
            {
                using (SqlCommand cmd = new SqlCommand("UPDATE [MyTable] SET lst_id = @lst_id WHERE url_id = @url_id", conn))
                {
                    cmd.Parameters.Add("@lst_id", SqlDbType.VarChar).Value = lid;
                    cmd.Parameters.Add("@url_id", SqlDbType.VarChar).Value = uid;
                    try
                    {
                        conn.Open();
                        cmd.ExecuteNonQuery();
                        conn.Close();
                    }
                    catch { }
                }
            }
        }
    }
    Lsv_Vis.Rebind();
}

<telerik:RadListView runat="server" ID="Lsv_Vis" AllowPaging="True" PageSize="50"
    ItemPlaceholderID="Phi_Vis_I" GroupPlaceholderID="Phi_Vis_G"
    DataKeyNames="url_id, lst_id, url_name, url_address" ClientDataKeyNames="url_id, lst_id, url_name, url_address"
    OnItemDrop="CsVisItemDrop" OnItemDataBound="CsVisIDB" DataSourceID="Sql_Vis">
</telerik:RadListView>

<telerik:RadListView runat="server" ID="Lsv_Vis" AllowPaging="True" PageSize="50"
    ItemPlaceholderID="Phi_Vis_I" GroupPlaceholderID="Phi_Vis_G"
    DataKeyNames="url_id, lst_id, url_name, url_address" ClientDataKeyNames="url_id, lst_id, url_name, url_address"
    OnItemDrop="CsVisItemDrop" OnItemDataBound="CsVisIDB" DataSourceID="Sql_Vis">
</telerik:RadListView>

Maria Ilieva
Telerik team
 answered on 01 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?