Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
26 views
Hi. my question is pretty simple ( i think)
i have a standard html table. in a asp.net page.
i do not want to use radGrid or any other controls for this. (long story)
all i want is some how the ability to send to the api the entire DOM element and have that save on pdf.
is that possible? or must i use the RadControls on the page?

thanks
Kostadin
Telerik team
 answered on 27 Nov 2012
1 answer
143 views
Hi All,

I have a server control that contains a RadButton, and an associated RadMenu. I have this all working on the page as a stand-alone control.

However, when I click the RadButton, it raises the ItemCommand event for the grid, against the selected GridRow. When I click a menu item, it raises the internal event on the server control, but it is never passed out to the host page.

Ideally, I would like the Button and the Menu portions to expose their events to the host page through the same route (I've got a click event on the server control that both are raising, but I don't think I can hook into this from inside a grid unless I manage some ItemDataBound events - which I don't want the developer to have to do).

I know you can associate a context menu with the grid itself, but this isn't how I want the control to work. Each row has one of these controls, and each has it's own associated RadButton, and RadMenu. Unique to the row.

Is it possible to have the RadMenu inside my control raise the ItemCommand event on the associated grid? Alternatively, is there a way to handle the button click events on the row, without it raising the ItemCommand event?
Fergal
Top achievements
Rank 1
 answered on 27 Nov 2012
3 answers
88 views
Hi,

I'm having trouble getting the filtering to work on a RadGrid that I'm using.

I have a static RadGrid object on the .aspx page like this:
<telerik:RadGrid ID="rgCustomReport" AllowSorting="true" DataSourceID="odsCustomReport" PageSize="50"
 runat="server" OnItemCreated="rgCustomReport_ItemCreated" AllowPaging="true"
 AllowFilteringByColumn="true" EnableViewState="true"
 ShowFooter="true" AutoGenerateColumns="false" OnItemDataBound="rgCustomReport_ItemDataBound"
 Skin="WebBlue" OnPageSizeChanged="Grid_SizeChanged"
 OnSortCommand="rgCustomReport_SortCommand">
 <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" AlwaysVisible="true" />
</telerik:RadGrid>

The data for this grid is bound ultimately from a DataTable.AsDataView() call on a table that is generated through many functions on every single page postback.

The filter boxes show up fine on top of each column, but when I type in a value, then hit 'Contains' (for example) I get a really weird behaviour.  And I'm not sure how to evaluate it.

After the filter is entered the grid looks like this :

http://tinyurl.com/cjf6d66

Its adding blank columns on, and filter on the wrong column.

Any help is appreciated 
Thanks!


Andrey
Telerik team
 answered on 27 Nov 2012
6 answers
457 views
Hi, we have a RadGrid described below. The behavior it has now is that if you double click on a row it becomes editable, and if you move away from the row and single click anywhere on the grid the row is saved and the data on the grid is updated (reloaded).  We would like to modify the behavior so that the user can still double click to move from row to row on the grid to edit the fields, but the save is done when the user clicks a "Save" button. The code is shown below:

        <script type="text/javascript">
        <!--
    var hasChanges, inputs, dropdowns, editedRow;
            function RowClick(sender, eventArgs)
        {
        if(editedRow && hasChanges)
        {
            hasChanges = false;
            if(confirm("Update changes?"))
            {
                $find("<%= RadGrid1.MasterTableView.ClientID %>").updateItem(editedRow);
            }
        }
        }
  
        function RowDblClick(sender, eventArgs)
        {
            editedRow = eventArgs.get_itemIndexHierarchical();
        $find("<%= RadGrid1.MasterTableView.ClientID %>").editItem(editedRow);
        }
  
            function GridCommand(sender, args)
        {
            if (args.get_commandName() != "Edit")
            {
                editedRow = null;
            }
        }
  
        function GridCreated(sender, eventArgs)
        {
            var gridElement = sender.get_element();
            var elementsToUse = [];
            inputs = gridElement.getElementsByTagName("input");
        for (var i = 0; i < inputs.length;i++)
        {
            var lowerType = inputs[i].type.toLowerCase();
            if(lowerType == "hidden" || lowerType == "button")
            {
                        continue;
            }
                Array.add(elementsToUse, inputs[i]);
            inputs[i].onchange = TrackChanges;
        }
                  
        dropdowns = gridElement.getElementsByTagName("select");
        for (var i = 0; i < dropdowns.length;i++)
        {
            dropdowns[i].onchange = TrackChanges;
        }
  
        setTimeout(function(){if(elementsToUse[0])elementsToUse[0].focus();},100);
        }
  
        function TrackChanges(e)
        {
            hasChanges = true;
        }
        --> 
    </script>
</telerik:RadCodeBlock>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="Label1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
        </telerik:RadAjaxManager>
          
           <telerik:RadGrid 
            ID="RadGrid1" 
            DataSourceID="SessionDataSource1" 
            OnItemDataBound = "RadGrid1_ItemDataBound"
            Width="97%"
            ShowStatusBar="True" 
            AllowSorting="True" 
            PageSize="21" 
            GridLines="None" 
            AllowPaging="True"
            runat="server" 
            AllowAutomaticUpdates="True" 
            AutoGenerateColumns="False" >
            <MasterTableView 
                        TableLayout="Fixed" 
                        DataKeyNames="checklistNo" 
                        EditMode="InPlace" DataSourceID="SessionDataSource1"> <Columns>
                <telerik:GridBoundColumn UniqueName="CategoryID" DataField="CategoryID" HeaderText="CategoryID" Display="False" ReadOnly="True" >
                    <HeaderStyle Width="10%" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="checklistNo" DataField="checklistNo" HeaderText="checklistNo"  Display="False" ReadOnly="True" >
                    <HeaderStyle Width="25%" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="Related_item_type_label" DataField="Related_item_type_label" HeaderText="Question"  ReadOnly="True">
                    <HeaderStyle Width="30%" />
                </telerik:GridBoundColumn>
                 <telerik:GridTemplateColumn UniqueName="TemplateColumn">
                    <HeaderStyle Width="12%" />   
                    <ItemStyle Width="12%" />
                    <HeaderTemplate>     
                        <asp:Label ID="lblHeaderServiceImpact" Text="Service Impact" runat="server"></asp:Label>     
                    </HeaderTemplate>
                    <ItemTemplate>     
                        <asp:Label ID="lblServiceImpact1" Text='<%#Eval("Service_impact_category")%>' runat="server"></asp:Label>     
                    </ItemTemplate>     
                    <EditItemTemplate>
                       <telerik:RadTextBox AutoPostBack="true"  ReadOnly="true" ID="lbllblServiceImpact" runat="server"  Text='<%#Eval("Service_impact_category")%>' BorderStyle="None">
                       </telerik:RadTextBox>
                    </EditItemTemplate>
                 </telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn UniqueName="TemplateColumn1">
                    <HeaderStyle Width="16%" />   
                    <ItemStyle Width="16%" />
                    <HeaderTemplate>     
                        <asp:Label ID="lblHeaderInspectionResult" Text="Inspection Result" runat="server"></asp:Label>     
                    </HeaderTemplate>
                    <ItemTemplate>     
                        <asp:Label ID="lblInspectionResult1" Text='<%#Eval("INSPECTION_RESULT")%>' runat="server"></asp:Label>     
                    </ItemTemplate>     
                    <EditItemTemplate>
                       <telerik:RadTextBox AutoPostBack="true" visible="False" ID="lblInspectionResult" runat="server"  Text='<%#Eval("INSPECTION_RESULT")%>'>
                       </telerik:RadTextBox>
                       <telerik:RadComboBox visible="True" ID="cbInspectionResult" AppendDataBoundItems="true" runat="server" Width="100px" >
                       </telerik:RadComboBox>
                    </EditItemTemplate>
                 </telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn UniqueName="TemplateColumn2">
                    <HeaderStyle Width="16%" />   
                    <ItemStyle Width="16%" />
                    <HeaderTemplate>     
                        <asp:Label ID="lblHeaderInspectionFault" Text="Inspection Fault" runat="server"></asp:Label>     
                    </HeaderTemplate>
                    <ItemTemplate>     
                        <asp:Label ID="lblInspectionFault1" Text='<%#Eval("INSPECTION_FAULT")%>' runat="server"></asp:Label>     
                    </ItemTemplate>     
                    <EditItemTemplate>
                       <telerik:RadTextBox AutoPostBack="true" visible="False" ID="lblInspectionFault" runat="server"  Text='<%#Eval("INSPECTION_FaULT")%>'>
                       </telerik:RadTextBox>
                       <telerik:RadComboBox visible="True" ID="cbInspectionFault" AppendDataBoundItems="true" runat="server" Width="100px" >
                       </telerik:RadComboBox>
                    </EditItemTemplate>
                 </telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn UniqueName="TemplateColumn3">
                    <HeaderStyle Width="20%" />   
                    <ItemStyle Width="20%" />
                    <HeaderTemplate>     
                        <asp:Label ID="lblInspectionCommentHeader" Text="Comments" runat="server"></asp:Label>     
                    </HeaderTemplate>
                    <ItemTemplate>     
                        <asp:Label ID="lblInspectionComment" Text='<%#Eval("INSPECTION_COMMENT")%>' runat="server"></asp:Label>     
                    </ItemTemplate>     
                    <EditItemTemplate>
                       <telerik:RadTextBox AutoPostBack="true" visible="True" TextMode="MultiLine" Rows="2" ID="txtInspectionComment" runat="server"  Text='<%#Eval("INSPECTION_COMMENT ")%>'>
                       </telerik:RadTextBox>
                    </EditItemTemplate>
                 </telerik:GridTemplateColumn>
              </Columns>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents 
                    OnRowClick="RowClick"
                    OnRowDblClick="RowDblClick"
                    OnGridCreated="GridCreated" 
                    OnCommand="GridCommand" />
            </ClientSettings>
        </telerik:RadGrid>
        </asp:Panel>
        </td>
        </tr>
        </table>
          
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="180px" />
        <telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor1" runat="server" DropDownStyle-Width="70px" />
        <telerik:GridCheckBoxColumnEditor ID="GridCheckBoxColumnEditor1" runat="server" CheckBoxStyle-BorderWidth="2" />
        <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="50px" />
        <br />
        <asp:Label ID="Label1" runat="server" EnableViewState="false" />
        <br />
        <asp:SqlDataSource 
            ID="SessionDataSource1"
            runat="server" 
            ConnectionString="<%$ ConnectionStrings:OracleConnectionString %>"
            ProviderName="<%$ ConnectionStrings:OracleConnectionString.ProviderName %>" 
            SelectCommand="SELECT categoryid, category_name, checklistNo, ROWNUM || ') ' || related_item_type_label AS related_item_type_label, inspection_Result, inspection_fault, service_impact_category, inspection_comment FROM ( SELECT categoryid || ' - ' || category_name categoryid, category_name, checklistNo, MAX( related_item_type_label ) AS related_item_type_label, MAX( inspection_Result ) AS inspection_Result,MAX( inspection_fault ) AS inspection_fault, MAX( service_impact_category ) AS service_impact_category, MAX( inspection_comment ) AS inspection_comment FROM(SELECT categoryid,category_name,checklistNo,DECODE( INSTR( related_item_type,'INSPECTION_RESULT'),0,NULL, related_item_type_label ) related_item_type_label,DECODE( INSTR( related_item_type,'INSPECTION_RESULT'),0,NULL, DECODE( related_item_value, NULL, default_value, related_item_value ) ) inspection_Result,DECODE( INSTR( related_item_type,'INSPECTION_FAULT'),0,NULL, DECODE( related_item_value, NULL, default_value, related_item_value ) ) inspection_fault,DECODE( INSTR( related_item_type,'SERVICE_IMPACT_CATEGORY'),0,NULL, DECODE( related_item_value, NULL, default_value, related_item_value ) ) service_impact_category,DECODE( INSTR( related_item_type,'INSPECTION_COMMENT'),0,NULL, DECODE( related_item_value, NULL, default_value, related_item_value ) ) inspection_comment FROM( SELECT v.view_name,v.item_type_order,v.related_item_type_label,v.related_item_type,SUBSTR(v.related_item_type, -5) checklistNo,d.related_item_value,( SELECT valid_type_rule_value FROM pimmds.valid_type_rules r WHERE r.valid_type_rule = 'VALID VALUE DEFAULT' AND r.item_type = v.related_item_type AND SYSDATE BETWEEN r.effectivity_in AND r.effectivity_out ) default_value, d.created_by, DECODE( c.categoryid,NULL,'91',c.categoryid) AS categoryid,c.category_name FROM PIMMDS.relationship_views v,( SELECT a.item_type, a.item_value, b.item_type related_item_type, b.item_value related_item_value, c.created_by FROM pimods.items a, pimods.items b, pimods.relationships c WHERE a.item_no = c.parent_item_no AND b.item_no = c.child_item_no AND a.item_type = 'INSPECTION_SEQUENCE_NUMBER' AND a.item_value = :ISN AND SYSDATE BETWEEN c.effectivity_in AND c.effectivity_out) d,(SELECT SUBSTR(related_item_type,-2) categoryid, related_item_type_value category_name FROM pimmds.relationship_views v WHERE view_name = 'Clearwire Quality Control Checklist' AND related_item_type LIKE 'INSPECTION_CATEGORY%' AND SYSDATE BETWEEN v.effectivity_in AND v.effectivity_out ) c WHERE v.view_name = 'Clearwire Quality Control Checklist Update' AND ( v.related_item_type LIKE 'INSPECTION_RESULT%' OR v.related_item_type LIKE 'INSPECTION_FAULT%' OR v.related_item_type LIKE 'SERVICE_IMPACT_CATEGORY%' OR v.related_item_type LIKE 'INSPECTION_COMMENT%') AND substr(v.related_item_type,-5,2) = :CATEGORYID AND v.item_type = d.item_type (+) AND v.related_item_type = d.related_item_type (+) AND SUBSTR( v.related_item_type,-5,2) = c.categoryid (+) ) ) GROUP BY categoryid, category_name,checklistNo ORDER BY checklistNo )"
            UpdateCommand="PIMMDS.QC_PROCESS_DATA_FLOW.deltaRDSInspection"
            OldValuesParameterFormatString="original_{0}"
            ConflictDetection="CompareAllValues"
            UpdateCommandType="StoredProcedure">
            <UpdateParameters>
                <asp:Parameter Name="L_INSPECTION_SN" Type="String" />
                <asp:Parameter Name="L_LINE" Type="String" />
                <asp:Parameter Name="L_RESULTS" Type="String" />
                <asp:Parameter Name="L_FAULTS" Type="String" />
                <asp:Parameter Name="L_COMMENTS" Type="String" />
            </UpdateParameters>
            <SelectParameters>
                <asp:Parameter Name="ISN" Type="String" Direction="Input" />
                <asp:Parameter Name="CATEGORYID" Type="String" Direction="Input" />
            </SelectParameters>
        </asp:SqlDataSource>

The code behind is:

Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
    If TypeOf e.Item Is Telerik.Web.UI.GridEditableItem Then
        Dim MyItem As GridDataItem = CType(e.Item, GridDataItem)
        Dim newValues As Hashtable = New Hashtable
        e.Item.OwnerTableView.ExtractValuesFromItem(newValues, MyItem)
        Dim lineNumber As String = MyItem.KeyValues
    Else
        Throw New ApplicationException("Expecting GridEditFormItem type on UpdateCommand")
    End If
End Sub
Protected Sub RadGrid1_ItemUpdated(ByVal source As Object, ByVal e As GridUpdatedEventArgs) Handles RadGrid1.ItemUpdated
    Try
        Dim l_userName As String = bpimData.getUserName
        Dim item As GridEditableItem = e.Item
        Dim ltInspectionResult As RadComboBox = item.FindControl("cbInspectionResult")
        Dim ltInspectionFault As RadComboBox = item.FindControl("cbInspectionFault")
        Dim ltInspectionComment As RadTextBox = item.FindControl("txtInspectionComment")
        Dim MyItem As GridDataItem = CType(e.Item, GridDataItem)
        Dim newValues As Hashtable = New Hashtable
        e.Item.OwnerTableView.ExtractValuesFromItem(newValues, MyItem)
        Dim lineNumber As String = MyItem.KeyValues
        Dim results As String = ltInspectionResult.Text
        Dim faults As String = ltInspectionFault.Text
        Dim comments As String = ltInspectionComment.Text
        bpimData.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("ConnectionString")
        Dim inspectionSN As String = Session("ID")
        Dim lineNo As String = lineNumber.Substring(14, 5)
        Dim spUpdate As String = "Begin PIMMDS.QC_PROCESS_DATA_FLOW.gridSaveInspection('" + inspectionSN + "','" + lineNo + "','" + results + "','" + faults + "','" + comments + "','" + l_userName + "') ; end;"
        bpimData.execute_dml(spUpdate)
    Catch ex As Exception
    End Try
    If Not e.Exception Is Nothing Then
        e.KeepInEditMode = True
        e.ExceptionHandled = True
        'SetMessage(Server.HtmlEncode("Unable to update. Reason: " + e.Exception.Message).Replace("'", "'").Replace(vbCrLf, "<br />"))
    Else
        Dim dataItem As GridDataItem = e.Item
        'SetMessage("ProductID " & dataItem.GetDataKeyValue("ProductID") & " updated")
    End If
End Sub
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs)
    If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
        Dim item As GridEditableItem = e.Item
        ' --------------------------------------------------------------------------
        ' Update ComboBox for Inspection Result
        Dim lblserviceImpact As RadTextBox = item.FindControl("lbllblServiceImpact")
        Dim ltInspectionResult As RadTextBox = item.FindControl("lblInspectionResult")
        Dim irRadComboBox As RadComboBox = item.FindControl("cbInspectionResult")
        Dim inspectionResult As String
        If Not IsNothing(ltInspectionResult) Then
            If Not IsDBNull(ltInspectionResult.Text) Then
                inspectionResult = ltInspectionResult.Text
            Else
                inspectionResult = "N/A"
            End If
            If lblserviceImpact.Text = "Major" Then
                irRadComboBox.DataSource = Session("dtInspectionResultMajor")
            Else
                irRadComboBox.DataSource = Session("dtInspectionResultMinor")
            End If
            irRadComboBox.DataTextField = "INSPECTION_RESULT"
            irRadComboBox.DataValueField = "INSPECTION_RESULT"
            irRadComboBox.DataBind()
            If inspectionResult = "Pass" Then
                irRadComboBox.Items.Insert(0, New RadComboBoxItem("Pass"))
            Else
                irRadComboBox.Items.Insert(0, New RadComboBoxItem("Corrected"))
            End If
            irRadComboBox.SelectedValue = inspectionResult
        End If
        ' --------------------------------------------------------------------------
        'access/modify the edit item template settings here
        ' --------------------------------------------------------------------------
        ' Update ComboBox for Inspection Fault
        Dim ltInspectionFault As RadTextBox = item.FindControl("lblInspectionFault")
        Dim ifRadComboBox As RadComboBox = item.FindControl("cbInspectionFault")
        Dim inspectionFault As String
        If Not IsNothing(ltInspectionFault) Then
            If Not IsDBNull(ltInspectionFault.Text) Then
                inspectionFault = ltInspectionFault.Text
            Else
                inspectionFault = "N/A"
            End If
            ifRadComboBox.DataSource = Session("dtInspectionFault")
            ifRadComboBox.DataTextField = "INSPECTION_FAULT"
            ifRadComboBox.DataValueField = "INSPECTION_FAULT"
            ifRadComboBox.DataBind()
            ifRadComboBox.SelectedValue = inspectionFault
        End If
    ElseIf (TypeOf e.Item Is GridDataItem AndAlso Not e.Item.IsInEditMode AndAlso Page.IsPostBack) Then
        Dim item As GridDataItem = e.Item
        'Dim label As Label = Me.FindControl("Label1")
        ''update the label value
        'label.Text = Session("updatedValue")
    End If
