Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
133 views
Hello,

I'm having an issue with a custom command item that I have added.  Below is the code used to add this command:
(I need to add this dynamically because not all users will be allowed to delete.)
If (TypeOf e.Item Is GridCommandItem) Then
    Dim btnDelete = New LinkButton()
    btnDelete.ID = "btnDelete"
    btnDelete.Text = "  Delete"
    btnDelete.CommandName = "Delete"
    btnDelete.Attributes("onclick") = "javascript:return confirm('Do you want to delete this item?')"
    Dim cmdItem As GridCommandItem = CType(e.Item, GridCommandItem)
    cmdItem.Controls(0).Controls(0).Controls(0).Controls(0).Controls.Add(btnDelete)
End If

How can I get this control to be handled by the RadGrid_ItemCommand Handler?

Thank you,
Kevin
Shinu
Top achievements
Rank 2
 answered on 29 Nov 2011
1 answer
127 views
Hi

I can see many post on white space on right side of grid while using Frozen column. I tried suggestions on the other post but could not solved my problem so posting here... 

I am having grid in which first 2 columns are frozen.... and after that I am showing yearly data, could be for 1 - 12 (max 12 years data) years depending on user selection. If user selection is less than 12 years then hiding rest of the columns.... In the same grid I am having inline edit feature, so that user can add/edit values in same row.( I guess inline editing has nothing to do with this problem)

Problem I am facing - I am getting white space on right hand side of grid. Please see attachment and sample code as below...

Looking for solution as my project demand this frozen feature across application...  
Thanks,
Pradip

 <style type="text/css">
.rgDataDiv
        {
        height:auto !important;
        }
</style>

<div id="divGrid" runat="server" >
    <div class="column-full-wide">
        
        <table width="100%;" align="left">
            <tr>
                <td valign="top" align="left" class="dashboardHeading">
                    
                </td>
            </tr>
            <tr>
                <td align="left">
                    <div style="margin-top: 10px; margin-bottom: 10px; width:710px;">
                        <telerik:RadGrid runat="server" ID="radGridEL" AutoGenerateColumns="False"
                            OnUpdateCommand="radGridEL_UpdateCommand">
                            <MasterTableView runat="server" AllowCustomPaging="true" PageSize="25" EditMode="InPlace"
                                DataKeyNames="Trading_Program_Participant_Id" >
                                <HeaderStyle Width="100px" Font-Bold="true" ForeColor="White" />
                                <AlternatingItemStyle Height="40" CssClass="Caplimit_Cell" />
                                <ItemStyle Height="40" CssClass="Caplimit_Cell" />
                                <Columns>
                                    <telerik:GridBoundColumn HeaderText="Trading_Program_Participant_Id" DataField="Trading_Program_Participant_Id"
                                        ReadOnly="true" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridEditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel"
                                        EditText='Edit' UniqueName="EditLink">
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridBoundColumn UniqueName="Participant_Name" HeaderText="Participant Name"
                                        DataField="Participant_Name" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Units" HeaderText="Units" DataField="Units"
                                        ReadOnly="true">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year1">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year1")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear1" runat="server" Text='<%# Bind("Year1")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year2">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year2")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear2" runat="server" Text='<%# Bind("Year2")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year3">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year3")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear3" runat="server" Text='<%# Bind("Year3")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year4">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year4")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear4" runat="server" Text='<%# Bind("Year4")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year5">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year5")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear5" runat="server" Text='<%# Bind("Year5")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year6">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year6")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear6" runat="server" Text='<%# Bind("Year6")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year7">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year7")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear7" runat="server" Text='<%# Bind("Year7")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn>
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year8")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear8" runat="server" Text='<%# Bind("Year8")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn>
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year9")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear9" runat="server" Text='<%# Bind("Year9")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn>
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year10")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear10" runat="server" Text='<%# Bind("Year10")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year11">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year11")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear11" runat="server" Text='<%# Bind("Year11")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Year12">
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "Year12")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadTextBox ID="txtYear12" runat="server" Text='<%# Bind("Year12")%>'>
                                            </telerik:RadTextBox>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                                   
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" FrozenColumnsCount="2" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                        
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>
Princy
Top achievements
Rank 2
 answered on 29 Nov 2011
2 answers
99 views
Hey guys, I was trying this approach, but couldn't get it to work.  My situation is different because my RadUpload is within the EditItemTemplate of a RadGrid's column.  Also, my grid is within a user control which does an ajax postback, so the user sees a loading panel while the document is being uploaded. I don't think that has anything to do with it, but it is a difference from the example.

