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

I am using the radGrid and am updating values using edit forms.
 On the code behind I couldn't get the updated values that i entered in the text-boxes. It always shows the old values. I have tried two approaches. using the ExtractValuesFromItem(dictonaryObject, editedItem) method and Fetching the data from each edited field individually through the auto-generated column editors, which both seems not to work. here is the markup for the grid and the code behind.
I would appreciate if somebody can help me out with this issue. I only have a day.

 



<
tlrk:RadGrid ID="tlrkExpGrid" runat="server" CellSpacing="0" 

GridLines="None" AutoGenerateColumns = "False"  

OnUpdateCommand = "expDG_RowUpdating" >

 <MasterTableView commanditemdisplay="Top" EditMode = "EditForms" DataKeyNames = "ex_code">

 <Columns>
<tlrk:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn">

 <ItemStyle CssClass="MyImageButton"/>

 </tlrk:GridEditCommandColumn>

 <tlrk:GridBoundColumn DataField="ex_code" HeaderText="Code"  UniqueName="ex_code" >

 </tlrk:GridBoundColumn>

 <tlrk:GridBoundColumn DataField="ex_name" HeaderText="Name" UniqueName="ex_name" >

 </tlrk:GridBoundColumn>

 <tlrk:GridBoundColumn DataField="DUNS" HeaderText="DUNS" UniqueName="DUNS" >

 </tlrk:GridBoundColumn>

 <tlrk:GridBoundColumn DataField="email" HeaderText="Email" UniqueName="email" ColumnEditorID = "emailEditor">

 </tlrk:GridBoundColumn>

 <tlrk:GridButtonColumn ConfirmText="Delete this Exporter?" ConfirmDialogType="RadWindow"

 ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"

 UniqueName="DeleteColumn">

 <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />

</tlrk:GridButtonColumn>

 </Columns>

 <EditFormSettings>

 <EditColumn UniqueName="EditCommandColumn" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>

 </EditFormSettings>

  </MasterTableView>

 </tlrk:RadGrid>

 
protected

void expDG_RowUpdating(object source,Telerik.Web.UI.GridCommandEventArgs e)

 {

 GridEditableItem editedItem = e.Item as GridEditableItem;

 string expCode = (editedItem["ex_code"].Controls[0] as TextBox).Text;

 string expName = (editedItem["ex_name"].Controls[0] as TextBox).Text;

 string duns = (editedItem["DUNS"].Controls[0] as TextBox).Text;

string email = (editedItem["email"].Controls[0] as TextBox).Text;

//this is the first approach

 Hashtable newValues = new Hashtable();

 e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);

 

//this was the second approach trying to loop through each editor 

GridTextBoxColumnEditor editor = (GridTextBoxColumnEditor)editedItem.EditManager.GetColumnEditor("email");

TextBox t = editor.TextBoxControl;

string ee = t.Text;

GridEditableItem editedItem = e.Item as GridEditableItem;

 GridEditManager editMan = editedItem.EditManager;

  

 

 foreach( GridColumn column in e.Item.OwnerTableView.RenderColumns )

 {

 if ( column is IGridEditableColumn )

 {

  IGridEditableColumn editableCol = (column as IGridEditableColumn);

  if ( editableCol.IsEditable )

 {

  IGridColumnEditor editor = editMan.GetColumnEditor( editableCol );

  string editorType = editor.ToString();

  string editorText = "unknown";

  object editorValue = null;

 if ( editor is GridTextColumnEditor )

 {

 editorText = (editor as GridTextColumnEditor).Text;

 editorValue = (editor as GridTextColumnEditor).Text;

  }

}

}

}

 

Iana Tsolova
Telerik team
 answered on 24 Jun 2011
11 answers
119 views