End Sub
Private Sub ApplyTemplate(ByVal parent As String, ByVal template As String)
    Dim parentItem As RadMenuItem = RadMenu1.FindItemByText(parent)
    Dim _template As ITemplate = LoadTemplate(template)
    For Each item As RadMenuItem In parentItem.Items
        _template.InstantiateIn(item)
        item.DataBind()
    Next
End Sub
Private Sub selectedItem()
    Dim ChildItem As New RadMenuItem()
    Dim a As String
    a = "re"
End Sub
Srinivasaragavan
Top achievements
Rank 1
 answered on 27 Nov 2012
68 answers
604 views
Hi, I use client-side binding and export to PDF works strange:

below normal data-filled rows it shows a row with "No data" text.

Where is that from? Could it have something to do with custom paging?

Also, on page load, before the data is received from webservice, the grid shows tons of empty rows.
I've seen somewhere on forum I should put [e.Item.Display = 'none'] to fix this. Is there a better approach? As i understand, this just hides these rows vis display: none, but markup anyway is huge!

And more questions about PDF customization: why
this.MasterTableView.ItemStyle.BorderStyle
assigning in PDF export event does not work? I want to remove this ugly double border around some cells in PDF and remain single border only around data cells.
Is there a way to acquire somehow CSS class data in ItemCreated event and 'transform' them into inline style to preserve grid outlook?
Kostadin
Telerik team
 answered on 27 Nov 2012
