Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
217 views
Hi,
I am new to telerik controls. I am working on below scenario 
I have  one Rad Grid which will have 3 columns out of which one is dropdown column. I am able to populate the combo box on page load but I want that Values in other two columns should get populated based on what value is selected in combo box column.

Please let me know how to do this.

Princy
Top achievements
Rank 2
 answered on 21 Jan 2014
5 answers
64 views
Greetings,

I have a batch mode grid that's required to be able to display a dialog when the user is editing a row, and the user will interact with the dialog in some way.
I used a RadWindow for the dialog, and because the grid closes the currently edited row if the user clicks outside the row, I added the following code to prevent the grid from closing the currently edited row while the dialog is shown:

function dialog_beforeShow(sender, args)
    {
        grid.add_batchEditClosing(grid_batchEditClosing);
    }
 
    function grid_batchEditClosing(sender, args)
    {
        args.set_cancel(true);
    }
 
function dialog_close(sender, args)
    {
        grid.remove_batchEditClosing(grid_batchEditClosing);
    }

After the dialog is closed, I find that the row doesn't close if I click with mouse anywhere.
It only closes if I open another row for editing.
Angel Petrov
Telerik team
 answered on 21 Jan 2014
1 answer
155 views

Hi there,


I am attempting to refresh a datatable with the latest updates from a radgrid.



Steps

1. Two Rows exist

2. User Clicks "edit"

3. Two columns become editable

4. User edits 1 or both values clicks "update"

5. Within myGrid_UpdateCommand session variable gets updated.

6. Currently only returns newly edited row, ignores row not edited.

7. WANTED: to always return all the rows, edited and unchanged.



Code

 


Protected Sub rgTaxRate_UpdateCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles rgTaxRate.UpdateCommand
Dim newDataTable As DataTable = New DataTable
 
 ' build column names
For Each col As GridColumn In rgTaxRate.Columns
    Dim dCol As DataColumn = New DataColumn(col.UniqueName)
    newDataTable.Columns.Add(dCol)
Next
 
; attempt to create row
For Each row As GridDataItem In rgTaxRate.Items
    Dim dr As DataRow = newDataTable.NewRow
    For Each col As GridColumn In rgTaxRate.Columns
        dr(col.UniqueName) = row(col.UniqueName).Text
    Next
    newDataTable.Rows.Add(dr)
Next
 
Session("MyTempTable") = newDataTable


this is based on another thread I saw but I am unsure for the life of me how they got it to work.

Here is my aspx code

<telerik:RadGrid OnItemEvent="rgTaxRate_ItemEvent" ID="rgTaxRate" Width="100%" AllowPaging="True" PageSize="8" runat="server" AllowSorting="True" GridLines="None"
                                        AutoGenerateColumns="True" ShowStatusBar="True" CellSpacing="0" EnableViewState="false" AutoGenerateEditColumn="true" OnUpdateCommand="rgTaxRate_UpdateCommand">
                                        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                        <MasterTableView ShowFooter="false" DataKeyNames="TaxID" EditMode="InPlace" Width="100%" CommandItemDisplay="Bottom"  HorizontalAlign="NotSet" AutoGenerateColumns="false">
                                        <CommandItemTemplate>
                                            <div style="padding: 5px 5px; text-align:left;">
                                                <asp:LinkButton ID="reloadTaxes" Text="Reset to Defaults" CommandName="Reload" runat="server" OnCommand="lbReload_Command"></asp:LinkButton>
                                            </div>
                                        </CommandItemTemplate>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="TaxID" HeaderText="TaxID" UniqueName="TaxID" SortExpression="TaxID" Display="false"></telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn DataField="TaxDescription" UniqueName="TaxDescription" HeaderText="Tax Description" SortExpression="TaxDescription" HeaderStyle-Width="128px" ItemStyle-Width="128px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "TaxDescription")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadTextBox Width="128px" runat="server" ID="rgTaxRate_Description" MaxLength="20" Text='<%#Eval("TaxDescription") %>'></telerik:RadTextBox>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn DataField="TaxRate" UniqueName="TaxRate" HeaderText="Tax Rate" SortExpression="TaxRate"  ItemStyle-Width="56px"  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "TaxRate")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadNumericTextBox Width="56px" ID="rgTaxRate_Amount" Type="Percent" MinValue="0" MaxValue="100" MaxLength="3" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="," Culture="en-US"  runat="server" DbValue='<%#Eval("TaxRate") %>'>
                                                    </telerik:RadNumericTextBox>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                        </MasterTableView>
                                        <ClientSettings></ClientSettings>
                                        <FilterMenu EnableTheming="True">
                                            <CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
                                        </FilterMenu>
                                    </telerik:RadGrid>
                                    <telerik:GridTextBoxColumnEditor runat="server" ID="rgTaxRate_Amount">  
                                        <TextBoxStyle Width="50px" />
                                    </telerik:GridTextBoxColumnEditor>








