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

I believe the radajaxpanel and radxmlhttppanel somewhat serves the same purpose. When performance is considered, which control is
preferred especially when dealing with client side data loading?

Thankyou,
JC
Princy
Top achievements
Rank 2
 answered on 18 Apr 2013
2 answers
166 views
I am trying to get values when inserting from an Edit Form (with Multiple Columns) in preparation for writing a record to the database.  I'm sure it's something simple t o get this working.  However when I try to retrieve the value for a field in the InsertCommand handler it looks like the textbox can't be located.  I'm not sure what I should cast e.item to in the handler.  I've seen and tried three different types unsuccessfully: GridEditFormInsertItem, GridEditFormItem and GridEditableItem. 

<telerik:RadGrid ID="rgLocations" runat="server" Width="100%"  AutoGenerateColumns="false"
        Skin="Office2010Black"  ItemStyle-BackColor="#ffe394" BorderColor="White"
        ShowFooter="false"  OnNeedDataSource="rgLocations_NeedDataSource" OnInsertCommand="rgLocations_InsertCommand">
        <AlternatingItemStyle BackColor="White" />
        <FooterStyle BackColor="#cccccc" />
        <HeaderStyle ForeColor="White" />
        <PagerStyle AlwaysVisible="true" Position="TopAndBottom" ForeColor="White"   />
         <MasterTableView  CommandItemDisplay="Top" DataKeyNames="ClientLocationID" >
            <Columns>
                <telerik:GridBoundColumn DataField="ClientLocationID" Visible="false"  ReadOnly="true"/>
                <telerik:GridTemplateColumn HeaderText="Edit">
                    <ItemTemplate>
                        <asp:ImageButton ID="ibtnEdit" ImageUrl="~/images/silk/pencil_go.png" CommandName="Edit"
                            runat="server" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="ClientID" HeaderText="Client" Visible="false"  ReadOnly="true" />
                <telerik:GridBoundColumn DataField="LocationName" HeaderText="Location" EditFormColumnIndex="0" />
                <telerik:GridBoundColumn DataField="PublicIPs" HeaderText="Public IPs" EditFormColumnIndex="0"/>
                <telerik:GridBoundColumn DataField="PrivateIPs" HeaderText="Private IPs"  EditFormColumnIndex="0" />
                <telerik:GridBoundColumn DataField="Address1" HeaderText="Address1" EditFormColumnIndex="1" />
                <telerik:GridBoundColumn DataField="Address2" HeaderText="Address2" EditFormColumnIndex="1" />
                <telerik:GridBoundColumn DataField="City" HeaderText="City" EditFormColumnIndex="2" />
                <telerik:GridBoundColumn DataField="State" HeaderText="State" EditFormColumnIndex="2" />
                <telerik:GridBoundColumn DataField="Zip" HeaderText="Zip"  EditFormColumnIndex="2" />
                
                <telerik:GridTemplateColumn  ReadOnly="true" HeaderText="Delete" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <asp:ImageButton ID="ibtnDelete" CommandName="Delete" runat="server" ImageUrl="images/1263447248_cross.png" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings ColumnNumber="3" CaptionFormatString="Edit details for Notification {0}" CaptionDataField="LocationName">
                <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="5" Width="200" />
                <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="5" CssClass="module"  Height="110px" Width="100%"></FormTableStyle>
                <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle>
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>




Protected Sub rgLocations_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
    Dim ClientID As String = Session("ClientID")
    Dim oCLientLocations As clsClientLocations = New clsClientLocations(ClientID)
    rgLocations.DataSource = oCLientLocations.DataTable
End Sub
 
Protected Sub rgLocations_InsertCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs)
    Dim editedItem As GridEditFormItem = CType(e.Item, GridEditableItem)
     
    Dim LocationName As String = CType(editedItem("LocationName").FindControl(0), TextBox).Text
End Sub
 
In the ItemCOmmand handler, the LocationName does not get set.  I the error message: "Object reference not set to an instance of an object."  WHich is because editItem("LocationName").FindControl(0) is "Nothing".

Thanks in advance for any help on this.
Hunter
Top achievements
Rank 1
 answered on 18 Apr 2013
2 answers
120 views
Hello,

I am using rad Grid with Auto generated columns.
I am adding Link Button at ItemDatabound Event.  so rows will generated as link button cell.
Now Problem is that  When I click on linkbutton that does not fire ItemCommand Event and convert cell in Normal Cell.
Link button removed after click on it.
So What is problem?
 and
Please Give me Solution.

Thanks....
Ajay
Top achievements
Rank 1
 answered on 18 Apr 2013
1 answer
253 views
Hi,

There is a Raddropdownlist (Q1 2013 beta) which is populated using a data table from server side page load. In a radbutton click, I am using the FindItemByValue method to get the item but I am getting an error which seems like there is no such method associated with this control.

RadDropDownListItem item = RadDropDownList1.FindItemByValue("101");

Thank you,
Damian Hague
Princy
Top achievements
Rank 2
 answered on 18 Apr 2013
1 answer
73 views
HI,

Using RadAsncUpload, while uploading files how can I display the "Total Progress", "Files Count", "Current uploading file", "estimated time"?

Thanks,
Sameer.
Princy
Top achievements
Rank 2
 answered on 18 Apr 2013
2 answers
357 views
I have a radgrid and have enabled filtering. I have restricted the filtering to contains only. The problem is that when I enter in some filter text it fires the ItemCommand event which is fine but, it does not filter the grid. If I re-type the filter string again it fires the ItemCommand event again and the second time and any more subsequent attempts work as expected resulting in the grid being filtered. This is so wierd and I have no idea whi I have to type in a filter string twice to get it to work.

