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 6676523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:59:57+00:00 2026-05-26T03:59:57+00:00

I have a RadGrid bound to SqlDataSource. All items are always in edit mode.

  • 0

I have a RadGrid bound to SqlDataSource. All items are always in edit mode.

protected void RadGPozycje_PreRender(object sender, EventArgs e)
{
    for (int i = 0; i < RadGPozycje.PageSize; i++)
    {
        RadGPozycje.EditIndexes.Add(i);
    }
    RadGPozycje.Rebind();
}

When bound, my cell “Vat” should change value to “zw” when value from database is equal to -1. I tried to do this like that:

private void RadGPozycje_ItemDataBound(object sender, GridItemEventArgs e)
{
    GridDataItem  item;
    item = e.Item as GridDataItem;
    if (item["Vat"].Text == "-1")
        item["Vat"].Text = "zw";
}

and it doesn’t work. How can I do this so it will work?

  • 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-05-26T03:59:57+00:00Added an answer on May 26, 2026 at 3:59 am

    I menaged to make it work at grid prerender instead of itemdatabound.

     protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
            foreach (GridDataItem it in RadGrid1.EditItems)
            {
                TextBox sv = (TextBox)it["POZ_Stawka_VAT"].Controls[0];
                if (sv.Text=="-1")
                sv.Text = "zw";
            }
        }
    
         protected void RadGrid1_DataBinding(object sender, EventArgs e)
        {
            for (int i = 0; i < RadGrid1.PageSize; i++)
            {
                RadGrid1.EditIndexes.Add(i);
            }
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a RadGrid bound to a LinqDataSource. The grid has auto generated Edit
I have a Telerik RadGrid that is bound to a Linq Datasource. On the
I have a RadGrid with a custom edit form ( FormTemplate ). The grid
I have a telerik:RadGrid that is bound to a SQL Data Source. One of
I have a Telerik RadGrid. The initial DataSource that is bound to the grid
I have a RadGrid control with template edit form implementation. I need to have
I have a RadContextMenu that is bound to a Radgrid. The context menu just
I have a RadGrid control and I'm defining the Edit Form for it. I
I have Telerik RadGrid with a custom edit form. In my edit form there
I have this Telerik radgrid | Encryption Key | Password to encode | Edit

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.