Princy
Top achievements
Rank 2
 answered on 21 Jan 2014
1 answer
95 views
Hi,

I'm looking at the demo code for RadGrid (http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultvb.aspx)

and when I try to run it, I get a System.ArgumentOutOfRangeException error on:

    Protected Sub RadGrid1_PreRender(sender As Object, e As EventArgs) Handles RadGrid1.PreRender
        If Not IsPostBack Then
            Me.RadGrid1.MasterTableView.Items(1).Edit = True <-- this line is throwing the error
            Me.RadGrid1.MasterTableView.Rebind()
        End If
    End Sub

I haven't modified any of the demo code, and wondering how to fix this.

Thanks in advance.



Jayesh Goyani
Top achievements
Rank 2
 answered on 21 Jan 2014
1 answer
96 views
Hello,
Is there any way to get the bread crumb based on the Rad menu item selection. I am unable to get the Click event for the rad menu. please check my java script code.

//Disable the embedded scripts for the Main Nav RadMenu
function OnClientItemOpening(sender, eventArgs) {
    eventArgs.set_cancel(true);
};

Is there any flaw in the above code snippet.

Regards,
Prasad.
Princy
Top achievements
Rank 2
 answered on 21 Jan 2014
1 answer
99 views
Hi,
I am trying to use a RadTimePicker and calling it through Javascript on a button click. But when I click on the button, console displays an error saying no method found for showTimePopup(). 
Shinu
Top achievements
Rank 2
 answered on 21 Jan 2014
2 answers
85 views
Hello,
I have implemented the client-side declarative binding sample but can not get the GridCheckBoxColumn to show as checked regardless of the Sql value. I see that the http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/declarative/defaultcs.aspx sample has the same problem. How can I get this to work? I tried implementing RowDataBound but this did not help. Thank you.
function RowDataBound(sender, eventArgs) {
        if (eventArgs.get_dataItem()["Discontinued"] == true) {
            var checkbox = eventArgs.get_item().get_cell("Discontinued").getElementsByTagName("input")[0];
            checkbox.checked = true;
        }
    }
Jeff
Top achievements
Rank 1
 answered on 21 Jan 2014
1 answer
98 views
I need to add RadTimePicker on a button click to my web application. I want it to be client side like using javascript. Any help will be much appreciated.
Thanks
Shinu
Top achievements
Rank 2
 answered on 21 Jan 2014
1 answer
108 views
Hello, Since this morning, when our browsers (chrome) updated to version 32.0.1700.76 m, we are experienced a problem with the RadContextMenu placement when the page is scrolled down (pic2.png). Checking for possible errors we found the following: "body.scrollTop is deprecated in strict mode. Please use 'documentElement.scrollTop' if in strict mode and 'body.scrollTop' only if in quirks mode." We checked in your demo page and there is the same problem. We tested it in other browsers and it's fine... Thanks, Rodrigo

Mark Kucera
Top achievements
Rank 1
 answered on 21 Jan 2014
6 answers
142 views
The tooltip immediately disappeared after loaded info in your demo. Test in Chrome and IE 8, all the same.

http://demos.telerik.com/aspnet-ajax/tooltip/examples/overview/defaultvb.aspx

However, the "Cache loaded data" works fine:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/enabledatacaching/defaultvb.aspx
Rob
Top achievements
Rank 1
 answered on 20 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?