Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
458 views
I have a 3 level nested RadGrid.
All levels have checkboxes.
If the checkbox at any level is checked, the checkboxes of its children (and grandchildren) should also be checked.
How can I accomplish this? 
Yavor
Telerik team
 answered on 02 Jun 2010
1 answer
116 views
Hi, Expert,

I create a RadMenuItem and set the item to invisible.
On my client side code,

I would like to set the radmenuitem to visible.

{
  var menuItem2 = menu1.FindItemByText('Paste');
.......



}

The FindItemByText can not get that item. (Only show visible item)

I also try to use menu1.Items, the invisible is not there either.

Can anyone have  idea how to get invisble item from menu on client side code?

Thanks.


Princy
Top achievements
Rank 2
 answered on 02 Jun 2010
1 answer
120 views
Hi,

How can I put username in a radmenu after a user login? How can it be inserted there near the other menu items?

Regards
_Hamda
Shinu
Top achievements
Rank 2
 answered on 02 Jun 2010
1 answer
159 views
I have a very simple RadListView populated from a DataSet:

Data:

HeadingOne  HeadingTwo  DataValue  
First       Second      Data Value  
First       Second      Data Value  
First       Third       Data Value  
First       Third       Data Value  
First       Third       Data Value 

ListView:

<telerik:RadListView   
    ID="MyListView"   
    runat="server"   
    OnNeedDataSource="MyListView_OnNeedDataSource">  
 
    <ItemTemplate> 
              
        <%# InsertHeadingOne() %> 
 
        <%# InsertHeadingTwo() %> 
 
        <p><%# Eval("DataValue") %></p>  
 
    </ItemTemplate> 
 
</telerik:RadListView>  

I thought I was being very cunning in my grouping efforts. The two method calls above are:

string lastHeadingOne = string.Empty;  
string lastHeadingTwo = string.Empty;  
 
protected string InsertHeadingOne()  
{  
    string currentHeadingOne = Eval("HeadingOne").ToString();  
 
    if (currentHeadingOne.Length == 0)  
    {  
        currentHeadingOne = string.Empty;  
    }  
 
    if (this.lastHeadingOne != currentHeadingOne)  
    {  
        this.lastHeadingOne = currentHeadingOne;  
 
        return string.Format("<h1>{0}</h1>", currentHeadingOne);  
    }  
    else 
    {  
        return string.Empty;  
    }  
}  
 
