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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:09:06+00:00 2026-05-25T06:09:06+00:00

I’ve been trying to find the workaround for the following problem for the last

  • 0

I’ve been trying to find the workaround for the following problem for the last couple of hours, but without any success. I’ve found many of the possible solutions on the Internet, but none of them was solution to my problem. I’ve also posted the same question on official Telerik’s forum even though I’m almost sure that I’ll get no response from them.

The problem occurs when I want to insert data into empty datasource. I’ve been able to find workarounds for RadComboBoxes, but not for the Textboxes. The error that is displayed is: “DataBinding: ‘Telerik.Web.UI.GridInsertionObject’ does not contain a property with the name ‘OpciPrioritet’.”

Here is the code:

.ascx (needed for RadGrid):

<table>
<tr>
    <td>
        Nadređeni ticket:
    </td>
    <td colspan="3">
        <telerik:RadComboBox ID="rcbNadredeniTicket" AppendDataBoundItems="true" runat="server"
            Width="455px">
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td>
        Prijavio:
    </td>
    <td colspan="3">
        <telerik:RadComboBox ID="rcbPrijavio" AppendDataBoundItems="true" runat="server"
            Width="455px">
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td>
        Asset:
    </td>
    <td colspan="3">
        <telerik:RadComboBox ID="rcbAsset" AppendDataBoundItems="true" runat="server" Width="455px">
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td>
        Opći prioritet:
    </td>
    <td>
        <asp:TextBox ID="txtOpciPrioritet" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.OpciPrioritet") %>'></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        Tip:
    </td>
    <td>
        <telerik:RadComboBox ID="rcbTip" runat="server">
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td>
        Status:
    </td>
    <td>
        <telerik:RadComboBox ID="rcbStatus" runat="server">
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td>
        Datum prijave:
    </td>
    <td>
        <asp:TextBox ID="txtDatumPrijave" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DatumPrijave") %>'></asp:TextBox>
    </td>
    <td>
        Vrsta prijave:
    </td>
    <td>
        <telerik:RadComboBox ID="rcbVrstaPrijave" Text='<%# DataBinder.Eval(Container, "DataItem.VrstaPrijave") %>'
            runat="server">
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td>
        Prioritet:
    </td>
    <td>
        <telerik:RadComboBox ID="rcbPrioritet" Text='<%# DataBinder.Eval(Container, "DataItem.Prioritet") %>'
            runat="server">
        </telerik:RadComboBox>
    </td>
    <td>
        Deadline:
    </td>
    <td>
        <asp:TextBox ID="txtDeadline" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DatumDo") %>'></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        Opis:
    </td>
    <td colspan="3">
        <asp:TextBox ID="txtOpis" runat="server" TextMode="MultiLine" Width="455px" Height="200px"
            Text='<%# DataBinder.Eval(Container, "DataItem.Opis") %>'></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        Zatvoren ticket:
    </td>
    <td>
        <asp:CheckBox ID="chkZatvoren" runat="server" Checked='<%# CheckNull(DataBinder.Eval(Container, "DataItem.Zatvoren")) %>' />
    </td>
</tr>
<tr>
    <td>
        Opis zatvorenog ticketa:
    </td>
    <td colspan="3">
        <asp:TextBox ID="txtOpisZatvorenog" runat="server" TextMode="MultiLine" Width="455px"
            Height="200px" Text='<%# DataBinder.Eval(Container, "DataItem.OpisZatvoren") %>'></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        Bilješke:
    </td>
    <td colspan="3">
        <asp:TextBox ID="txtBiljeske" runat="server" TextMode="MultiLine" Width="455px" Height="200px"
            Text='<%# DataBinder.Eval(Container, "DataItem.Biljeske") %>'></asp:TextBox>
    </td>
</tr>
<tr>
    <td>
        <asp:Button ID="btnUpdate" Text="Spremi" runat="server" CommandName="Update" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'>
        </asp:Button>
        <asp:Button ID="btnInsert" Text="Spremi" runat="server" CommandName="PerformInsert"
            Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>'></asp:Button>

        <asp:Button ID="btnCancel" Text="Odustani" runat="server" CausesValidation="False"
            CommandName="Cancel"></asp:Button>
    </td>
</tr>