What we're doing is listing all the documents attached to this person.  If they hit the "Add new record" button, one of the elements of my edit item is a RadUpload.  It seems to work very well, except when a very large document is attempted.  Then, after about 2 minutes, I get an HttpException that the max request length has been exceeded.

I am setting RadUpload's MaxFileSize to a configured value.  Currently, it's 1000 *1024 (1MB).  The file I'm testing with is 11,184 KB, but RadUpload fails to stop it there.

I found the link above.  Tried adding a RadProgressManager and RadProgressArea to my EditItemTemplate and throwing the javascript in my control to no avail.  The javascript is never getting invoked.  The example isn't clear as to how the RadProgress controls are tied to the RadUpload control.

Any ideas?

Thanks,

Scott

golddog
Top achievements
Rank 1
 answered on 28 Nov 2011
1 answer
87 views
Hi

I have .js files in aspx page , but dynamically it create .axd file ,
this scriptsresource.axd file giving me error as offset.top() is null or not an object , can u please find solution to this problem.

thanks in advance
Rumen
Telerik team
 answered on 28 Nov 2011
7 answers
184 views

I'm going crazy with this one and hoping there's a good solution. I'd like the RadDataPagerButtonField to be centered within the RadDataPager control. Currently, it's left-justified (or floated). I've been playing with the rdpNumPart class but haven't been successful.

<telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1" PageSize="1" Skin="" CssClass="" >
    <Fields>
        <telerik:RadDataPagerTemplatePageField HorizontalPosition="LeftFloat">
            <PagerTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CssClass="btn" Text="Previous Review" CommandName="Page" CommandArgument="Prev" />
            </PagerTemplate>
        </telerik:RadDataPagerTemplatePageField>
 
        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="7" />
                             
        <telerik:RadDataPagerTemplatePageField HorizontalPosition="RightFloat">
            <PagerTemplate>
                <asp:LinkButton ID="LinkButton2" runat="server" CssClass="btn btn-next" Text="Next Review" CommandName="Page" CommandArgument="Next" />
            </PagerTemplate>
        </telerik:RadDataPagerTemplatePageField>
    </Fields>
</telerik:RadDataPager>

Seems like this should be simple as it's a common layout. Thanks in advance for any help!

KDL
Top achievements
Rank 1
 answered on 28 Nov 2011
1 answer
59 views
Hi Telrik,

I have added Telerik Asyn Upload control inside Telerik Grid edit mode. When I open the page in IE 8 its working fine. But when i open the page in IE 6 the upload control is visible outside the grid. Can you please update on same?
Bozhidar
Telerik team
 answered on 28 Nov 2011
3 answers
124 views

Hi,

I need to get an example about implementing telerik with n2 cms

if someone can help me will be wonderful

i wanna know if is posible use telerik with n2 cms...

thanks a lot for reading...

Note: i'm a dummy using telerik 'cause i don't know nothing about that.

at least will be nice to get a north jeje i don't know how to use telerik rad controls i need an easy example...

please answer me people jeje thanks a lot again!!!
Jarrett
Top achievements
Rank 2
 answered on 28 Nov 2011
8 answers
157 views
I have a radgrid where the entire grid is created at run-time. The issue I'm having is related to what happens if filtering produces no results. The phrase "No records to display." is repeated 6 times, 1 line below the other, with the first 3 or 4 letters being cut from the line above. Please see attached screen shot. Any idea as to why this is happening and how to get it to stop?

Thank you.
~Robin
Vasil
Telerik team
 answered on 28 Nov 2011
9 answers
336 views
Hi,

When a date such as 30/02/1975 is manually entered into the text box of a RadDatePicker control, it is automatically changed to 28/02/1975 without giving any warning or error.

Our client wishes for the behaviour under such circumstances to be the same as if an invalid date is entered - i.e.if you enter 40/02/1975 the text box border is set to red and a warning icon appears.

Is it possible to alter the RadDatePicker behaviour so that it will treat dates such as 30/02/1975 in the same way as invalid dates (i.e. show the warning icon and red border)?

Regards,

Dave
Vasil
Telerik team
 answered on 28 Nov 2011
2 answers
194 views
Hi all,

I am using a RadTreeView and I want to have a functionality as follows: I need to have an option (a button or link) that 
when I click it I get a different view from the RadTreeView. The first view is just having a 'name' field from the database 
in each node, and the alternative view is to have the 'name' and then below the 'description' field also from the database.
Is it possible to change the NodeTemplate Dynamically or is there any simplier way to do this (like for example, having two 
different NodeTemplates and the making one or the other active).

Thanks,
Bruno
Bruno
Top achievements
Rank 1
 answered on 28 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?