protected string InsertHeadingTwo()  
{  
    string currentHeadingTwo = Eval("HeadingTwo").ToString();  
 
    if (currentHeadingTwo.Length == 0)  
    {  
        currentHeadingTwo = string.Empty;  
    }  
 
    if (this.lastHeadingTwo != currentHeadingTwo)  
    {  
        this.lastHeadingTwo = currentHeadingTwo;  
 
        return string.Format("<h2>{0}</h2>", currentHeadingTwo);  
    }  
    else 
    {  
        return string.Empty;  
    }  

But when I run the page, I get this output:

Second  
Data Value  
Data Value  
 
Third  
Data Value  
Data Value  
Data Value 

What I should be getting is this?:

First  
 
Second 
Data Value  
Data Value  
 
Third 
Data Value  
Data Value  
Data Value 

When I step through in debug I see the correct strings being returned but for the 5 rows in the DataSet, there are 10 calls to each method! It seems the second pass wipes the values from the first - but then, if that is the case, how did the Heading Twos get returned? I'm confused :)

Very strange. It works really well for the level 2 headings but not at all from the level one. Can anyone help?

Many thanks in advance,
Richard


Rosen
Telerik team
 answered on 02 Jun 2010
1 answer
98 views
I like the look of the dropdown menu on "All Products" at the top of this page:  http://demos.telerik.com/aspnet-ajax/menu/examples/overview/defaultcs.aspx

Was that done with RadMenu?  Any code examples out there for something like that?

Thanks,

MGA
Shinu
Top achievements
Rank 2
 answered on 02 Jun 2010
1 answer
245 views
Hi Guys,
               I am new be in Telerik . Here is the small issue of I am getting Student mark  from Data base so i have to find out student percentage.
Here is my code. I have to findout percentage.... please need help to figure it out. I wanted to do in code behind

<telerik:RadGrid ID="RadGrid1" runat="server">
            <MasterTableView TableLayout="Fixed">
                <Columns>
                    <telerik:GridBoundColumn DataField="Student_ID" SortExpression="StudentID" DataType="System.Int32" UniqueName="StudentID" HeaderText="StudentID" />
                    <telerik:GridBoundColumn DataField="Student_Name" SortExpression="Student_Name" DataType="System.String" UniqueName="Student_Name" HeaderText="StudentName" />
                    <telerik:GridBoundColumn DataField="Student_LastName" SortExpression="Student_LastName" DataType="System.String" UniqueName="Student_LastName" HeaderText="StudentLastName" />
                    <telerik:GridBoundColumn DataField="Student_Mark" SortExpression="Student_Mark" DataType="System.String" UniqueName="Student_Mark" HeaderText="StudentMark"/>
<telerik:GridBoundColumn  SortExpression="Student_Percentage" DataType="System.String" UniqueName="Student_Percentage" HeaderText="StudentLastName" />
<Columns>

<telerik:GridBoundColumn DataField="Student_LastName" SortExpression="Student_LastName" DataType="System.String" UniqueName="Student_LastName" HeaderText="StudentLastName" />

                        <FooterTemplate>
                            Template footer
                        </FooterTemplate>
                        <HeaderTemplate>
                            <table id="Table1" cellspacing="0" cellpadding="0" width="20" border="1" runat="server">
                                <tr>
                                    <td colspan="2" align="center">
                                        <b>School details</b>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 50%" align="center">
                                        <asp:LinkButton Width="140" ID="btnContName" Text="Contact name" ToolTip="Sort by ContactName"
                                            CommandName='Sort' CommandArgument='ContactName' runat="server" />
                                    </td>
                                    <td style="width: 50%" align="center">
                                        <asp:LinkButton Width="140" ID="btnContTitle" Text="Contact title" ToolTip="Sort by ContactTitle"
                                            CommandName='Sort' CommandArgument='ContactTitle' runat="server" />
                                    </td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>

Thanks,Raju!!!!!!!!!!
Shinu
Top achievements
Rank 2
 answered on 02 Jun 2010
2 answers
122 views
I used the following code to call JS to refresh my grid,But it does not work sometimes.it remend me that :can not find object "AddRebind".
I do not know why.
string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(AddRebind);</script>"
ScriptManager.RegisterStartupScript(thisthis.GetType(), "AddRebind", script, false); 
But the function AddRebind is written in my aspx page.
Liz Danniel
Top achievements
Rank 1
 answered on 02 Jun 2010
2 answers
218 views
Hello,

i'am getting an error while using IE (ff runs ok)
  htmlfile: Could not complete the operation due to error 800a025e. (select something from 1st combobox then select something from 2nd, and then click back on 1st combobox(on text area) ) p.s. exception is not shown when i click on 1st combocox arrow to expand list.

Also when i select something from 1st combo, then from 2nd (2nd combobox datasource is based on 1st combobox selection)
and after that try to insert some date into RadMaskedTextBox nothing happens (no text is inserted, no exceptions is thrown).
Here is aspx code (from form to /form for easy copypaste =] )
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <div> 
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
            <div> 
                <table> 
                    <tr> 
                        <td> 
                            <asp:Label ID="lblCustomer" runat="server" Text="Customer : "></asp:Label> 
                        </td> 
                        <td> 
                            <telerik:RadComboBox ID="cbxCustomerEng" DropDownWidth="250" runat="server" AllowCustomText="True" 
                                Filter="StartsWith" AutoPostBack="true" OnSelectedIndexChanged="cbxCustomerEng_SelectedIndexChanged"
                            </telerik:RadComboBox> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                            <asp:Label ID="lblName" runat="server" Text="Name : "></asp:Label> 
                        </td> 
                        <td> 
                            <telerik:RadComboBox ID="cbxProjectName" Filter="StartsWith" runat="server" AllowCustomText="True" 
                                AutoPostBack="true" OnSelectedIndexChanged="cbxProjectName_SelectedIndexChanged" 
                                DropDownWidth="250"
                            </telerik:RadComboBox> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td style="height: auto;"
                            <asp:Label ID="lblStartTime" runat="server" Text="Start : "></asp:Label> 
                            <telerik:RadMaskedTextBox ID="tbxMyProjectStartTime" runat="server" Mask="##.####" 
                                Width="50px"
                            </telerik:RadMaskedTextBox> 
                            <asp:Label ID="lblEndTime" runat="server" Text="End : "></asp:Label> 
                            <telerik:RadMaskedTextBox ID="tbxMyProjectEndTime" runat="server" Mask="##.####" 
                                Width="50px"
                            </telerik:RadMaskedTextBox> 
                        </td> 
                    </tr> 
                </table> 
            </div> 
        </telerik:RadAjaxPanel> 
    </div> 
    </form> 