1 answer
36 views
Hi,
You can change the color of the skin of radwindow maintaining the style?
example, the style meter has the blue menu bar, you can change the color, as well as for other objects telerik such as the loading panel?
Danail Vasilev
Telerik team
 answered on 27 Nov 2012
6 answers
174 views
Hi Guys

I saw the below link

http://demos.telerik.com/aspnet-ajax/treelist/examples/selecting/serversideselection/defaultcs.aspx

I did the same
My question?
When i select in checkbox it is reloading (I did not use ajax ) but even in the above link they used Ajaxmanager still loading image comes

Can we make not loadable when we choose check box?
Because client gets annoyed ......


Karthik.K
Daniel
Telerik team
 answered on 27 Nov 2012
1 answer
291 views
Hello
     I have to put the radgrid in insert mode on external button click. How can I accomplish this. Can anybody help.

thanks n regards
Savyo
Princy
Top achievements
Rank 2
 answered on 27 Nov 2012
1 answer
68 views
Hai
 Can somebody help me hide the pager combobox and pager size text? thanks in advance..
Allen
Shinu
Top achievements
Rank 2
 answered on 27 Nov 2012
2 answers
115 views
By expanding one by one of my main grid subgrillas I have no problems, but when I open and close and all I have left some of the grid lines that are not well, stay on top of the data

