Looking for a way to hav a permanent edit field

4 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 25 Mar 2009 Link to this post

    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
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Mar 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 25 Mar 2009 Link to this post

    Thanks for answer Princy,

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

    CS
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Mar 2009 Link to this post

    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.
Back to Top