and it's cs file :
        public class customer 
        { 
            string customerName; 
 
            public string CustomerName 
            { 
                get { return customerName; } 
                set { customerName = value; } 
            } 
        } 
        public class project 
        { 
            string projectName; 
            public string ProjectName 
            { 
                get { return projectName; } 
                set { projectName = value; } 
            } 
 
            string customerName; 
            public string CustomerName 
            { 
                get { return customerName; } 
                set { customerName = value; } 
            } 
        } 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
                List<customer> customers = new List<customer>(); 
                customer c1 = new customer(); 
                c1.CustomerName = "Cust1"
                customers.Add(c1); 
                customer c2 = new customer(); 
                c2.CustomerName = "Cust2"
                customers.Add(c2); 
                customer c3 = new customer(); 
                c3.CustomerName = "Cust3"
                customers.Add(c3); 
                customer c4 = new customer(); 
                c4.CustomerName = "Cust4"
                customers.Add(c4); 
 
                cbxCustomerEng.DataSource = customers
                cbxCustomerEng.DataTextField = "CustomerName"
                cbxCustomerEng.DataBind(); 
 
                List<project> projects = new List<project>(); 
                project p1 = new project(); 
                p1.CustomerName = "Cust1"
                p1.ProjectName = "Proj1"
                projects.Add(p1); 
                project p2 = new project(); 
                p2.CustomerName = "Cust1"
                p2.ProjectName = "Proj2"
                projects.Add(p2); 
                project p3 = new project(); 
                p3.CustomerName = "Cust2"
                p3.ProjectName = "Proj3"
                projects.Add(p3); 
                project p4 = new project(); 
                p4.CustomerName = "Cust2"
                p4.ProjectName = "Proj4"
                projects.Add(p4); 
                Session["projects"] = projects; 
            } 
        } 
 
        protected void cbxCustomerEng_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            setProjectComboboxDS(cbxProjectName, e.Text); 
        } 
 
        private void setProjectComboboxDS(RadComboBox cbxProjectName, string customerName) 
        { 
            IList<project> projects = (IList<project>)Session["projects"]; 
            var ds = from temp in projects where temp.CustomerName == customerName select temp; 
 
            cbxProjectName.DataSource = ds
            cbxProjectName.DataTextField = "ProjectName"
            cbxProjectName.DataBind(); 
        } 
 
        protected void cbxProjectName_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
 
        } 

would be glad to hear how to fix this behaviour.

Thank You !
Kit West
Top achievements
Rank 1
 answered on 02 Jun 2010
2 answers
125 views
I don't know what you call the part of a SlidingPane that contains the close and dock buttons, but I'd like to hide it.
Server-side would be preferable.

TIA,

  Ed
Ed McCarroll
Top achievements
Rank 1
 answered on 01 Jun 2010
4 answers
143 views
Is there a valid reason that GridDragDropEventArgs.DraggedItems is an IList instead of a GridItemCollection?
May I suggest, the items collections in handlers and helper properties alike should conform.

The fact that they don't conform present a challenge for generics and doesn't make any sense to me.
Doug Beard
Top achievements
Rank 1
 answered on 01 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?