I have grid like this:
On the gird, when i click the edit button, i am getting a text box with the value in it and also update and cancel links. I have 2 questions here:
1. After i click update how do i get the text box value below?
2. After i click update i want the update to be done( as shown in the code below) and the edit column(with update and cancel links) should disappear.
Also, as i used
i have button on the top of the grid which says Add new Item. now when i press this i am getting a textbox to add an Item. How do i get the value of this in code behind to insert into db ?
<telerik:RadGrid Width="100%" ID="RadTest" runat="server" AlternatingItemStyle-BackColor="#E4EBEF" AllowPaging="true" AllowSorting="true" PageSize="10" ShowStatusBar="true" Skin="WebBlue" AllowAutomaticUpdates ="true" AllowAutomaticInserts ="true" GridLines="None" EnableViewState="false" ItemStyle-CssClass="GridText" AlternatingItemStyle-CssClass="GridText"> <PagerStyle Mode="NextPrevAndNumeric" /> <GroupingSettings CaseSensitive="false" /> <MasterTableView Width="100%" AutoGenerateColumns="false" EnableColumnsViewState="false" CommandItemDisplay ="Top" CommandItemSettings-AddNewRecordText = "Add New Item" CommandItemSettings-ShowRefreshButton = "false"> <Columns> <telerik:GridEditCommandColumn HeaderStyle-Width = "40px" ButtonType="ImageButton" UniqueName="EditCommandColumn"> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="Name" HeaderText ="Item"> </telerik:GridBoundColumn> <telerik:GridButtonColumn ConfirmDialogHeight = "60" ItemStyle-Width = "70px" ConfirmText="Delete this item?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"> </ItemStyle> </telerik:GridButtonColumn> </Columns> </MasterTableView> <ClientSettings EnableRowHoverStyle ="true" /> </telerik:RadGrid>On the gird, when i click the edit button, i am getting a text box with the value in it and also update and cancel links. I have 2 questions here:
1. After i click update how do i get the text box value below?
2. After i click update i want the update to be done( as shown in the code below) and the edit column(with update and cancel links) should disappear.
Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)Dim item As GridEditFormItem = CType(e.Item, GridEditFormItem)
'code for updateRadTest.DataSource = NothingRadTest.Rebind()Also, as i used
CommandItemSettings-AddNewRecordText = "Add New Item"i have button on the top of the grid which says Add new Item. now when i press this i am getting a textbox to add an Item. How do i get the value of this in code behind to insert into db ?
Please help. Thanks.