Expand all
Expand and Collapse
Expand and Collapse 2

<asp:Panel id="pnlVoyage" runat="server" width="1400">
<radG:RadGrid ID="RadGrid1" runat="server" PageSize="6"  Width="1400px" AllowMultiRowSelection="True" 
AllowPaging="True" AllowSorting="False"  AutoGenerateColumns="False" Skin="BDS" Visible="false">
 
<ClientSettings AllowDragToGroup="false" AllowGroupExpandCollapse="true"  AllowExpandCollapse = "true">
<Selecting AllowRowSelect="false" ></Selecting>
</ClientSettings>
<MasterTableView Width="100%" runat="server" AllowPaging="false" DataKeyNames="call_id" HierarchyLoadMode="Client">
<DetailTables>
<radG:GridTableView runat="server" DataKeyNames="call_id" Name="Table" Width="100%" HierarchyLoadMode="Client"
AllowAutomaticUpdates="true" AllowPaging="false" Font-Size="11px">
<Columns>
    <radG:GridBoundColumn ItemStyle-Width="123" HeaderStyle-Width="123" HeaderStyle-Height="21" ReadOnly="true"  HeaderText="" HeaderButtonType="TextButton" DataField="tipo"></radG:GridBoundColumn>
    <radG:GridBoundColumn ItemStyle-Width="190" HeaderStyle-Width="190"  ReadOnly="true"  HeaderText="Date" HeaderButtonType="TextButton" DataField="date"></radG:GridBoundColumn>
    <radG:GridBoundColumn ItemStyle-Width="100" HeaderStyle-Width="100" ReadOnly="true"  HeaderText="TEU Avail" HeaderButtonType="TextButton" DataField="TEUSTOTAL"></radG:GridBoundColumn>
    <radG:GridBoundColumn ItemStyle-Width="100" HeaderStyle-Width="100"  ReadOnly="true"  HeaderText="Weight Avail" HeaderButtonType="TextButton" DataField="WEIGHTTOTAL"></radG:GridBoundColumn>
    <radG:GridBoundColumn ItemStyle-Width="100" HeaderStyle-Width="100"  ReadOnly="true"  HeaderText="Plugs Avail" HeaderButtonType="TextButton" DataField="PLUGSTOTAL"></radG:GridBoundColumn>
