This is a migrated thread and some comments may be shown as answers.

Asp Radgrid, Get Cell values

2 Answers 292 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manuel
Top achievements
Rank 1
Manuel asked on 02 Jul 2018, 12:14 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 02 Jul 2018, 04:12 PM
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.
0
Manuel
Top achievements
Rank 1
answered on 03 Jul 2018, 09:56 AM

Hello Marin,

 

Thank you :)

This works

 

Regards

 

Manuel

 

Tags
Grid
Asked by
Manuel
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Manuel
Top achievements
Rank 1
Share this question
or