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

Looking for a way to hav a permanent edit field

3 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 25 Mar 2009, 06:58 AM
Hello,

Is there some sample on having a grid field permanently in 'edit' mode to avoid having to cycle between normal/edit/update/normal mode of grid which necessitate many mouse clicks and callbacks ?
I am using the grid in an order form and I want users to be able to enter quantities using a RadInput and press recalculate without having to pilotate the edit mode.

Thanks
CS

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Mar 2009, 07:52 AM
Hello Christian,

You can place your entire grid in Edit mode as mentioned in the follwoing help document:
Default edit mode for grid items

You can also refer to the following online demo which provides an example of using a RadNumericTextBox:
RadNumericTextBox for Footer Totals

Thanks
Princy.
0
CSurieux
Top achievements
Rank 2
answered on 25 Mar 2009, 01:02 PM
Thanks for answer Princy,

But being always in edit mode leads to extremelly complicated codebehind, is there anything else ?

CS
0
Princy
Top achievements
Rank 2
answered on 26 Mar 2009, 05:10 AM
Hello Christian,

You can use a GridTemplateColumn with a RadTextBox in its ItemTemplate. Then on the TextChanged event of the textbox you can update the changes made to the datasource.
aspx:
<telerik:GridTemplateColumn UniqueName="TemplateColumn"
      <ItemTemplate> 
            <telerik:RadTextBox ID="RadTextBox1"  Text='<%#Bind("ContactName") %>' runat="server" AutoPostBack="True" OnTextChanged="RadTextBox1_TextChanged"
            </telerik:RadTextBox> 
       </ItemTemplate> 
</telerik:GridTemplateColumn> 

c#:
 protected void RadTextBox1_TextChanged(object sender, EventArgs e) 
    { 
        string strtxt = ((RadTextBox)sender).Text; 
        // query to update strtxt 
    } 

Thanks
Princy.
Tags
Grid
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
CSurieux
Top achievements
Rank 2
Share this question
or