</Columns>
</radG:GridTableView>
</DetailTables>
 
<Columns>
<radG:GridBoundColumn ItemStyle-Width="123" HeaderStyle-Width="123" ReadOnly="true"  HeaderText="Port" HeaderButtonType="TextButton" DataField="port_id"></radG:GridBoundColumn>
<radG:GridBoundColumn ItemStyle-Width="190" HeaderStyle-Width="190" ReadOnly="true"  HeaderText="Date" HeaderButtonType="TextButton" DataField="etd"></radG:GridBoundColumn>
 
<radG:GridTemplateColumn ItemStyle-Width="100" HeaderStyle-Width="100" HeaderText="TEU Avail" HeaderButtonType="TextButton" DataField="TEUSTOTAL">
<ItemTemplate>
    <%# IIf(DataBinder.Eval(Container.DataItem, "TEUSTOTAL") < 0, "<font color='red'>", "") %>
    <%# IIf(DataBinder.Eval(Container.DataItem, "TEUSTOTAL") = 0, "-", DataBinder.Eval(Container.DataItem, "TEUSTOTAL")) %>
    <%# IIf(DataBinder.Eval(Container.DataItem, "TEUSTOTAL") < 0, "</font>", "") %>
</ItemTemplate>
</radG:GridTemplateColumn>
<radG:GridTemplateColumn ItemStyle-Width="100" HeaderStyle-Width="100" HeaderText="Weight Avail" HeaderButtonType="TextButton" DataField="WEIGHTTOTAL">
<ItemTemplate>
    <%# IIf(DataBinder.Eval(Container.DataItem, "WEIGHTTOTAL") < 0, "<font color='red'>", "") %>
    <%# IIf(DataBinder.Eval(Container.DataItem, "WEIGHTTOTAL") = 0, "-", DataBinder.Eval(Container.DataItem, "WEIGHTTOTAL")) %>
    <%# IIf(DataBinder.Eval(Container.DataItem, "WEIGHTTOTAL") < 0, "</font>", "") %>
</ItemTemplate>
</radG:GridTemplateColumn>
<radG:GridTemplateColumn ItemStyle-Width="100" HeaderStyle-Width="100" HeaderText="Plugs Avail" HeaderButtonType="TextButton" DataField="PLUGSTOTAL">
<ItemTemplate>
    <%# IIf(DataBinder.Eval(Container.DataItem, "PLUGSTOTAL") < 0, "<font color='red'>", "") %>
    <%# IIf(DataBinder.Eval(Container.DataItem, "PLUGSTOTAL") = 0, "-", DataBinder.Eval(Container.DataItem, "PLUGSTOTAL")) %>
    <%# IIf(DataBinder.Eval(Container.DataItem, "PLUGSTOTAL") < 0, "</font>", "") %>
</ItemTemplate>
</radG:GridTemplateColumn>
</Columns>                   
</MasterTableView>
</radG:RadGrid>
</asp:Panel>
Eyup
Telerik team
 answered on 27 Nov 2012
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?