Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8930711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:57:16+00:00 2026-06-15T08:57:16+00:00

I have textbox code in .aspx file as below <telerik:GridTemplateColumn UniqueName=Format HeaderText=Format DataField=SystemMessageTextId HeaderStyle-Width=60>

  • 0

I have textbox code in .aspx file as below

 <telerik:GridTemplateColumn  UniqueName="Format" HeaderText="Format" DataField="SystemMessageTextId" HeaderStyle-Width="60">
                <ItemTemplate>
                        <asp:Label runat="server" ID="lblFormat" Text='<%# Eval("Format") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="txtFormat" Text='<%# Bind("Format") %>' MaxLength="255"></asp:TextBox>
                    <span style="color: Red">*&nbsp;
                        <asp:RequiredFieldValidator ID="rfFormat" runat="server" ErrorMessage = "Please enter a valid Format value." ControlToValidate="txtFormat" Display="Dynamic"></asp:RequiredFieldValidator>
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>

The .aspx.cs file looks like below

 if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode))

 {
        GridEditableItem edititem = (GridEditableItem)e.Item;
       ((TextBox)(edititem["Format"].FindControl("txtFormat"))).Text = "pdf";
 }

I have this part in GridItemCreated function, but when I try it, the default value won’t show. Can someone help me with this?
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:57:17+00:00Added an answer on June 15, 2026 at 8:57 am

    Please try with the below code snippet.

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            TextBox txtFormat = (item.FindControl("txtFormat") as TextBox);
            txtFormat.Text = "Your text";
        }
    }
    

    If you want to assign/access data then its better to use ItemDataBound event.
    Suppose you want assign textchanged event to Textbox then if we have to use ItemCreated event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this code in my default aspx file : <body> <form id=form1 runat=server>
When i use the below code in webpage (.aspx file), it works fine; but
I have a textbox and a calendar extender, here's the code in page Default.aspx:
In my code I have one textbox and one button. Whatever place you type
Let's say we have the following code in a class: //class code TextBox t
I have code that overrides the TextBox ProcessCmdKey method: protected override bool ProcessCmdKey(ref Message
I have this code to update my SQL database from data in a textbox,
I have some PHP code which stores whatever is typed in a textbox in
Here is the code I have to create an UIAlertView with a textbox. UIAlertView
Hi all I have this code to check if an item from a textbox

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.