.aspx.cs (only the needed code snippet):

        protected void gvTicketi_ItemDataBound(object sender, GridItemEventArgs e)
    {
        int idFirma = Convert.ToInt16(Request.QueryString["idt"]);

        if ((e.Item is GridEditFormItem) && e.Item.IsInEditMode )
        {
            GridEditFormItem editFormItem = (GridEditFormItem)e.Item;
            UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);

            TSEntities db = new TSEntities();
            Ticket ticket = new Ticket();
            TicketAsset ticketAsset = new TicketAsset();

            RadComboBox rcbTip = (RadComboBox)userControl.FindControl("rcbTip");
            rcbTip.Items.Add(new RadComboBoxItem("Incident"));
            rcbTip.Items.Add(new RadComboBoxItem("Reklamacija"));
            rcbTip.Items.Add(new RadComboBoxItem("Nova funkcionalnost"));
            rcbTip.DataBind();
            rcbTip.Text = "'<%# DataBinder.Eval(Container, 'DataItem.Tip') %>'";

            RadComboBox rcbStatus = (RadComboBox)userControl.FindControl("rcbStatus");
            rcbStatus.Items.Add(new RadComboBoxItem("New"));
            rcbStatus.Items.Add(new RadComboBoxItem("U radu"));
            rcbStatus.Items.Add(new RadComboBoxItem("On hold"));
            rcbStatus.Items.Add(new RadComboBoxItem("Pending"));
            rcbStatus.Items.Add(new RadComboBoxItem("Scheduled"));
            rcbStatus.Items.Add(new RadComboBoxItem("Canceled"));
            rcbStatus.Items.Add(new RadComboBoxItem("Completed"));
            rcbStatus.DataBind();
            rcbStatus.Text = "'<%# DataBinder.Eval(Container, 'DataItem.Status') %>'";

            RadComboBox rcbVrstaPrijave = (RadComboBox)userControl.FindControl("rcbVrstaPrijave");
            rcbVrstaPrijave.Items.Add(new RadComboBoxItem("Usmeno"));
            rcbVrstaPrijave.Items.Add(new RadComboBoxItem("Telefon"));
            rcbVrstaPrijave.Items.Add(new RadComboBoxItem("E-mail"));
            rcbVrstaPrijave.Items.Add(new RadComboBoxItem("Web"));
            rcbVrstaPrijave.DataBind();
            rcbVrstaPrijave.Text = "'<%# DataBinder.Eval(Container, 'DataItem.VrstaPrijave') %>'";

            RadComboBox rcbPrioritet = (RadComboBox)userControl.FindControl("rcbPrioritet");
            rcbPrioritet.Items.Add(new RadComboBoxItem("Low"));
            rcbPrioritet.Items.Add(new RadComboBoxItem("Normal"));
            rcbPrioritet.Items.Add(new RadComboBoxItem("High"));
            rcbPrioritet.Items.Add(new RadComboBoxItem("Odmah"));
            rcbPrioritet.DataBind();
            rcbPrioritet.Text = "'<%# DataBinder.Eval(Container, 'DataItem.Prioritet') %>'";

            RadComboBox rcbNadredeniTicket = (RadComboBox)userControl.FindControl("rcbNadredeniTicket");
            var nadredenTicketList = (from t in db.Ticket
                                        select t).ToList();

            if (nadredenTicketList.Count > 0)
            {
                rcbNadredeniTicket.DataSource = from t in nadredenTicketList
                                                where t.idFirma == idFirma && t.Zatvoren == false
                                                select new { t.idTicket, t.idNadredeniTicket, OpisTicketa = t.idTicket + " - " + t.Opis };

                rcbNadredeniTicket.DataTextField = "OpisTicketa";
                rcbNadredeniTicket.DataValueField = "idTicket";
                rcbNadredeniTicket.Text = "'<%# DataBinder.Eval(Container, 'DataItem.idNadredeniTicket') %>'";
            }

            rcbNadredeniTicket.Items.Add(new RadComboBoxItem("Bez nadređenog ticketa", "0"));
            rcbNadredeniTicket.DataBind();

            RadComboBox rcbPrijavio = (RadComboBox)userControl.FindControl("rcbPrijavio");
            rcbPrijavio.DataSource = from k in db.Kontakt
                                     where k.idFirma == idFirma
                                     select new { k.idKontakt, kontaktNaziv = k.Ime + " " + k.Prezime };

            rcbPrijavio.Items.Add(new RadComboBoxItem("Bez kontakta", "0"));
            rcbPrijavio.DataTextField = "kontaktNaziv";
            rcbPrijavio.DataValueField = "idKontakt";
            rcbPrijavio.Text = "'<%# DataBinder.Eval(Container, 'DataItem.idKontakt') %>'";
            rcbPrijavio.DataBind();

            RadComboBox rcbAsset = (RadComboBox)userControl.FindControl("rcbAsset");
            var assetList = (from a in db.Asset
                             where a.idFirma == idFirma
                             select a).ToList();

            if (assetList.Count > 0)
            {
                var assets = from a in assetList
                             where a.idFirma == idFirma
                             select new { a.idAsset, Naziv = a.Naziv + " (" + a.Kontakt.Ime + " " + a.Kontakt.Prezime + ")" };

                rcbAsset.DataSource = assets;
                rcbAsset.DataTextField = "Naziv";
                rcbAsset.DataValueField = "idAsset";
                rcbAsset.Text = "'<%# DataBinder.Eval(Container, 'DataItem.Naziv') %>'";
                rcbAsset.Items.Add(new RadComboBoxItem("Bez pridruženog asseta", "0"));
                rcbAsset.DataBind();
            }                             


            if (!e.Item.OwnerTableView.IsItemInserted)
            {
                int idTicket = Convert.ToInt32(editFormItem.GetDataKeyValue("idTicket"));
                ticket = db.Ticket.SingleOrDefault(t => t.idTicket == idTicket);

                string tip = ticket.Tip;
                rcbTip.Items.FindItemByText(tip).Selected = true;

                string status = ticket.Status;
                rcbStatus.Items.FindItemByText(status).Selected = true;

                string vrstaPrijave = ticket.VrstaPrijave;
                rcbVrstaPrijave.Items.FindItemByText(vrstaPrijave).Selected = true;

                string prioritet = ticket.Prioritet;
                rcbPrioritet.Items.FindItemByText(prioritet).Selected = true;

                int kontakt = Convert.ToInt32(ticket.idKontakt);

                if (ticket.idKontakt == null)
                {
                    rcbPrijavio.Items.FindItemByValue("0").Selected = true;
                }
                else
                {
                    rcbPrijavio.Items.FindItemByValue(kontakt.ToString()).Selected = true;
                }

                int nadredeniTicket = Convert.ToInt32(ticket.idNadredeniTicket);

                if (ticket.idNadredeniTicket == null)
                {
                    rcbNadredeniTicket.Items.FindItemByValue("0").Selected = true;
                }
                else
                {
                    rcbNadredeniTicket.Items.FindItemByValue(nadredeniTicket.ToString()).Selected = true;
                }

                var ticketAssetCount = from ta in db.TicketAsset
                                       where ta.idTicket == idTicket
                                       select ta;                  

                if (ticketAssetCount.Count() > 0)
                {
                    ticketAsset = db.TicketAsset.SingleOrDefault(ta => ta.idTicket == idTicket);

                    int asset = Convert.ToInt32(ticketAsset.idAsset);

                    rcbAsset.Items.FindItemByValue(asset.ToString()).Selected = true;
                }
                else
                {
                    rcbAsset.Items.FindItemByValue("0").Selected = true;
                }
            }
            else if (e.Item.OwnerTableView.IsItemInserted)
            {
                var newVals = new System.Collections.Specialized.ListDictionary();
                newVals["OpciPrioritet"] = string.Empty;
                e.Item.OwnerTableView.InsertItem(newVals);
            }
        }
    }

