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

I have a RadGrid and I am using the ItemTemplate to display the data in a table format for each record of data. This allows me to set it out how I want it.

In my table I have included a Rad Menu which I want to use to give the user a number of options. I am having difficulty in assigning the NavigateURL of each menu item. For example I have a button with Text "Edit Details" and I want this to like through to a page called

EditDetails.aspx?ItemID=##

where ## is the ID of the unigue record ID as stored in the database.

I found this post

Binding NavigateURL within a RadGrid won't work

Which is extreemly useful, however the example given has the menu in a GridTemplateColumn, whilst mine is not in a GridTemplateColumn but rather is in an ItemTemplate

When I replicate the code I get the link

EditDetails.aspx?ItemID=

but it does not bring through the ID of the column itself and add it to the address





How do I adjust the code for the example above so that it works for an ItemTemplate, rather than for a GridTemplateColumn

Many thanks in advance



Yavor
Telerik team
 answered on 31 Mar 2009
1 answer
90 views
Hi Guys,

I would like to implement something similiar to this example:

http://www.telerik.com/community/code-library/aspnet-ajax/general/refresh-footer-values-in-radgrid-client-side-using-radnumerictextbox.aspx

Is there a version of this example somewhere where the columns are added in the code behind (c#)?

Many thanks
Antony Masterson
Princy
Top achievements
Rank 2
 answered on 31 Mar 2009
1 answer
155 views
Hi,
I have a GridView master table and several detail tables. I have allready solved with your help selectable showing and hiding of particullar detail views.

I'd like to have these details aligned with their expand columns. Origially, RadGrid inserts for a detail a new table row, with first empty TD column, which takes care of aligning with the second master table column. If I modify source code in Explorer this TD with colspan=3, I can align the detail as I need. I there any way, how to do it programmatically?

Thanks 
Michal 
Yavor
Telerik team
 answered on 31 Mar 2009
1 answer
175 views
I am using a grid with automatic operations on a linqdatasource. One of the fields that needs to be updateable is a link to a file. There is a RadUpload control in the edititemtemplate, but I should be able to access this control to edit the link and then paste it in the textbox that is in the edititemtemplate.

Here is the code for the grid.

<telerik:RadGrid ID="rgReport" runat="server" AllowAutomaticDeletes="true"
                 AllowAutomaticInserts="true" AllowAutomaticUpdates="true" DataSourceID="LinqDataSource2"
                 AutoGenerateColumns="false" OnItemDataBound="rgReport_ItemDataBound"
                  OnUpdateCommand="rgReport_UpdateCommand">
                    <HeaderContextMenu EnableTheming="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </HeaderContextMenu>
                    <MasterTableView CommandItemDisplay="Top" DataKeyNames="SortID,BatchID,User_Ref"
                     EditMode="EditForms">
                         <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton"
                                 UniqueName="EditCommandColumn">
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="SortID" HeaderText="SortID"
                             UniqueName="SortID" ReadOnly="true">
                                <ItemStyle CssClass="hide" />
                                <HeaderStyle CssClass="hide" />
                             </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn DataField="newSort" HeaderText="Enclosure #"
                             UniqueName="EnclosureID">
                             </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn DataField="Description" HeaderText="Description"
                              UniqueName="Description"></telerik:GridBoundColumn>
                             <telerik:GridBoundColumn DataField="Product_Ref" HeaderText="Product"
                              UniqueName="Product_Ref" ReadOnly="true">
                                <ItemStyle CssClass="hide" />
                                <HeaderStyle CssClass="hide" />
                             </telerik:GridBoundColumn>
                             <telerik:GridTemplateColumn UniqueName="tmplLink">
                                 <ItemTemplate>
                                     <asp:Label ID="lblLink" runat="server" Text='<%#Eval("Link") %>'></asp:Label>
                                 </ItemTemplate>
                                 <EditItemTemplate>
                                     <asp:TextBox ID="txtLink" Text='<%#Bind("Link") %>' runat="server"></asp:TextBox>
                                     <telerik:RadUpload ID="ruLink" OnClientFileSelected="fileSelected" runat="server" ControlObjectsVisibility="None" />
                                 </EditItemTemplate>
                             </telerik:GridTemplateColumn>
                             <telerik:GridBoundColumn DataField="Type" HeaderText="Type" UniqueName="Type"
                              ReadOnly="true">
                             </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn ConfirmText="Delete this product?"
                                ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton"  
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                <ItemStyle HorizontalAlign="Center"/>
                            </telerik:GridButtonColumn>
                    </Columns>
                <editformsettings>
                    <editcolumn uniquename="EditCommandColumn1">
                    </editcolumn>
                </editformsettings>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                    </MasterTableView>
                    <FilterMenu EnableTheming="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </FilterMenu>
                </telerik:RadGrid>
Tsvetoslav
Telerik team
 answered on 31 Mar 2009
2 answers
161 views
I uses Telerik Radcontrols for Ajax, version 2008.3.1105.20 from 4.11.08.

I have  a form which contains a few RadPageView pages.
In (only) one of the pages, I put some RadioButtons, then a RadEditor window.

The radeditor is defined this way in the aspx:

    <telerik:RadEditor EnableViewState="false" EditModes="Design" runat="server" ID="edtNotes"  
    ToolsFile="~/RadControls/Editor/BasicTools.xml" Skin="Web20" Height="250px" Width="650px" OnClientLoad="SelectionChanged" > 
    <CssFiles> 
        <telerik:EditorCssFile Value="~/RadControls/Editor/EditorContentArea.css" /> 
    </CssFiles> 
    </telerik:RadEditor> 
 

My first problem was that even after selecting another PageView, the focus was still on the editor!
The editor itself wasn't visible, but the cursor was still there, and if the user typed any keys, then when coming back to the editor, we could see that the characters types were added to the editor content!

I tried to use setFocus() to force the cursor to leave the editor, but that didn't work.
Then I tried another method: When leaving the editor's page, I change the editor visibility to false with:

$find("<%=edtNotes.ClientID%>").set_visible(false); 

then, when entering the editor's page, I turned editor's visibility back to true.

Now, there's isn't a problem with the focus, and the cursor isn't seen in the other pages at all.
But, this method raised another problem:
Now, the editor appears with no icons in the toolbar at all. Only the toolbar is shown with an empty ruler.
In some of my client's stations, it's even worse: sometimes the toolbar spread all over the screen, with one icon in each line.

Can you give me some help here? I'll be grateful to receive your suggestions.

Yours Sincerely,
Hanoch




Hanoch Faran
Top achievements
Rank 1
 answered on 31 Mar 2009
2 answers
185 views
A bit of a strange one this, I've used Telerik for several months then got another contract, I've been spouting how cool and time saving the controls are to my new manager, and he wants to buy them, however he has to justify it to his manager.

Does anyone have a business case for the controls?

Andy
Andy Green
Top achievements
Rank 2
 answered on 31 Mar 2009
2 answers
164 views
My grid has static headers and scrolling is turned on. Suppose that the grid is loaded with many records. If I go to edit the row located at the top of the visible part of the grid, the FormTemplate will load as expected and all the controls in the FormTemplate are visible. On the other hand, if I edit a row at the bottom of the visible part of the grid while there are still rows below it, the FormTemplate will load as usual but is below the visible area of the grid. The user has to use the vertical scrollbar to scroll down to the FormTemplate in order to enter in data. Is there a way to bring the row being edited to the top of the visible area so that the FormTemplate is visible without scrolling?
Polaris431
Top achievements
Rank 1
 answered on 31 Mar 2009
1 answer
407 views
Hi,

After exporting grid data to pdf or excel, When open those files I am unable to see the grid lines in theme (grid lines are missing)

my code is as follows:

<radG:RadGrid ID="dgReport" runat="server" Skin="Default" EnableEmbeddedSkins="false" >
                                <ExportSettings OpenInNewWindow="True" IgnorePaging="True">
                                    <Pdf Author="Anonymous" Title="RadGrid export" Subject="RadGrid Export" Keywords="None"
                                        AllowCopy="True" AllowModify="True" PageTopMargin="1in" PageBottomMargin="1in"
                                        PageLeftMargin="0.2in" PageRightMargin="0.2in"></Pdf>
                                </ExportSettings>
                                <MasterTableView  HeaderStyle-Wrap="false" ItemStyle-Wrap="false">
                                    <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px" />
                                    </ExpandCollapseColumn>
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px" />
                                    </RowIndicatorColumn>
                                  
                                </MasterTableView>
                                <FilterMenu EnableTheming="True">
                                    <CollapseAnimation Duration="200" Type="OutQuint" />
                                </FilterMenu>
            </radG:RadGrid>

code behind:

bool isPdfExport = false;
protected void btnExportToPdf_Click(object sender, EventArgs e)
        {
          
                isPdfExport = true;
                 dgReport.ExportSettings.ExportOnlyData = false;
                dgReport.ExportSettings.Pdf.PageWidth = 2000;
                dgDReport.MasterTableView.ExportToPdf();
         }

What is the reason for this ?

Thanks,
Shinu
Top achievements
Rank 2
 answered on 31 Mar 2009
1 answer
121 views
hi,

i have a radgrid in my aspx page. when the page is loaded the grid flicks and then moves to the page size provided. can any one provide us solution to avoid this.

Shinu
Top achievements
Rank 2
 answered on 31 Mar 2009
1 answer
376 views
hey,
      I have a GridTemplateColumn which has a label inside its ItemTemplate. This label gets bound from a decimal field from the database. I want to make the number that appears in the label to have 1 decimal after the point even if it's a whole number (5 becomes 5.0). How can I do that with the DataFormatString or is there another way?
Thanks
Shinu
Top achievements
Rank 2
 answered on 31 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?