Asp Radgrid, Get Cell values

3 posts, 1 answers
  1. Manuel
    Manuel avatar
    4 posts
    Member since:
    Sep 2011

    Posted 02 Jul 2018 Link to this post

    Hello,

     

    I have the following problem.

     

    I have a Radgrid with cells default value=0

    When i edit these cells for example i put the number 3 in the cell and click on save button

    I get always "0" when i read the cell value instead of the Value 3 which i entered.

     

    This is my code:

     

    telerik:RadGrid ID="GridVK" runat="server"  Culture="de-DE" AutoGenerateColumns="False" MasterTableView-EditMode="InPlace">
    <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
            <ClientSettings>
            <ClientEvents OnBatchEditClosed="batchEditClosed"  />
        </ClientSettings>
                <MasterTableView EditMode="Batch"  >
                    <BatchEditingSettings OpenEditingEvent="MouseUp" EditType="Cell" />
                    <RowIndicatorColumn Visible="False">
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn Created="True">
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="name" FilterControlAltText="Filter column1 column" HeaderText="Name" UniqueName="ColName">
                        </telerik:GridBoundColumn>
                        <telerik:GridNumericColumn DataField="Sells" DecimalDigits="2" FilterControlAltText="Filter column column" HeaderText="Sells" UniqueName="ColSells" EmptyDataText="0">
                        </telerik:GridNumericColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

     

    in VB:

            For Each item As GridDataItem In GridVK.Items
                     vk = New Selldata
                    vk.vkname = item("colname").Text
                    vk.solljanuar = item("ColSells").Text
              next

     


     

     

    Why did i get always "0" instead the value i entered?

    Sorry for my english.

     

    Regards

    Manuel

     

     

  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    4836 posts

    Posted 02 Jul 2018 Link to this post

    Hello Manuel,

    When working with Batch editing, and you want to read the data with your own code, you must use the BatchEditCommand event instead of loop through the items: https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/batch-editing/server-side-api.


    Regards,
    Marin Bratanov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Manuel
    Manuel avatar
    4 posts
    Member since:
    Sep 2011

    Posted 03 Jul 2018 in reply to Marin Bratanov Link to this post

    Hello Marin,

     

    Thank you :)

    This works

     

    Regards

     

    Manuel

     

Back to Top