.aspx:

    <telerik:RadGrid ID="gvTicketi" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" CellSpacing="0" GridLines="None" 
    onneeddatasource="gvTicketi_NeedDataSource" 
    onitemdatabound="gvTicketi_ItemDataBound" 
    oninsertcommand="gvTicketi_InsertCommand" 
    onupdatecommand="gvTicketi_UpdateCommand">
    <MasterTableView DataKeyNames="idTicket" CommandItemDisplay="TopAndBottom" InsertItemPageIndexAction="ShowItemOnCurrentPage">
        <CommandItemSettings AddNewRecordText="Dodaj novi ticket" RefreshText="Prikaži sve tickete" />
        <Columns>
            <telerik:GridBoundColumn UniqueName="idTicket" HeaderText="Ticket" DataField="idTicket">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="idKontakt" HeaderText="Kontakt" DataField="idKontakt">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="idManager" HeaderText="Manager" DataField="idManager">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Opis" HeaderText="Opis" DataField="Opis">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="TicketNumber" HeaderText="Broj ticketa" DataField="TicketNumber">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="DatumPrijave" HeaderText="Datum prijave" DataField="DatumPrijave" DataFormatString="{0:dd.MM.yyyy.}">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="VrstaPrijave" HeaderText="Vrsta prijave" DataField="VrstaPrijave">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Tip" HeaderText="Tip" DataField="Tip">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Status" HeaderText="Status" DataField="Status">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Prioritet" HeaderText="Prioritet" DataField="Prioritet">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="OpciPrioritet" HeaderText="Opći prioritet" DataField="OpciPrioritet">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Deadline" HeaderText="Deadline" DataField="DatumDo" DataFormatString="{0:dd.MM.yyyy.}">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn UniqueName="Zatvoren" HeaderText="Zatvoren" DataField="Zatvoren">
            </telerik:GridCheckBoxColumn>
            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete"
                ConfirmDialogType="RadWindow" ConfirmText="Brisanje ticketa!" />
        </Columns>
        <EditFormSettings UserControlName="UserControls/TicketUserControl.ascx" EditFormType="WebUserControl">
            <EditColumn UniqueName="EditCommandColumn1">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

I really hope you guys will be able to help me so any help would be appreciated!

  • 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-25T06:09:06+00:00Added an answer on May 25, 2026 at 6:09 am

    Ok, I was able to find a workaround. What you have to do is to add ItemCommand event.

    protected void gvTicketi_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.InitInsertCommandName)
            {
                e.Canceled = true;
                System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
                newValues["DatumPrijave"] = " ";
                newValues["DatumDo"] = " ";
                newValues["Opis"] = " ";
                newValues["OpisZatvoren"] = " ";
                newValues["Biljeske"] = " ";
                newValues["Zatvoren"] = false;
                newValues["Asset"] = "Bez pridruženog asseta";
    
                e.Item.OwnerTableView.InsertItem(newValues);
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
Seemingly simple, but I cannot find anything relevant on the web. What is the
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.