protected void policeGrid_ItemCommand(object sender, GridCommandEventArgs e)
       {
           if (e.CommandName == "Select")
           {
               var stationId = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["station_id"];
               Session["station_id"] = stationId;
 
               radAjaxMgr.ResponseScripts.Add("radopen('information.aspx','null')");
           }
       }


<telerik:RadWindowManager ID="rw" runat="server" ReloadOnShow="True"></telerik:RadWindowManager>
            <telerik:RadGrid ID="policeGrid" runat="server" AllowSorting="false" Skin="Default" OnNeedDataSource="LoadPoliceTable" OnItemCommand="policeGrid_ItemCommand"
                GridLines="Both" AutoGenerateColumns="False" ShowFooter="false" AllowPaging="true"  AllowFilteringByColumn="true"
                PageSize="25" PagerStyle-AlwaysVisible="true" OnUpdateCommand="policeGrid_UpdateCommand" OnInsertCommand="policeGrid_InsertCommand"
                EnableLinqExpressions="false" OnDeleteCommand="policeGrid_DeleteCommand" GroupingEnabled="True" ShowGroupPanel="True"
                GroupPanel-Enabled="True">
                <ClientSettings AllowDragToGroup="True"/>
                <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" />
                <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top" DataKeyNames="station_id"
                    NoMasterRecordsText="No current police." TableLayout="Fixed" CommandItemSettings-ShowRefreshButton="False">
                    <RowIndicatorColumn Visible="False">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="btnEdit" ButtonType="ImageButton" EditText="Edit" Resizable="False" >
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                            <HeaderStyle Width="15px" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn UniqueName="infoPolice" ButtonType="ImageButton" ImageUrl="../../RadControls/Grid/Skins/info.png" CommandName="Select" Text="Info">
                            <HeaderStyle Width="15px" />
                        </telerik:GridButtonColumn>
                        <telerik:GridBoundColumn DataField="STATION_ID" HeaderText="STATION_ID" UniqueName="STATION_ID"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                            <HeaderStyle Width="50px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PRIMARY_CONTACT_ID" HeaderText="PRIMARY_CONTACT_ID" UniqueName="PRIMARY_CONTACT_ID"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                            <HeaderStyle Width="50px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="STATE_NAME" HeaderText="STATE_NAME" UniqueName="STATE_NAME"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
                            <HeaderStyle Width="75px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TROOP" UniqueName="TROOP" HeaderText="TROOP"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                            <HeaderStyle Width="75" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PH_HAZMAT" HeaderText="PH_HAZMAT" UniqueName="PH_HAZMAT"
                            AllowFiltering="True" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                            <HeaderStyle Width="75px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn ConfirmText="Delete this group?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                            UniqueName="DeleteColumngroups" Visible="true">
                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                            <HeaderStyle Width="50px" />
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings UserControlName="EditPolice.ascx" EditFormType="WebUserControl">
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
            </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 18 Apr 2013
2 answers
53 views
I have a webpage, with a RadAjaxManager, a RadAjaxLoadingPanel which contains RadGrid1, a second RadAjaxLoadingPanel which contains RadGrid2.  RadGrid2 has a template column which has a couple controls and an asp:ImageButton.  The desired functionality is when the ImageButton is pressed, it copies the rowdata and inserts it into RadGrid1.  This process works, however the row is not displayed in RadGrid1 until a page refresh happens.  Is there a way to trigger the reload of RadGrid1 after the ImageButton (from RadGrid2) is pressed?
Mike
Top achievements
Rank 1
 answered on 17 Apr 2013
5 answers
235 views
Hi Telerik team!
Thanks I want to say thank you for the good work you are doing on the support, really appreciate that!

So, lets go to the problem I have.

I need to show in a RadChart Bars the behaivor per month the booking I have been doing in each month and sum all the booking by month.
For example I have this in my data source:

<
Date    Booking
1/2/2013      2
3/2/2013      1
5/2/2013      2

1/3/2013      2
5/3/2013      6

1/4/2013      1

>

When I group on my RadChart will be this way
<
Month    Booking
1 5
3 8
4 1
>

What I want to show on my Chart is for the Y the value of the Booking and for the X the month (1,2,3,4...12), if the value Booking in a month doesnt exist then would be zero.
How could I group by month(include all month even if there are not Booking for that month).
Thanks in advance!!!

Petar Kirov
Telerik team
 answered on 17 Apr 2013
1 answer
136 views

Hi Telerik Team. I made a last post but no answer so I thought I didnt explain enough, so starting again. 
I need to show in a Chart bars during the current year (starting from January to december) the total of the booking done per month. 
For example I have on my DB table (BookingDate, BookingValue). 

BookingDate      BookingValue

1/1/2013              3
3/1/2013              6
13/2/2013            5
3/4/2013              3
13/4/2013            15

When I do a query to my DB I get a list of BookingObject: List<BookingObject>, this will be my ObjectDataSource.
What I need to do is to show all the booking per month in the current year. My X will be 1,2,3,4..12 months and my Y the BookingValue.
I need to show all month (1-12) even if I dont have booking for that month.

I was trying to do it but really dont have idea, how to Sum the bookingValue per month and Grouping by Month, because I have on the Object Date and not month. 
If anyone can help me I would appreciate it.
Thanks in advance.

Petar Kirov
Telerik team
 answered on 17 Apr 2013
3 answers
310 views
Hi
I'm having a problem with narrow columns, in that the filter icon is not visible: instead you have to faff around to try to select the teeny tiiny line that is visible.
Can anyone advise how to force the grid to display/give enough room for the filter icons?
It's my first Telerik grid, so there is nothing fancy going on behind the scenes!
Thanks!
Niki
Top achievements
Rank 1
 answered on 17 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?