Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
45 views
 In IE the column header text displays a "..." when the content is long. Is there a fix for grid headers which are spilling into ajoining columns?
Dimo
Telerik team
 answered on 09 Oct 2009
5 answers
178 views
Hi,

Environment: ASP.NET AJAX Q2 2009 SP1 with VStudio SP1.

 

I am creating a site with Master->Detail Content pages (about 4). Currently in each Content Page code behind file  Page_Prerender Event, it calls another Procedure ShowHideMasterMenu. Both are in the same code behind file. I am repeating the same below codes for all content pages because all does the exactly same thing.

 

My question is there any way I can put the codes of public void ShowHideMasterMenu() into a class library or into a Public Procedure  and call it from all content pages Page_Prerender event? Below code (public void ShowHideMasterMenu() ) works but they are redundant and repeating codes for each content page.

 

Any help or pointing to right direction will be appreciated.

 

Sincerely

 

GC_0620
__________________________________________________________________________________________________________

protected void Page_Prerender(object sender, EventArgs e)

    {

        ShowHideMasterMenu();

    }

 

    public void ShowHideMasterMenu()

    {

        if (Session["SessionEmployeeId"] == null)

        {

            Response.Redirect("SessionExpired.aspx");

 

        }

        Panel masterUserDetailsPanel = (Panel)Master.FindControl("UserDetailsPanel");

        masterUserDetailsPanel.Visible = true;

        Label masterLoginLabel = (Label)Master.FindControl("LoginLabel");

        masterLoginLabel.Text = Session["SessionUserFirstName"].ToString().Trim() + " " + Session["SessionUserLastName"].ToString().Trim();

        RadMenu mastermenu = (RadMenu)Master.FindControl("RadMenu1");

        mastermenu.FindItemByText("Login").Visible = false;

        mastermenu.FindItemByText("Logout").Visible = true;

        Label mpLabel = (Label)Master.FindControl("Lblislogged");

 

 

        if (mpLabel != null)

        {

            mpLabel.Text = "1";

 

        }

 

        if ((Session["SessionUserEmplCategory"].ToString().Trim() == "User" | Session["SessionUserEmplCategory"].ToString().Trim() == "Manager") & Session["SessionUserIsAdmin"].ToString().Trim() == "False") //Regular (Manager or User)

        {

 

            mastermenu.Items.Remove(mastermenu.Items[0]);

            mastermenu.Items.Remove(mastermenu.Items[1]);

 

        }

        else if (Session["SessionUserEmplCategory"].ToString().Trim() == "PR Manager" && Session["SessionUserIsAdmin"].ToString().Trim() == "False") //PR Manager

        {

            mastermenu.Items.Remove(mastermenu.Items[2]);

 

        }

        else if (Session["SessionUserEmplCategory"].ToString().Trim() == "PR Associate" && Session["SessionUserIsAdmin"].ToString().Trim() == "False"//PR Associate

        {

            mastermenu.Items.Remove(mastermenu.Items[2]);

            mastermenu.Items[0].Items.RemoveAt(1);

         }

         else if (Session["SessionUserEmplCategory"].ToString().Trim() == "Manager" & Session["SessionUserIsAdmin"].ToString().Trim() == "True") //Admin

        {

            mastermenu.Items.Remove(mastermenu.Items[0]);

         }

         else

        {

 

        }

 

    }

Thomas Salt
Top achievements
Rank 1
 answered on 09 Oct 2009
3 answers
610 views
Hello,

I have a grid and with a from template for editing.  I need to be able to find the controls in the form template  in either the itemCommand event or editCommand event.  I can find them if I use if(e.CommandName == RadGrid1.UpdateCommandName) but if I try to find a contol inside the itemCommand event without any if statment like that I get a null reference exception.  I assume this is because the controls have not rendered at the time I try to find them.  What do I have to do to be able to find the controls when the edit form template is loaded?

Thanks,
Kirk
Kirk Thomas
Top achievements
Rank 1
 answered on 09 Oct 2009
1 answer
131 views
Hello, after reading through the forum post I have seen numerous examples of people attempting to work with the Recurrence feature of the scheduler.  Specifically the RecurrenceRule and how to manually create it and insert it.


My question is if there is any documentation or resource anywhere that describes what is going on behind the scenes with the format of the RecurreneRule string and specifically the format and specifications of the string, additionally would like to know what is happening in the data store, in my case a sql server table.

I have successfully implemented a RadWindow in place of the AdvancedInsert/Edit forms as I am much more comfortable with the control it gives me of the design and layout. The out of the box functionality of the scheduler, while nice, hides much of the complexity of what is happening with the CSS Classes, recurrence and resources rules etc.  I prefer more transparency in my applications to know exactly what is going on and would prefer to manage recurrence, resources, styles etc myself.

From what I have read and been able to accomplish so far it appears managing the recurrence and resources manually is possible.

Thanks,

Eric
Peter
Telerik team
 answered on 09 Oct 2009
2 answers
122 views

When writing a new post in the forums hereabouts, the "Attach your files" link is mis-placed in Opera v10 as is the list of attached files. See the attached screen shots.

-- 

Stuart

Stuart Hemming
Top achievements
Rank 2
 answered on 09 Oct 2009
1 answer
121 views
In RadGrid, if EnableHeaderContextMenu is set to true and a GridColumn's Display attribute set to false, and HeaderStyle's Width attribute is set, the generated HTML colgroup style will not contain "display:none" style.  For example,

<telerik:RadGrid>
<MasterTableView EnableHeaderContextMenu="true" TableLayout="Fixed">
<Columns>
<telerik:GridBoundColumn Display="false">
<HeaderStyle Width="100"/>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

If you examine the generated html, you will see 
<colgroup>
<col style="width:100px"/>
</colgroup>

Adding a column with HeaderStyle's Width attribute set will result in the same incorrect html. 

However, if you hide one column through the header context menu, the generated html is correct:
<colgroup>
<col style="width:100px; display:none;"/>
</colgroup>

Is there workaround for this bug before it is fixed?

Thanks
Sebastian
Telerik team
 answered on 09 Oct 2009
1 answer
86 views
Hi all,
We current have a large web project in visual studio 2008 using the ASP.NET Q1 2009 rad tools (ie the non-ajax version). We want to move to the AJAX version (we have ASP.NET AJAX Q2 2009 installed), but not all at once.

As our first page, we have a multi tabbed page (using rad multipageview and 14 pageviews, each with a radgrid and radchart on it)  that we wanted to convert to using the new AJAX tab control on this page while leaving all the other controls using the old version. (The plan was to use the AJAX tabstrip to load each pageview on demand.)

Sadly, after dragging and dropping the new tab onto the page and setting its properties, the page and project would not compile. It complains about telerik charting existing in 2 dlls. A quick look at the forums found this:

http://www.telerik.com/community/forums/aspnet-ajax/chart/important-build-errors-when-upgrading-from-radchart-to-prometheus.aspx

So I'd like to choose option 1. However, no where in my web.config does it mention telerik.charting.dll, thus making it hard for me to follow the directions in option one to "remove the reference to the Telerik.Charting.dll from your Web.config file."

Considering the large amount of other telerik controls on the page, I obviously dont want to have to convert them all over at once. I just want to convert the tab.

So any ideas how I can remove the reference to the telerik.charting in the ajax version so I can continue to use the old stuff?

Vladimir Milev
Telerik team
 answered on 09 Oct 2009
5 answers
146 views
Hello,

I'm a new customer who just purchased the controls today and am very excited.  I'm working on a little project and I need some help.

I have two radgrids on my page which are both populated by a different table in an SQLDataSource.  I want to be able to doubleclick on a row in table one to be able to insert the row just doubleclicked into the second grid's table (using a database insert).  I've already got drag and drop working (which functions the same way but allows them to drag the row from table 1 to table 2).  Is this possible and if so, can someone give me an example?

OR

Would it be easier if I had a clientselect column with checkboxes and a button in the commanditems (with a custom template) that is labeled "Add Selected Topics" and when pressed it would take any topics that are selected in grid 1 and insert them as new records into grid 2?  If I used this method I might completely remove drag and drop.  I had this version working as far as the grid and selecting items, but I couldn't figure out how to insert the selected items into the other grid's database table.  Bear with me though, I'll get better at this! :)
Heath Brown
Top achievements
Rank 1
 answered on 09 Oct 2009
4 answers
110 views
I have tried to add the menu items programmically as show below.  For some reason the separator is not being added.  It works fine if I dont do it programmically. any idea??


RadMenuItem radmenuitem;
RadMenuItem radsepmenuitem;
SiteMapNode RootNode = SiteMap.RootNode;


        for (int i = 0; i < RootNode.ChildNodes.Count; i++)
        {
            // Add Menu Item
            radmenuitem = new RadMenuItem(RootNode.ChildNodes[i].Title, RootNode.ChildNodes[i].Url);
            RadMenu1.Items.Add(radmenuitem);
            // Seperator
            radsepmenuitem = new RadMenuItem("Separator");
            radsepmenuitem.IsSeparator = true;
            radsepmenuitem.CssClass = "p";
            RadMenu1.Items.Add(radsepmenuitem);
            
            // Add Child Menus
            if (RootNode.ChildNodes[i].HasChildNodes)
                PopulateChildNode(RootNode.ChildNodes[i].ChildNodes, radmenuitem);
      }

Vesko
Top achievements
Rank 2
 answered on 09 Oct 2009
1 answer
129 views
I am trying to figure out the best way to perform a mass update when there are child tables involved. My situation is documenting work performed on weekly inspections.
 I have three tables involved, the main table is WorkOrders, the first child table is WorkOrderDetails and it's child table is DetailsLabor. For every WorkOrders record there must be at least one WorkOrdersDetails record and for every WorkOrdersDetails record there must be at least one DetailsLabor record.  

90% of the time there is only one record in each table and I am trying to create an interface that minimizes the time taken to document the inspections. I have a regular asp formview that I use for documenting the inspections and it works pretty well by allowing the user to add records in both the WorkOrdersDetails table and the DetailsLabor table by first entering a WorkOrdersDetail record and grabbing the ID created with @@Scope_Identity then updating the DetailsLabor table. The problem is they always have to navigate to the update form through a gridview which summarizes all the inspections.
Pavlina
Telerik team
 answered on 09 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?