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

Basic RadGrid (Crud) Questions

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 13 Aug 2014, 09:39 PM
We are new to RadGrids.

I was able to make a crud grid and I was able to pull in the data bound fields I wanted using a data source and automatic columns.  That works fine.  I was also able to remove the delete button through aspx code edits.  And I was able to select the theme I wanted.

Here are some issues.

1) I want to remove the 'add' button.  Don't know how.  Does it require javascript or c#?  If so could you give an example?
2) My edits won't stick.   I click the edit button and then click the confirm button and they just don't do anything. (this really shouldn't take code, am I wrong).  This is odd because the grid finds out the information from the database, so I should be able to edit it.
3) I don't want some of the column editable (I realize this could take some client side code or server side c# code).


Could you please guide me through these issues or link me to another threat or document that is directly relevant.  Show me step by step how how to make a grid that doesn't have an add button, actually does edit the database directly (with no coding, because that would defeat the purpose) and blocks some columns from being edited.


Thanks

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Aug 2014, 06:19 AM
Hi Kevin,

You can take a look at the following demo to know the working of Grid - Automatic Operations.
If you want to hide the Add new record button you can set MasterTableView->CommandItemSettings-ShowAddNewRecordButton="false".  To set some columns to read only you can set its ReadOnly property to true.

ASPX:
<telerik:RadGrid ID="rgrdSample" runat="server" . . >
    <MasterTableView  CommandItemDisplay="Top"
CommandItemSettings-ShowAddNewRecordButton="false">
          <Columns>
            <telerik:GridBoundColumn UniqueName="OrderID" DataField="OrderID" HeaderText="OrderID" ReadOnly="true">
            </telerik:GridBoundColumn>
          </Columns>
    </MasterTableView>
</telerik:RadGrid>

Thanks,
Shinu
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or