Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
151 views
I spent a few hours ripping my hair out over this one - but it appears that there is a bug in the NodeCheck event in RadTreeView. It may be specific to Firefox/Mozilla, and i've tried the no-cache fix, with no luck.

As an example, create a TreeView with checkboxes=true, and populate it with say 10 nodes in the Page_Load event. Add a NodeCheck server side event (the function can be empty).  Wrap the TreeView in an AjaxPanel, and run the project.

<telerik:RadAjaxPanel ID="rap2" runat="server">
<telerik:RadTreeView runat="server" ID="tv1" CheckBoxes="true"  onnodeexpand="tv1_NodeExpand" onnodecheck="tv1_NodeCheck"  >
</telerik:RadTreeView>
</telerik:RadAjaxPanel>

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        tv1.Nodes.Clear();
        for (int i = 0; i < 10; i++)
        {
            tv1.Nodes.Add(new RadTreeNode(i.ToString()));
        }
    }
}

Check off all the boxes, and hit refresh on the browser (CTRL-R or F5). When the page reloads, either none of the nodes will be checked, or only the first node will be checked. It appears that the ViewState is not being saved after a NodeCheck event.

The hack solution i have for the time being is to add in an OnClientNodeChecked handler with the following:
function ClientNodeCheck() {
    var tree = $find("<%= tv1.ClientID %>");
    tree.UpdateState()
}


Could you please confirm if this is in fact a bug, and if there will be a fix for this in an upcoming release?

Thanks,

N.
Princy
Top achievements
Rank 2
 answered on 28 Oct 2011
1 answer
111 views
Hi,

               I have three values in Combo box.
                 1.If i select Value "A" in combo, I want to show the grid column order of "Col1","Col2" and "Col3".
                 2.if i select Value "B" in combo, I want to show the grid column order of "Col2","Col3" and "Col1".
                 3.if i select Value "C" in combo, I want to show the grid column order of "Col3","Col2" and "Col1".

and again if i select "A" from any of the "B" or "C", it should be restored.

i have tried in server side.But when the value go to "A" from either of the value, the grid hasnt been restored,

radGridProjectDisplay.MasterTableView.SwapColumns(

 

"PROJECT_NAME", "MKT_PROD");

 

and it is working fine in one shot.if you go back and flip flop combo value ,
it is not working as expected.

Please give me solution as soonas possible.

Thanks,
Priya
Shinu
Top achievements
Rank 2
 answered on 28 Oct 2011
2 answers
243 views
I am using the latest version of RadControls (2011.2.712.40) and am running into a confusing issue. I have a grid defined with a GroupByExpression like so:
<GroupByExpressions>
    <telerik:GridGroupByExpression>
        <GroupByFields>
            <telerik:GridGroupByField FieldAlias="Status" FieldName="RealStatus" SortOrder="Descending" />
        </GroupByFields>
        <SelectFields>
            <telerik:GridGroupByField FieldAlias="Status" FieldName="RealStatus" />
        </SelectFields>
    </telerik:GridGroupByExpression>
</GroupByExpressions>

When the page loads the grid looks exactly how I want it to, however when I hit the "Add" link (auto-generated in the Command header along with a Refresh link) I get "Too many spaces in field definition: ' RealStatus Status DESC'."

Since the page initially loads fine and only postbacks cause it to die I have no clue what could cause this. If I don't have the SortOrder specified postbacks function as expected (albeit in the wrong order) which is even more confusing.

Any ideas?
digitall
Top achievements
Rank 1
 answered on 28 Oct 2011
3 answers
126 views
 why the splitter work well in IE ,But Can't Work In Firefox. The Splitter can't expand in firefox......

More Information ,please see the attachments....
trampt
Top achievements
Rank 1
 answered on 28 Oct 2011
1 answer
115 views
We are migrating to 2011 version from 2009 version and in 2009 version we are using TexBoxBlurHandler in Javascript to apply some rules in blur event , in 2011 it seems not available .. we are getting error. does anyone know is there any equivalent for TextBoxBlurHandler in 2011 Input control?
Shinu
Top achievements
Rank 2
 answered on 28 Oct 2011
1 answer
317 views

I have the search form and RadGrid on the same page. I'm databinding the RadGrid using the button click in the codebehind. The search works, but when I click an Edit button in a row, the RadGrid disappears. If I click my search forms button again, the RadGrid reappears with the correct row in Edit Mode.

I think I'm missing data binding the RadGrid to an additional event handler, but I'm not sure. I've tried several events and it didn't change.

Here's my super-simplified code.
ASPX

 

 

<telerik:radscriptmanager runat="server"></telerik:radscriptmanager>

 

Column Name:

<asp:DropDownList ID="DropDownList1" runat="server">

 

 

<asp:ListItem Value="PROD_DIET_SUPP_NAME">Product Name</asp:ListItem>

 

 

<asp:ListItem Value="PRODUCT_CODE">Product Code</asp:ListItem>

 

 

<asp:ListItem></asp:ListItem>

 

 

</asp:DropDownList>

 

 

Function:

<asp:DropDownList ID="DropDownList4" runat="server">

 

 

<asp:ListItem Value="Contains">Contains</asp:ListItem>

 

 

<asp:ListItem Value="StartsWith">Starts With</asp:ListItem>

 

 

<asp:ListItem></asp:ListItem>

 

 

</asp:DropDownList>

 

 

Search Term:

 

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />

 

 

 

<asp:Button ID="Button1"

 

 

runat="server" Text="Search" onclick="Button1_Click" />

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server"

 

 

AllowSorting="True"

 

 

AllowAutomaticDeletes="True"

 

 

AllowAutomaticInserts="True"

 

 

AllowAutomaticUpdates="True"

 

 

EditMode="EditForms"

 

 

GridLines="None"

 

 

AutoGenerateColumns="False"

 

 

>

 

 

<MasterTableView

 

 

DataKeyNames="PRODUCT_CODE"

 

 

CommandItemDisplay="TopAndBottom">

 

 

<norecordstemplate>

 

No products have been entered matching your search crieteria. Try removing one of more keywords from your search and try again.

</norecordstemplate>

 

 

<Columns>

 

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn"

 

 

ButtonType="imagebutton" />

 

 

 

<telerik:GridBoundColumn

 

 

DataField="PRODUCT_CODE"

 

 

DataType="System.Char"

 

 

HeaderText="Product Code"

 

 

ReadOnly="True"

 

 

SortExpression="PRODUCT_CODE"

 

 

UniqueName="PRODUCT_CODE" />

 

 

 

<telerik:GridBoundColumn EditFormColumnIndex="0"

 

 

DataField="PROD_DIET_SUPP_NAME" HeaderText="Name"

 

 

SortExpression="PROD_DIET_SUPP_NAME"

 

 

UniqueName="PROD_DIET_SUPP_NAME" />

 

 

 

 

</Columns>

 

<

 

EditFormSettings ColumnNumber="1" CaptionFormatString="Edit details for {0}" CaptionDataField="PROD_DIET_SUPP_NAME">

 

</

 

EditFormSettings>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

 



CODEBEHIND

 

public

 

partial class search4 : System.Web.UI.Page

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

}

 

protected void BindData()

 

{

 

 

DataClassesDataContext dc = new DataClassesDataContext();

 

 

string strWhere = "1=1";

 

 

string strKeyword = "";

 

 

string strColumn = "";

 

 

string strFunction = "";

 

strKeyword = TextBox1.Text;

strColumn = DropDownList1.SelectedValue;

strFunction = DropDownList4.SelectedValue;

 

string strOrderBy = "PROD_DIET_SUPP_NAME ASC";

 

 

if (!string.IsNullOrEmpty(TextBox1.Text))

 

{ strWhere = strColumn +

"." + strFunction + "(\"" + strKeyword + "\")"; }

 

 

var products = from m in (dc.PRODUCTs.Where(strWhere)

 

)

 

select new { m.PRODUCT_CODE, m.FORM_CODE, m.PROD_DOSAGE_CODE, m.PROD_DIET_SUPP_NAME, m.PROD_TYPE_CODE, m.SOURCE_PROD_CODE, m.PROD_PROD_INF_NOTES, m.PROD_IS_VERIFIED, m.PRODUCT_STATUS, m.LAST_VERIFIED_DATE, m.PROD_VERSION_CREATED, m.PROD_VERSION_NO, m.PROD_GENERIC_PROD, m.DATE_OF_RECIPT };

 

products = products.OrderBy(strOrderBy);

RadGrid1.DataSource = products;

RadGrid1.DataBind();

 

}

 

protected void Button1_Click(object sender, EventArgs e)

 

{

BindData();

}

 

}

Shinu
Top achievements
Rank 2
 answered on 28 Oct 2011
2 answers
93 views
Hello,

I'm creating a website in which I am trying to implement the functionality of a radgrid with button columns that open a radwindow on command. That functionality is working as expected, however, the radwindow is appearing under the radmenu on the master page. Please see the attached screenshot. This is working correctly when testing in IE.

Is there some setting I may be missing?

Thanks,
Casey
Casey
Top achievements
Rank 1
 answered on 28 Oct 2011
4 answers
505 views
Hi, everyone. I'm posting a novice question but it seems I am missing something obvious and I can't find it. Any hint, point to documentation or to a specific tutorial, if exist, would be greatly appreciated.

I'm using themes in my website. Telerik RadFormDecorator does not skin every control. For example, if I'm using Hay theme, I would want to have my tables having the same border color as the grid borders. I would want to have my disabled textboxes having the same backcolor as grid's FooterItem backcolor. I would want to have my <hr /> to be drawn using grid's border forecolor. And so on.

On the other hand, if I change the theme, I would like to have those colors changed automatically, in order to keep them in sync with the new selected theme.

Is this possible? How? I am not looking for ready-to-use code, but pointing me to the right direction would be great help.

Thank you.
Grigore Dolghin
Top achievements
Rank 1
 answered on 27 Oct 2011
