Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
99 views
Hi,

I have radgrid. which have 170 record. but i have using paging and 15 record per page. when i give code into itemCommand

Radgrid1.items.Count =15 . how to get total count for this grid.

Thanks,
Dhamu.
Princy
Top achievements
Rank 2
 answered on 20 Dec 2010
1 answer
61 views
In my table I have columns named Ques, Answer, ID, etc. If I want to display these question answers on my page using RadTreeView, how do I implement this ? Like I want the parent node in the TreeView to be the question and child node should be the answer. Any sample code for that in here ?
Nikolay Tsenkov
Telerik team
 answered on 20 Dec 2010
3 answers
184 views
Hello,

i am using a RadPanelbar in WebApplication to select a control to load, here is my code:

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.FindControl("RadPanelBar1") != null)
        {
          if ((RadPanelBar1.SelectedItem != null))
            {
                choiceActivity(RadPanelBar1.SelectedItem.Value);
            }
            else if (Page.FindControl("RadChart1") == null)
            {
                choiceActivity("cockpit");
            }
        }
    }
 
    public void MessageboxAnzeigen(string Inhalt)
    {
        string Script = "<script type=\"text/javascript\">alert('" + Inhalt + "')</script>";
        RegisterClientScriptBlock("WindowOpener", Script);
    }
 
    public void openActivity(String controlName)
    {
        RadAjaxPanel1.Controls.Clear();
        UserControl userControl = (UserControl)this.LoadControl(controlName);
        userControl.ID = "myUC";
        this.RadAjaxPanel1.Controls.Add(userControl);
    }
    protected void RadPanelBar1_ItemClick(object sender, RadPanelBarEventArgs e)
    {
        choiceActivity(e.Item.Value);   
    }
 
    protected void choiceActivity(String itemValue)
    {
        if (Page.FindControl("myUC") == null)
        {
            switch (itemValue)
            {
                case "stammdaten":
                    openActivity("Stammdaten.ascx");
                    break;
 
                case "kundenverwaltung":
                    openActivity("StammdatenCockpit.ascx");
                    break;
                     
                case "abrechnung":
                    openActivity("abrechnung.ascx");
                    break;
 
                case "tarife":
                    openActivity("tarife.ascx");
                    break;
 
                case "cockpit":
                    openActivity("cockpit.ascx");
                    break;
            }
        }
    }
    protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
    {
 
    }
}

In VS it works fine, but deployed on the Server (IIS 7 on Win 2008 R2) it only shows the "cockpit" control and i can't unterstand what could be the different between VS und and the Server. The RadPanelbar seems to loose his state by every click (if i open a item its closed after the automatic reload of the page).

Thank you for any help.

UPDATE: I added a RadMenu and have exactly the same problem.

UPDATE 2: I enabled "PersistStateInCookie" and now the Panelbar keeps expandend after the reload but it still doesn't add the control to the RadAjaxPanel.

Best regards
Patrick
Patrick Gruhn
Top achievements
Rank 1
 answered on 20 Dec 2010
0 answers
72 views
Hi,
I am binding treeview with EF. Datavalue field is NAME and DataTextField value is CATID?When i select note and want to get the value of the selected treeview node in combobox it does not shows me the value.but i use combo.text it gives me the NAME of the treeview..How can i get selected treeview value in combobox?I trided combo.selectedvalue but its not working.
Teoman
Top achievements
Rank 1
 asked on 20 Dec 2010
6 answers
121 views
Dear Sirs!
For RadGrid I want to change some item's attrfibutes. For example, border color width and style if some condition is true.
In ItemDataBound item I write:

 

if (e.Item is GridDataItem)

 

{

 

GridDataItem it = e.Item as GridDataItem;

 

 

try

 

{

 

if (it["track_type"].Text.Trim() == "0")

 

{

it.BorderColor = System.Drawing.

Color.Red;

 

}

}

 

catch { }

 

}

this not works but the it.BackColor = System.Drawing.Color.Red work OK.
What I did wrong?
May be I need to override Grid's Style of my skin?

Thank you very much in advance.

Boris


 

Veli
Telerik team
 answered on 20 Dec 2010
1 answer
71 views
Hello -

I am encountering an issue with a grid inside an EditForm for a parent grid that I cannot seem to correct.

When I choose to edit a row in the parent grid the form comes up and I am able to modify the fields placed directly on the form. On that same form is another grid that also has an edit form that needs to be completed. When I click to add/edit the child grid it simply flashes and the editform does not appear.

I tracked this down to code that I have in the PreRender event for the parent grid to change the editcolumn text from "Edit" to "View" depending on the users selection and then rebind the grid. This event fires when I click the add/edit in the child grid and prevents the form from appearing. If I remove the rebind from the prerender event for the parent the text for the editcolumn no longer changes and the child grid no longer shows any data but the editform does appear when add/edit is selected. Additionally, when I do click the add/edit button and the form comes up, all of the rows that should have been shown the first time also appear.

Is there a way to get around the rebind in prerender so that I can swap the text for the editcolumn?

How can I refresh the child grid to show the records when it is rendered and keep them showing?

Any assistance is greatly appreciated!

Thanks,
Shawn

Iana Tsolova
Telerik team
 answered on 20 Dec 2010
12 answers
144 views
Hi All,

I might be missing something but I've got the RadFormDecorator set up in my project and this is styling all default form items in the desired style (a custom skin). However, any input fields which are using the RadInput aren't picking up the FormDecorator stylesheet and I can't seem to find anything in the documentation to suggest how to do this. Is there something really simple that I'm missing? I've tried setting the Skin path on the RadInput field to an empty string but still no joy.

Thanks in advance for any help,
Tim
Erik
Top achievements
Rank 2
 answered on 20 Dec 2010
2 answers
97 views
Dear Sir,

I am facing the following problem:
I want to add a custom attribute to a RadRotatorItem during databinding, but the method generated by the visual studio (when i double click on the proper event) is:

protected void ItemRotator_DataBound(object sender, EventArgs e) {...}
And I do not know how to get a reference to the specific item. 

I tried this
RadRotatorEventArgs Event = (RadRotatorEventArgs)e;
but I get an error at runtime


Is there a solution to my problem 
Thank you for your time...
Thomas Sarmis.
Thomas
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
113 views
How do i get the values from a grid when i have multiple rows selected?

I am using datakeynames in my grid and if i was to retrieve one row i'd use the following:

radgrid1.selectedvalue

I have tried using radgrid1.selectedvalues but don't appear to be getting anywhere - I can only see one value being returned no matter what i use - hashtable, arrary etc.

Please help

Thanks

Princy
Top achievements
Rank 2
 answered on 20 Dec 2010
5 answers
224 views
I've got a hierarchical grid bound to a dataset with AutoGenerateHierarchy set to true.I'm setting the column widths in the OnColumnCreated event handler by setting HeaderStyle.Width. ( note that tablelayout is set to fixed). so that the columns in each level of the hierarchy align.

This works fine except when there are fewer columns than needed to fill the width. In this case IE8, all the columns on each level of the hierarchy stretch to the page width and align (which isn't really the expected behaviour as I'm setting a fixed width, but looks ok as they align), whereas in the case of IE7 the columns in the master table stretch to the page width but the columns in the detail tables are rendering as the fixed width I have assigned programatically so master and detail columns are not aligning.

I need either all the columns to stretch and align in IE7 or (preferably) all the columns to render as the asigned fixed width on both master and detail tables in both IE7 and IE8. Any Suggestions?

Thanks in advance :)
Pavlina
Telerik team
 answered on 20 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?