Click here to Skip to main content
15,883,705 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Problem with Grid-multi view Pin
sris 4266-Nov-09 21:36
sris 4266-Nov-09 21:36 
QuestionCalling javascript for ASP textbox... Pin
greendragons4-Nov-09 3:53
greendragons4-Nov-09 3:53 
AnswerRe: Calling javascript for ASP textbox... Pin
Abhishek Sur4-Nov-09 4:26
professionalAbhishek Sur4-Nov-09 4:26 
GeneralRe: Calling javascript for ASP textbox... Pin
greendragons4-Nov-09 4:30
greendragons4-Nov-09 4:30 
GeneralRe: Calling javascript for ASP textbox... Pin
greendragons4-Nov-09 4:36
greendragons4-Nov-09 4:36 
GeneralRe: Calling javascript for ASP textbox... Pin
Not Active4-Nov-09 7:14
mentorNot Active4-Nov-09 7:14 
GeneralRe: Calling javascript for ASP textbox... Pin
Abhishek Sur4-Nov-09 8:30
professionalAbhishek Sur4-Nov-09 8:30 
QuestionHow to persist 'doubled up' usercontrol in a datalist and a repeater control across a postback - arghhh! Pin
Fu Manchu4-Nov-09 3:21
Fu Manchu4-Nov-09 3:21 
Hi guys,

I don't know which way to go with this i think ive exhausted all efforts. My usercontrol display information but when i click update a full page postback occurs and i lose everything, my control disappears!

I have an extremely large amount of data to display to the users, so using exsiting controls like a gridview is just silly. I've opted for a usercontrol that displays a set of prices by location and product. I have also given the user a couple of checkbox controls to be able to select groups of locations and groups of products.

Ive put my usercontrol in another with a datalist and a objectdatasource that gets a list of the locations and this accepts a productID, this is why im saying 'doubled up'. A usercontrol within a usercontrol! Not sure if this is the best solution? Because i cant directly access the control with a datalist?

On the main form, i have a repeater control with the usercontrol inside it. This repeats the locations selected (9 max) (created by the datalist) for every product (33 max) selected if you get me! Each control has an update button, but when its clicked the controls disappear.


Listed below is the second control:-


<asp:DataList ID="DataList1" runat="server" RepeatColumns="3" <br />
    DataSourceID="ObjectDataSource1"><br />
<br />
         <ItemTemplate><br />
<br />
	<br />
	   <uc1:CompanyPriceWidget ID="CompanyPriceWidget" runat="server" companyName='<%#Eval("Company.CompanyName")%>' <br />
	   productCost='<%#Eval("StockItemProductCostSterling")%>' retailSalePrice='<%#Eval("StockItemRetailSalePriceSterling")%>'<br />
	   productCostOverHead= '<%#Eval("StockItemProductCostOverHead")%>' retailSalePriceOverHead='<%#Eval("StockItemRetailSalePriceOverHead")%>'<br />
	   ExchangeRate='<%#Eval("Company.CurrencyExchangeRate.CurrencyRate")%>' companyId='<%#Eval("Company.CompanyID")%>' OnUpdateValues="CompanyPriceWidget_UpdateValues" /><br />
            <br />
	   <br />
	    </ItemTemplate><br />
<br />
        </asp:DataList>   <br />
     <br />
        <br />
<br />
  <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" <br />
               SelectMethod="GetListOfStockValueGroupedByCompany" <br />
               TypeName="StockValueSterlingDel" <br />
    OldValuesParameterFormatString="original_{0}"><br />
               <SelectParameters><br />
                   <asp:Parameter Name="stockItemPriceBandId" Type="Int32" /><br />
               </SelectParameters><br />
           </asp:ObjectDataSource><br />
<br />


On the Main Form
<br />
           <asp:Repeater ID="Repeater1" runat="server"><br />
<br />
        <ItemTemplate><br /><br />
<br />
        <h1><%#Eval("Description")%></h1><br />
<br />
            <uc2:StockValueWidget ID="StockValueWidget1" runat="server" StockItemPriceBandId='<%#Eval("StockItemPriceBandID")%>' /><br />
<br />
        </ItemTemplate><br />
<br />
        </asp:Repeater>    



The form runs fine, but when i click to update the values i.e a postbasck occurs my control disappears.
Does anyone know a way of doing this dynamically? Or knows how the repeater control works with usercontrols!

Thanks
Andy
AnswerRe: How to persist 'doubled up' usercontrol in a datalist and a repeater control across a postback - arghhh! Pin
Nishant Singh4-Nov-09 3:35
Nishant Singh4-Nov-09 3:35 
GeneralRe: How to persist 'doubled up' usercontrol in a datalist and a repeater control across a postback - arghhh! Pin
Nishant Singh4-Nov-09 3:42
Nishant Singh4-Nov-09 3:42 
GeneralRe: How to persist 'doubled up' usercontrol in a datalist and a repeater control across a postback - arghhh! Pin
Fu Manchu4-Nov-09 4:05
Fu Manchu4-Nov-09 4:05 
Questionload image Pin
Arefeh Haghpnah4-Nov-09 3:17
Arefeh Haghpnah4-Nov-09 3:17 
AnswerRe: load image Pin
Not Active4-Nov-09 3:37
mentorNot Active4-Nov-09 3:37 
GeneralRe: load image Pin
Arefeh Haghpnah5-Nov-09 7:36
Arefeh Haghpnah5-Nov-09 7:36 
GeneralRe: load image Pin
Not Active5-Nov-09 7:56
mentorNot Active5-Nov-09 7:56 
AnswerRe: load image Pin
Eduard Keilholz4-Nov-09 3:40
Eduard Keilholz4-Nov-09 3:40 
GeneralRe: load image Pin
Arefeh Haghpnah5-Nov-09 7:44
Arefeh Haghpnah5-Nov-09 7:44 
Questionloading image Pin
Raja Soosai4-Nov-09 2:44
Raja Soosai4-Nov-09 2:44 
AnswerRe: loading image Pin
Not Active4-Nov-09 3:34
mentorNot Active4-Nov-09 3:34 
GeneralRe: loading image Pin
Raja Soosai4-Nov-09 19:32
Raja Soosai4-Nov-09 19:32 
GeneralRe: loading image Pin
Not Active5-Nov-09 1:10
mentorNot Active5-Nov-09 1:10 
GeneralRe: loading image Pin
Raja Soosai10-Nov-09 2:00
Raja Soosai10-Nov-09 2:00 
Questionframework for Line-Of-Buisness applications Pin
Alexandr Sergeevich Ilyin4-Nov-09 2:44
Alexandr Sergeevich Ilyin4-Nov-09 2:44 
AnswerRe: framework for Line-Of-Buisness applications Pin
Bassam Saoud4-Nov-09 5:55
Bassam Saoud4-Nov-09 5:55 
GeneralRe: framework for Line-Of-Buisness applications Pin
Alexandr Sergeevich Ilyin4-Nov-09 18:49
Alexandr Sergeevich Ilyin4-Nov-09 18:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.