9 answers
330 views
Hi,
I have been playing abround with the asp controls, more specifically the layout controls like RadSplitter and RadSlidingZones/Panels. What I am looking to do is to populate part of a page from a separate aspx (kind of like frame functionality) and maybe use Ajax to populate that part of the page. eg. I have a treeview that is static down the left hand side and have different pages I want to display on the right, hopefully loading them ajax-style.

Any ideas/suggestions on how best to achieve this using the Telerik bits?

milos
Top achievements
Rank 1
 answered on 27 Oct 2011
3 answers
198 views
Hi,
I am having problem getting the tooltips to work in the RadListBox. It works fine when I turn the EnableLoadOnDemand=false. But when I turn the EnableLoadOnDemand=true, only the first item in the list box works, the rest are not working. I have read a lot of different solutions but none works for me. Any idea how to do it? Thanks a lot!

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
    this.UpdateToolTip(args.Value, args.UpdatePanel);
}
  
private void UpdateToolTip(string elementID, UpdatePanel panel)
{
    Control ctrl = Page.LoadControl("PopupSampleDetails.ascx");
    panel.ContentTemplateContainer.Controls.Add(ctrl);
    Mayvien_PopupSampleDetails details = (Mayvien_PopupSampleDetails)ctrl;
  
    int position = elementID.IndexOf("#@#");
    string type = elementID.Substring(0, position);
    string id = elementID.Substring(position + 3, elementID.Length - (type.Length + 3));
    details.Type = type;
    details.SampleID = id;
}
  
  
  
protected void RadListBox1_ItemDataBound(object sender, Telerik.Web.UI.RadListBoxItemEventArgs e)
{
    for (int i = 1; i <= 5; i++)
    {
        string imageFieldName = "SampleImage" + i;
        Control SampleImage = e.Item.FindControl(imageFieldName);
        if (!Object.Equals(SampleImage, null))
        {
            if (!SampleImage.Visible)
                break;
  
            if (!Object.Equals(RadToolTipManager1, null))
            {
                // add to tooltip manager
                System.Web.UI.WebControls.Image image = (System.Web.UI.WebControls.Image)SampleImage;
                string sample_id = image.AlternateText;
                RadToolTipManager1.TargetControls.Add(image.ClientID, sample_id, true);
            }
        }
    }
}

        
<telerik:RadListBox ID="RadListBox1" runat="server" Height="700" Width="100%" EnableLoadOnDemand="true" SelectionMode="Multiple" LoadingPanelID="LoadingPanel1" OnItemDataBound="RadListBox1_ItemDataBound" OnItemCommand="RadListBox1_ItemCommand">
    <ItemTemplate>
        <asp:HiddenField ID="hiddenSampleSetId" runat="server" Value='<%# Eval("sample_set_id") %>' />
        <asp:HiddenField ID="hiddenLookbookId" runat="server" Value='<%# Eval("lookbook_id") %>' />
        <asp:Literal ID="headerLiteral" Text='<%# Eval("header")%>' runat="server" /><br />
        <asp:Panel ID="pnlImages" style="float: left; padding:5px; width:100%;" runat="server">
            <table>
                <tr>
                    <td valign="top">
                        <asp:Image ID="SampleImage1" runat="server" BorderWidth="1" BorderStyle="Solid" ImageUrl='<%# Eval("image1") %>' Visible='<%# Eval("image1_visible") %>' style="max-width:100px;" AlternateText='<%# Eval("image1_alt") %>' />
                    </td>
                    <td valign="top">
                        <asp:Image ID="SampleImage2" runat="server" BorderWidth="1" BorderStyle="Solid" ImageUrl='<%# Eval("image2") %>' Visible='<%# Eval("image2_visible") %>' style="max-width:100px;" AlternateText='<%# Eval("image2_alt") %>' />
                    </td>
                    <td valign="top">
                        <asp:Image ID="SampleImage3" runat="server" BorderWidth="1" BorderStyle="Solid" ImageUrl='<%# Eval("image3") %>' Visible='<%# Eval("image3_visible") %>' style="max-width:100px;" AlternateText='<%# Eval("image3_alt") %>' />
                    </td>
                    <td valign="top">
                        <asp:Image ID="SampleImage4" runat="server" BorderWidth="1" BorderStyle="Solid" ImageUrl='<%# Eval("image4") %>' Visible='<%# Eval("image4_visible") %>' style="max-width:100px;" AlternateText='<%# Eval("image4_alt") %>' />
                    </td>
                    <td valign="top">
                        <asp:Image ID="SampleImage5" runat="server" BorderWidth="1" BorderStyle="Solid" ImageUrl='<%# Eval("image5") %>' Visible='<%# Eval("image5_visible") %>' style="max-width:100px;" AlternateText='<%# Eval("image5_alt") %>' />
                    </td>
                </tr>
                <tr>
                    <td valign="bottom" align="right" colspan="5">
                        <%# Eval("extra_text") %>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </ItemTemplate>
    <Items>
    </Items>
</telerik:RadListBox>

William
Top achievements
Rank 1
 answered on 27 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?