I have RadChart with 30 items on X scale. They all have values 0, and I am not showing it (visible=false). I am doing it because I would like to show empty char, but with correct scale (if you don't add any items, there will be red label in center with text about missing data).

So far, so good. But the problem is the chart Y scale goes by default from -50 to +50. And now is my question -- how do you change it, to go from 0, to default (50 is fine)?

I added in ascx file the tags

<PlotArea>

<YAxis2 MinValue=0></YAxis2>
<YAxis MinValue=0></YAxis>

</PlotArea>

It does not work. So I added the equivalent of this in C# code, just after adding data. Still, no change. So how do you set this min value for Y scale?

eugen100
Top achievements
Rank 1
 answered on 24 Jun 2011
1 answer
197 views
I have a grid that was working fine, but I wanted to add a detail table to it.  When I did, it stopped working.  It's saying that it can't find a column that I am 100% sure exists.  I'm using an ObjectDataSource that returns an IList to bind the detail table with.  Is there something I'm missing?

<%@ Page Title="" Language="C#" MasterPageFile="~/AppMasterPage.master" AutoEventWireup="true" CodeFile="Research.aspx.cs" Inherits="MoneyOrder_Research" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <center>
        <table>
            <tr>
                <td style="color:Blue;font-size:large"><strong>Money Order Research</strong><br /></td>
            </tr>
            <tr>
                <td><asp:Label ID="errorLabel" runat="server" Font-Bold="True" Font-Size="Large"
                        Font-Underline="True" ForeColor="#990000"></asp:Label><br /></td>
            </tr>
        </table>
    </center>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">       
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="moGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="moGrid" LoadingPanelID="RadAjaxLoadingPanel1" />                       
                </UpdatedControls>
            </telerik:AjaxSetting>             
        </AjaxSettings>       
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue" />   
    <telerik:RadGrid ID="moGrid" runat="server" OnNeedDataSource="moGrid_NeedDataSource" ShowStatusBar="true" AllowFilteringByColumn="true" ShowFooter="true"
            AutoGenerateColumns="False" PageSize="15" AllowSorting="True" AllowPaging="True" GridLines="Vertical" ShowHeader="true" ShowGroupPanel="true"
            Skin="WebBlue" AlternatingItemStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
            FilterItemStyle-HorizontalAlign="Center" GroupingSettings-CaseSensitive="false">
        <ClientSettings AllowDragToGroup="True">       
        </ClientSettings>        
        <MasterTableView DataKeyNames="ID,Location" HierarchyLoadMode="Client">             
            <DetailTables>           
                <telerik:GridTableView Name="histTable" DataKeyNames="ID,Location,MOID,MOLoc" DataSourceID="histSource" AutoGenerateColumns="true">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="MOID" MasterKeyField="ID" />
                        <telerik:GridRelationFields DetailKeyField="MOLoc" MasterKeyField="Location" />
                    </ParentTableRelation>                   
                </telerik:GridTableView>
            </DetailTables
        <SortExpressions>
            <telerik:GridSortExpression FieldName="DateAdd" SortOrder="Descending" />
        </SortExpressions>
            <Columns>
                <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" Aggregate="Count"
                    DataField="ID" UniqueName="MO_ID" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"></telerik:GridBoundColumn>                                           
                <telerik:GridTemplateColumn SortExpression="Location" HeaderText="Location" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo"
                    DataField="Location" UniqueName="MO_Location" GroupByExpression="Location Group By Location"  AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true">
                    <ItemTemplate>
                        <asp:Label ID="MOLocationLbl" runat="server" Text='<%# Eval("Location") %>'></asp:Label>
                    </ItemTemplate>
                    <FilterTemplate>
                        <telerik:RadComboBox ID="locBox" runat="server" DataSourceID="locationSource" AppendDataBoundItems="true" Width="90px"
                            SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("MO_Location").CurrentFilterValue %>'
                            OnClientSelectedIndexChanged="SelectedLocIndexChanged" >
                            <Items>
                                <telerik:RadComboBoxItem runat="server" Text="All Locations" Value="" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="locFilterScript" runat="server">
                            <script type="text/javascript">
                                function SelectedLocIndexChanged(sendrer, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    tableView.filter("MO_Location", args.get_item().get_value(), "EqualTo");
                                }
                            </script>                               
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridTemplateColumn>                                           
                <telerik:GridBoundColumn SortExpression="ACROrder" HeaderText="Order #" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo"
                    DataField="ACROrder" UniqueName="MO_ACROrder" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"></telerik:GridBoundColumn>                                                           
                <telerik:GridBoundColumn SortExpression="Amount" HeaderText="Amount" HeaderButtonType="TextButton" FilterDelay="8000" DataField="Amount" Aggregate="Sum"
                    UniqueName="MO_Amount" AutoPostBackOnFilter="false" ShowFilterIcon="true" AllowFiltering="true" DataFormatString="{0:C}"></telerik:GridBoundColumn>                                                                           
                <telerik:GridTemplateColumn SortExpression="Status" HeaderText="Status" GroupByExpression="Status Group By Status" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo"
                    DataField="Status" UniqueName="MO_Status" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true">
                    <ItemTemplate>
                        <asp:Label ID="MOStatusLabel" runat="server" Text='<%# Eval("StatusText") %>'></asp:Label>
                    </ItemTemplate>
                    <FilterTemplate>
                        <telerik:RadComboBox ID="statusFilter" runat="server" DataSourceID="statusSource" DataTextField="Text" DataValueField="Value" Width="90px"
                            AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("MO_Status").CurrentFilterValue %>'
                            OnClientSelectedIndexChanged="SelectedStatusIndexChanged">
                            <Items>
                                <telerik:RadComboBoxItem runat="server" Text="All Statuses" Value="" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="filterStatusScriptBlock" runat="server">
                            <script type="text/javascript">
                                function SelectedStatusIndexChanged(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                    tableView.filter("MO_Status", args.get_item().get_value(), "EqualTo");
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn SortExpression="SuspActivityFlag" GroupByExpression="SuspActivityFlag Group By SuspActivityFlag" HeaderText="Suspicous" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo"
                    DataField="SuspActivityFlag" UniqueName="MO_SuspActivityFlag" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="false">
                    <ItemTemplate>
                            <asp:LinkButton ID="MOSuspActlbl" runat="server" Text='<%# Eval("SuspActivityFlag").ToString() == "Y" ? "Yes" : "No" %>'
                                ForeColor='<%# Eval("SuspActivityFlag").ToString() == "Y" ? System.Drawing.Color.Maroon : System.Drawing.Color.Black %>' URL='<%# Eval("suspLink") %>' OnClientClick="PopUp(this.URL);"></asp:LinkButton>
                        <telerik:RadScriptBlock ID="popupScript" runat="server">
                            <script type="text/javascript">
                                function PopUp(URL) {                                   
                                    if (URL != '') {
                                        day = new Date();
                                        id = day.getTime();
                                        window.open(URL, id, 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=850,height=700,left = 62,top = 15')
                                    }
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>              
                <telerik:GridTemplateColumn SortExpression="LogID" HeaderText="Log ID" GroupByExpression="LogID Group By LogID" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo"
                    DataField="LogID" UniqueName="MO_LogID" AutoPostBackOnFilter="false" ShowFilterIcon="true" AllowFiltering="true">
                    <ItemTemplate>
                        <asp:LinkButton ID="logLink" runat="server" Text='<%# Convert.ToInt32(Eval("LogID")) == -1 ? "N/A" : Eval("LogID") %>'
                            URL='<%# Eval("LogLink") %>' OnClientClick="PopUp(this.URL);"></asp:LinkButton>
                    </ItemTemplate>   
                </telerik:GridTemplateColumn>                                                           
                <telerik:GridBoundColumn SortExpression="UserName" HeaderText="User" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="Contains"
                    DataField="UserName" UniqueName="MO_UserName" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"></telerik:GridBoundColumn>                                                           
                <telerik:GridBoundColumn SortExpression="DateAdd" HeaderText="Date" HeaderButtonType="TextButton" FilterDelay="8000" DataField="DateAdd"
                    UniqueName="MO_DateAdd" AutoPostBackOnFilter="false" ShowFilterIcon="true" AllowFiltering="true" DataFormatString="{0:MM/dd/yyyy hh:mm tt}"></telerik:GridBoundColumn>                                                           
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    <asp:ObjectDataSource ID="statusSource" runat="server" SelectMethod="GetStatuses"
        TypeName="MO.Business.Defaults">
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="locationSource" runat="server" SelectMethod="GetLocations"
        TypeName="MO.Business.Defaults">
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="histSource" runat="server" SelectMethod="GetHistory"
        TypeName="MO.Business.Research"></asp:ObjectDataSource>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
</asp:Content>

I keep getting Cannot Find Column [MOID].  The stack trace looks like this:

[EvaluateException: Cannot find column [MOID].]
   System.Data.NameNode.Bind(DataTable table, List`1 list) +1173813
   System.Data.BinaryNode.Bind(DataTable table, List`1 list) +31
   System.Data.UnaryNode.Bind(DataTable table, List`1 list) +29
   System.Data.BinaryNode.Bind(DataTable table, List`1 list) +31
   System.Data.UnaryNode.Bind(DataTable table, List`1 list) +29
   System.Data.DataExpression.Bind(DataTable table) +59
   System.Data.DataExpression..ctor(DataTable table, String expression, Type type) +4833511
   System.Data.DataView.set_RowFilter(String value) +153
   System.Data.LinqDataView.set_RowFilter(String value) +53
   Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +405
   Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() +21

Thanks,
Aaron
Iana Tsolova
Telerik team
 answered on 24 Jun 2011
3 answers
219 views

Hi,

I want to have range on data field in DataTable in RadGrid, such DateTime, int, etc. How to get the range of them, such as min and max datetime and int?

Thanks.

Veli
Telerik team
 answered on 24 Jun 2011
1 answer
97 views
Hello ,

  I am facing a proble  when i am try to modify my child row in RAD Grid. following the my code base of gridl

<

 

 

telerik:RadGrid ID="rgSortCodes" runat="server"

 

 

 

OnItemDataBound="rgSortCodes_ItemDataBound"

 

 

 

OnUpdateCommand="rgSortCodes_UpdateCommand" OnDeleteCommand="rgSortCodes_DeleteCommand"

 

 

 

OnEditCommand="rgSortCodes_EditCommand" OnPageIndexChanged="rgSortCodes_PageIndexChanged"

 

 

 

OnPageSizeChanged="rgSortCodes_PageSizeChanged" OnCancelCommand="rgSortCodes_CancelCommand"

 

 

 

AllowPaging="True" PageSize="10" OnItemCreated="rgSortCodes_ItemCreated" ShowFooter="True"

 

 

 

GridLines="None" meta:resourcekey="rgSortCodesResource1" OnDetailTableDataBind="rgSortCodes_DetailTableBind" >

 

 

 

<ValidationSettings ValidationGroup="SortCodeGrid" />

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

<MasterTableView DataKeyNames="ID" AutoGenerateColumns="False" AllowAutomaticUpdates="true" AllowAutomaticDeletes="True" EditMode="InPlace" >

 

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView Width="50%" runat="server" EditMode="InPlace" AutoGenerateColumns="false" Name="Serial" ShowHeader="true" >

 

 

 

 

<ParentTableRelation>

 

 

 

<telerik:GridRelationFields MasterKeyField="ID" DetailKeyField="iSortID" />

 

 

 

</ParentTableRelation>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="iSortID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn Visible="true" DataField="ID"></telerik:GridBoundColumn>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="iSortID" UniqueName="iSortID">

 

 

 

<ItemTemplate>

 

 

 

<telerik:RadTextBox ID="txtSerialNumber" runat="server" MaxLength="30" Enabled="false" Text='<%# Bind("Serialnumber") %>'>

 

 

 

</telerik:RadTextBox>

 

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

 

<telerik:RadTextBox ID="txtSerialNumberEdit" runat="server" MaxLength="30" Text='<%# Bind("Serialnumber") %>'>

 

 

 

</telerik:RadTextBox>

 

 

 

</EditItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridEditCommandColumn EditText="Modify"

 

 

 

UniqueName="EditColumn" ButtonType="PushButton">

 

 

 

<ItemStyle Wrap="False"></ItemStyle>

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

 

<telerik:GridButtonColumn CommandName="Delete"

 

 

 

meta:resourcekey="GridButtonColumnResource1" Text="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" >

 

 

 

<ItemStyle Wrap="False"></ItemStyle>

 

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

<EditItemTemplate>

 

<

 

 

asp:Literal ID="litNoSortCodes" runat="server" Text="No data to display"

 

 

 

meta:resourcekey="litNoSortCodesResource1"></asp:Literal>

 

 

</

 

 

EditItemTemplate>

 

<

 

 

commanditemsettings exporttopdftext="Export to Pdf"></commanditemsettings>

 

<

 

 

Columns>

 

<

 

 

telerik:GridBoundColumn Aggregate="Count" DataField="OrderLineNumber" HeaderText="Line #"

 

 

 

meta:resourcekey="GridBoundColumnResource1" ReadOnly="True"

 

 

 

UniqueName="OrderLineNumber"></telerik:GridBoundColumn>

 

<

 

 

telerik:GridBoundColumn DataField="Action" HeaderText="Action"

 

 

 

meta:resourcekey="GridBoundColumnResource2" ReadOnly="True" UniqueName="Action"></telerik:GridBoundColumn>

 

<

 

 

telerik:GridBoundColumn DataField="MatItem" HeaderText="Sort Code"

 

 

 

meta:resourcekey="GridBoundColumnResource3" ReadOnly="True"

 

 

 

UniqueName="MatItem"></telerik:GridBoundColumn>

 

 

<

 

 

telerik:GridTemplateColumn>

 

<

 

 

HeaderTemplate>Serial# rqd?</HeaderTemplate>

 

<

 

 

ItemTemplate>

 

<

 

 

asp:DropDownList ID="drpSerialRQD" runat="server" Enabled="false">

 

<

 

 

asp:ListItem>Y</asp:ListItem>

 

<

 

 

asp:ListItem Selected="True">N</asp:ListItem>

 

<

 

 

asp:ListItem>ER</asp:ListItem>

 

</

 

 

asp:DropDownList>

 

</

 

 

ItemTemplate>

 

</

 

 

telerik:GridTemplateColumn>

 

<

 

 

telerik:GridTemplateColumn>

 

<

 

 

HeaderTemplate>Serial Number</HeaderTemplate>

 

<

 

 

ItemTemplate>

 

<

 

 

asp:TextBox ID="txtGridSerialNumber" runat="server" Enabled="false"></asp:TextBox>

 

</

 

 

ItemTemplate>

 

</

 

 

telerik:GridTemplateColumn>

 

<

 

 

telerik:GridBoundColumn DataField="DescriptionE" HeaderText="Description"

 

 

 

meta:resourcekey="GridBoundColumnResource4" ReadOnly="True"

 

 

 

UniqueName="Description"></telerik:GridBoundColumn>

 

 

<

 

 

telerik:GridNumericColumn DataField="CurrentQuantity" HeaderText="Current Quantity"

 

 

 

meta:resourcekey="GridNumericColumnResource1" ReadOnly="True"

 

 

 

UniqueName="CurrentQuantity"></telerik:GridNumericColumn>

 

<

 

 

telerik:GridNumericColumn DataField="RevisedQuantity"

 

 

 

HeaderText="Revised Quantity" meta:resourcekey="GridNumericColumnResource2"

 

 

 

UniqueName="RevisedQuantity"></telerik:GridNumericColumn>

 

<

 

 

telerik:GridNumericColumn DataField="UnitPrice" HeaderText="Unit Price"

 

 

 

meta:resourcekey="GridNumericColumnResource3" NumericType="Currency"

 

 

 

UniqueName="UnitPrice"></telerik:GridNumericColumn>

 

<

 

 

telerik:GridBoundColumn DataField="SAPLineNumber" HeaderText="SAP Line Number"

 

 

 

meta:resourcekey="GridBoundColumnResource12" ReadOnly="True"

 

 

 

UniqueName="SAPLineNumber"></telerik:GridBoundColumn>

 

<

 

 

telerik:GridEditCommandColumn EditText="Modify"

 

 

 

meta:resourcekey="GridEditCommandColumnResource1" UniqueName="EditColumn" ButtonType="PushButton">

 

 

 

<ItemStyle Wrap="False"></ItemStyle>

 

</

 

 

telerik:GridEditCommandColumn>

 

<

 

 

telerik:GridButtonColumn CommandName="Delete"

 

 

 

meta:resourcekey="GridButtonColumnResource1" Text="Cancel" UniqueName="DeleteColumn" ButtonType="PushButton">

 

 

 

<ItemStyle Wrap="False"></ItemStyle>

 

</

 

 

telerik:GridButtonColumn>

 

</

 

 

Columns>

 

</

 

 

MasterTableView>

 

</

 

 

telerik:RadGrid>

 




when i am try to click on the child's Modify button i am getting

Line: 938
Error: Sys.WebForms.PageRequestManagerServerErrorException: Cannot find column [iSortID]


I did all left right to find the solution.

Please help on this

Regards
Pradeep
Iana Tsolova
Telerik team
 answered on 24 Jun 2011
3 answers
131 views
I am trying to use a rad listview contol to display data from a SQL data table.  When the data is loading (binding) I need to examine the data columns and perform some modifications to the data and replace the value in one of the data fields with the modified data.  For example, there are three fields of data in the underlying query.  Field 'A' contains 'abc'.  Field 'B' contains '123'. Field 'C' contains an empty string.  I want to concatenate the contents of Fields 'A' and 'B' and the place the results 'abc123' in Field 'C' which is defined in the listview layout.

I do these (and other) sorts of modifications to data regularly when using the rad grid.  Can I do them when using your listview control as well?

When performing these operations in the grid, I use the "ItemDataBound" event and perform a test at the beginning of the event for "If TypeOf e.Item Is GridDataItem Then.....Else....End If" such as:

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
    If TypeOf e.Item Is GridDataItem Then
            sLat = ""
            sLong = ""
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        item("TextActive").Text = "Yes"
    End If
End Sub


I have tried doing something similar in the same event for the RadListView control, but always get errors -- you may refer to the attached screen capture.

Is there a way to modify the data to appear in the radlistview similarly to what I am doing with the radgrid?

Thanks in advance!

Lynn
Veli
Telerik team
 answered on 24 Jun 2011
3 answers
66 views
I have assigned multiple Group FilterExpressions to my ListView and am receiving the following error on postback:

"Index was out of range. Must be non-negative and less than the size of the collection."

Wondering if this indeed a bug or if I'm databinding my Listview incorrectly?  I'm using the NeedDataSource function of the ListView to load the data.  I have a button to "Apply Filter" that calls the RadListView1.Rebind method.  I've tried to trace but the error is thrown before any databinding occurs on the Listview (something to do with the Viewstate for the FilterExpressions on the ListView)?

Thanks for any help,
Jason
Veli
Telerik team
 answered on 24 Jun 2011
2 answers
53 views
Hi guys,

Does anyone know how to modify the Calendar Special Days from the JavaScript?
So it's like initially the special days contains 1 Day set to today, and then  I'd like to change it to tomorrow or any other date.

Thank you,
Best Regards,
Ronald Wisnu Hariyanto
Ronald
Top achievements
Rank 1
 answered on 24 Jun 2011
1 answer
90 views
Hi,
I try to export radgrid to excel file. In xls file, the header text of column name is center aligned. I want to have them left aligned. How to do it? Thanks.
Princy
Top achievements
Rank 2
 answered on 24 Jun 2011
9 answers
211 views
Hi,
                 I need some help guys . I need  a treeview to be inside a combobox that i know how to do .
But what i need i also need to filter the comboBox. Atleast  i need to filter the Parent Elements.
Help me guys .
Sankar
Karthik Kantharaj
Top achievements
Rank 1
 answered on 24 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?