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

Select all column value in gridclientselectcolumn

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Swapnil
Top achievements
Rank 1
Swapnil asked on 09 Sep 2014, 10:56 AM
Hi,
i am having grid with 4 column and checkbox, after checking and on button click i can get employeeid(datakeyname of mastertableview) but how to get other three column value
<telerik:RadGrid ID="RadGridRMEmployee" runat="server"
         AllowMultiRowSelection="True"
         OnNeedDataSource="RadGridRMEmployee_NeedDataSource"
         onprerender="RadGridRMEmployee_PreRender">
         <ClientSettings Selecting-AllowRowSelect="true" AllowDragToGroup="True" EnablePostBackOnRowClick="true">
             <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True"></Selecting>
         </ClientSettings>
         <MasterTableView DataKeyNames="EmployeeIDl">
             <Columns>
                 <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
             </Columns>
             <PagerStyle AlwaysVisible="True"></PagerStyle>
         </MasterTableView>
     </telerik:RadGrid>


protected void btnSaveTask_Click(object sender, EventArgs e)
        {
           bool check;
            foreach (GridDataItem item in RadGridRMEmployee.SelectedItems)
            {
                CheckBox chk = (CheckBox)item["ClientSelectColumn"].Controls[0];
                string EmployeeID = item["EmployeeID"].Text;
 
//HOW TO GET THESE 3 VALUES
 
                string EmployeeName = item["EmployeeName"].Text;  
                string EmployeeType = item["EmployeeType"].Text;
                string EmployeeEmail = item["EmployeeEmail"].Text;
}
}

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 12 Sep 2014, 12:31 PM
Hello Swapnil,

Your approach seems correct. I've created a sample RadGrid web site using the provided code snippets to demonstrate a basic implementation. Please run the attached application and let me know if it helps you.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Swapnil
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or