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

Hide templates on insert?

3 Answers 130 Views
ListView
This is a migrated thread and some comments may be shown as answers.
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
ToltingColtAcres asked on 02 Jan 2013, 10:19 PM
I'm using a radlistview w/ a pagesize of 1 to simulate a winforms data entry screen for data collection on an ipad.

When I click to have the user add a new record, the current record is displayed at the top of the screen and a second insert record is displayed at the bottom.

Is there a way for me to only show the insertitemtemplate and hide the other templates when doing an insert?

Thanks,
Mike

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 Jan 2013, 05:45 PM
Hi Mike,

This is a custom functionality that depends on your logic and is not supported from the control. However, is you want the InsertedItemTemplate to be shown as first item you can use the code snippet below inside ItemCommand event:

RadListView1.InsertItemPosition = RadListViewInsertItemPosition.FirstItem;

Kind regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
answered on 07 Jan 2013, 06:23 PM
HI... Thanks for the response. This is what I am doing now, and I make the insert template just large enough such that it forces the existing record template "off" the screen (unless you scroll, of course :) ) which on the iPad has a "winforms" look and feel to it.

We're attempting to take an existing Winforms application running on tablet computers using merge replication and migrate it to a web-based iPad app w/o needing to retrain hundreds of sales reps, so the closest I can get the app to the existing Winforms program, the better.

Again, thanks for the help.    
0
Bill Dowis
Top achievements
Rank 1
answered on 06 Apr 2014, 11:29 AM
Hi Mike,

Try this:

​  protected void btnAddNew_Click(object sender, EventArgs e) {
    RadListView1.ShowInsertItem();   
    if (RadListView1.Items.Count > 0) {
      RadListView1.Items[0].Visible = false;
    }
  }
Tags
ListView
Asked by
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Answers by
Pavlina
Telerik team
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Bill Dowis
Top achievements
Rank 1
Share this question
or