Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
269 views
Hi,

I have a RadGrid that is created dynamically in the code-behind file from the Page_Init event stage, so everything is constructed here.

The grid contains several columns of data, and three hyperlink columns on the far right side of the grid. Each has a javascript function assigned to the NavigateUrl property in the ItemDataBound event handler in the code behind page.

I need to capture the onkeypress javascript event when the user tabs past the last column in the row being edited to trigger an ajax postback so the row being added can be processed and added to the grid's underlying datasource, and a new row automatically added to the end of the grid.

I have no problems getting this behavior out of a GridBoundColumn or a GridDropdownColumn by assigning the onkeypress javascript event to the edit controls in those columns, but cannot get it to work with the hyperlink controls.

I had zero luck in getting the GridHyperlinkColumn to capture the Tab key. Pressing the Tab key simply moved the focus from this control to the next control (in this case, the address bar).

So, then I thought I'd use the GridButtonColumn, using a LinkButton as the button type. I got the onkeypress event to fire when pressing the Enter key, but not the Tab key. The other problem I noticed is that if I set the ShowInEditForm property to true, then the buttons do not render for the GridDataItems (rows not being edited), and if I do not set the ShowInEditForm property, they do not render in the row being edited. I cannot figure out how to get the buttons to display in BOTH types of rows.

Is what I am wanting to accomplish even possible? Optimally, I would like to get the GridHyperlinkColumn to work as I describe above, but I cannot figure out how to get the rendered hyperlink to behave as expected.
Antonio Stoilkov
Telerik team
 answered on 10 Oct 2012
2 answers
268 views
Hello,

I'm having difficulties when trying to add the following functionality to my RadGrid.

I have a RadGrid with a GridTableView inside the DetailTables section of the RadGrid. I've set the CommandItemDisplay so the commands are visible to the user; however, when a command is used, like "Add New Record", the Master Grid's ItemCommand event is fired and the CommandName is "InitInsert". The issue I have is that the master RadGrid also has commands, which will insert/update/delete records in a different table than the GridTableView Commands would update records in. I have been unable to determine how to identify whether or not the command is coming from the Master RadGrid or the GridTableView. Is there a way to determine that the user clicked the DELETE command of the detail table and not of the master table?

Any assistance would be appreciated.

Thanks!
Casey
Jack
Top achievements
Rank 1
 answered on 10 Oct 2012
1 answer
71 views
I was wondering if it is possible to manipulate the intervals of the HoursPanel.
In this case the hours are fixed lesson hours being:

8.30-8.55 (25")
8.55-9.20 (25")
9.20-9.45 (25")

9.45-10.10 (15")

10.25-10.50 (25")
10.50-11.15 (25")
11.15-11.40 (25")
11-40-12.05 (25")

12.05-13.15 (70")

13.15-13.40 (25")
etc...

Using MinutesPerRow="5" And TimeLabelRowSpan="1" just doesn't cut it.
These blocks are always the same and I can't seem to find any way to customize the HoursPanel.

Is there any way I can do this? By inheriting the control and manipulating some properties perhaps?

Thank you in advance!

Frederik R.
Plamen
Telerik team
 answered on 10 Oct 2012
3 answers
500 views
HI,  I see you guys get this a lot but I couldn't find a recent one that had a similar circumstance - so here goes.  I have a very simple website that I developed a registration page for that included radCaptcha.  I then began implementing forms authentication and used a location tag in the web.config to make the register.aspx page and App_Themes directory available to anonymous users.  All of that worked until I got to the bottom of the page and found that the captcha image was broken.

After doing some googling on the subject I saw a lot of references to this:

<location path="Telerik.Web.UI.WebResource.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

Unfortunately VS2010 does not seem to know where Telerik.Web.UI.WebResource.axd is (I get the blue squigly from resharper telling me it can't be found).  I have an entry in httHandlers and handlers groups for the axd.  Kind of at a dead stop at the moment - I just got the latest subscription so I know I'm up to date and as noted at the start of this post it worked fine when I didn't the forms authentication implemented.

Thanx,

Eric

Princy
Top achievements
Rank 2
 answered on 10 Oct 2012
1 answer
69 views
hiii all,
     can anyone help me?
i am using telerik grid. Problem is when i click on export to excel link button while grid is empty.
in excel i am not getting anything.
i want to show headers of the grid in the excel sheet.
Shinu
Top achievements
Rank 2
 answered on 10 Oct 2012
2 answers
166 views
I have followed the code snippets from other posts on this issue to add a linkbutton to the group headers of my radgrid but on clicking the linkbutton's I get an object not specified error.

I'm adding the following code, where item is the gridgroupheaderitem and then handling the command in the radgrid_itemcommand event.
the code is added in both the radgrid_itemcreated and radgrid_itemdatabound events.
protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridGroupHeaderItem)
        {
            createbutton((GridGroupHeaderItem)e.Item);
 
        }
    }
    protected void createbutton(GridGroupHeaderItem header)
    {
        if (header.DataCell.FindControl("thisGroup") == null)
        {
            Label mylab = new Label();
            mylab.ID = "thisNumber";
            DataRowView drv = header.DataItem as DataRowView;
            mylab.Text = drv["Location"].ToString();
            Label mylabno = new Label();
            mylab.ID = "thisGroup";
 
            mylabno.Text = drv["GroupOrder"].ToString();
            mylabno.Visible = false;
            GridGroupHeaderItem item = header as GridGroupHeaderItem;
            LinkButton lnk = new LinkButton();
            lnk.Text = "Move up ";
            lnk.Style.Add("margin", "3px");
            LinkButton xnk = new LinkButton();
            xnk.Text = "Move down";
            xnk.Style.Add("margin", "2px");
            xnk.Style.Add("padding", "2px");
 
            item.DataCell.Controls.Add(mylab);
            item.DataCell.Controls.Add(mylabno);
            lnk.CommandName = "Up";
            item.DataCell.Controls.Add(lnk);
            xnk.CommandName = "Down";
            item.DataCell.Controls.Add(xnk);
        }
    }


I'm guessing its related to the fact this radgrid is ajaxified, but not entirely sure.  any ideas??
Morgan
Top achievements
Rank 2
 answered on 10 Oct 2012
5 answers
184 views
How can I change the Root PanelBar Text from code behind?

Thanks
Adeel
Top achievements
Rank 1
 answered on 09 Oct 2012
2 answers
243 views
I have a web site that stores documentation.  We use RadEditor to add and update our documents.  I'm in the process of converting all my pages from .NET 1.1  to .NET 4.0

As a result I'm using a newer version of RadEditor.

Our documentation is actually stored as html in a SQL database.

When we display a document, we read the SQL DB into an XML doc and display it.

I have RadEditor working just fine to add new documents.  However, I'm having problems with editing documents.

When I retrieve my data from the SQL database, I'm loading the .InnerXML of my XML doc in the the RadEditor Content field.  RadEditor starts up in Design mode, but the main window is showing all the HTML markup - how can I load my data, so that the main window shows my rendered document, with the HTML markup in the lower window only?

Basically, I need to make this new version of RadEditor function the way my old RadEditor 7.3.5 did.  I've uploaded some files to illustrate my problem. 
Adhelp
Top achievements
Rank 1
 answered on 09 Oct 2012
3 answers
128 views
My RadGrid (Version 2012.2.912.40):

<asp:UpdatePanel ID="InterfacePanel" UpdateMode="Conditional" runat="server">
<ContentTemplate>
 <telerik:RadGrid ID="InterfaceGrid" BackColor="White" Skin="Vista" AutoGenerateColumns="false" AllowSorting="true" runat="server">
    <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder" AllowKeyboardNavigation="True" />
    <MasterTableView HierarchyDefaultExpanded="true" EnableColumnsViewState="false" EditMode="InPlace" BorderColor="#ededed" GridLines="Both" CommandItemDisplay="Top" InsertItemDisplay="Bottom">
 <HeaderStyle HorizontalAlign="Left" />
  <EditFormSettings>
     <EditColumn ButtonType="ImageButton" />
 </EditFormSettings>
    </MasterTableView>
    <ValidationSettings EnableValidation="true" CommandsToValidate="PerformInsert,Update" />
    <ItemStyle Wrap="false" />
    <ActiveItemStyle Wrap="false" />
 </telerik:RadGrid>
</ContentTemplate>
</asp:UpdatePanel>
Kostadin
Telerik team
 answered on 09 Oct 2012
0 answers
78 views
I have a huge project that used RadTabStrips liberally. In many of the pages, but not all, the RadTabStrip unexpectedly resizes to 100% of the browser width. This behavior is not exhibited in IE7 or IE8.

After a cursory look at the CSS for the pages affected, I noticed that there is an entry in the WebResource.axd

.RadTabStrip .rtsLevel {
 
width: 100%; overflow: hidden; padding-top:
1px; clear: both; position: relative;
}


If I disable the width setting in this file (dynamically through the IE developer tools) the RadTabStrip displays properly, fitting the width of the multipage.

I do not set the width of the tabstrip anywhere because the width of the multipage may vary based on the dynamically created content.

The code for the tabstrip is:

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0">
    <Tabs>
        <telerik:RadTab runat="server" Text="Manage Disciplines" Selected="True">
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="Discipline Mapping">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>



Please advise of a solution to this issue.
Keith
Top achievements
Rank 2
 asked on 09 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?