Click here to Skip to main content
15,895,011 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: repeating rows in datalist while i click 2nd or 3rd page navigation. Pin
eyeseetee8-Jul-08 22:39
eyeseetee8-Jul-08 22:39 
GeneralRe: repeating rows in datalist while i click 2nd or 3rd page navigation. Pin
subbu.sk8-Jul-08 23:07
subbu.sk8-Jul-08 23:07 
QuestionBinding Gridview with Third Normal from database Pin
Bharani_Ram8-Jul-08 21:57
Bharani_Ram8-Jul-08 21:57 
AnswerRe: Binding Gridview with Third Normal from database Pin
Sherin Iranimose8-Jul-08 22:50
Sherin Iranimose8-Jul-08 22:50 
AnswerRe: Binding Gridview with Third Normal from database Pin
Gayani Devapriya9-Jul-08 18:53
Gayani Devapriya9-Jul-08 18:53 
Questionsearching data from one form and displaying to another form Pin
Mamphekgo Bahula8-Jul-08 21:57
Mamphekgo Bahula8-Jul-08 21:57 
AnswerRe: searching data from one form and displaying to another form Pin
eyeseetee8-Jul-08 22:18
eyeseetee8-Jul-08 22:18 
QuestionSelecting a dropdownlist value in gridview edit mode [modified] Pin
Brendan Vogt8-Jul-08 21:47
Brendan Vogt8-Jul-08 21:47 
Hi,

I have a gridview that has an xml datasource. When I click on the edit link next to a record then the fields are displayed in edit mode. There is a drop down list (in the edit mode) as well displaying all the store locations. The store locations are also populated from another xml datasource.

Here is my StoreLocators.xml file (which populates the gridview):
<Deposits>
<Deposit StoreLocator="Shoprite Paarl" DepositID="1" ClientCITNo="G32428932" BranchNo="300932" />
</Deposits>

Here is my StoreLocators.xml file:

<StoreLocators>
<StoreLocator StoreLocatorID="ShopriteAlberton" StoreLocatorName="Shoprite Alberton" />
<StoreLocator StoreLocatorID="ShopriteBloemfontein" StoreLocatorName="Shoprite Bloemfontein" />
<StoreLocator StoreLocatorID="ShopritePaarl" StoreLocatorName="Shoprite Paarl" />
</StoreLocators>

I populate the dropdown like this:

protected void rgDeposits_ItemCreated(object source, GridItemEventArgs e)
{
if (e.Item is GridEditableItem &amp;&amp; e.Item.IsInEditMode)
{
DropDownList ddl = (DropDownList)e.Item.FindControl("rcStoreLocators");
ddl.DataSource = dsStoreLocators;
ddl.DataTextField = "StoreLocatorName";
ddl.DataValueField = "StoreLocatorID";
}
}

<EditItemTemplate>
<asp:DropDownList ID="rcStoreLocators" SelectedValue='<%# Eval("StoreLocatorID")%>' runat="server" />
</EditItemTemplate>

Error that I get:

DataBinding: 'System.Web.UI.WebControls.XmlDataSourceNodeDescriptor' does not contain a property with the name 'StoreLocatorID'.

So when the row goes into edit mode, I need the Shoprite Paarl to be selected as the default value. How do I do this?

Thanks
Brendan

<div class="ForumMod">modified on Wednesday, July 9, 2008 6:18 AM</div>
AnswerRe: Selecting a dropdownlist value in gridview edit mode Pin
eyeseetee8-Jul-08 22:34
eyeseetee8-Jul-08 22:34 
QuestionRe: Selecting a dropdownlist value in gridview edit mode Pin
Brendan Vogt8-Jul-08 23:55
Brendan Vogt8-Jul-08 23:55 
AnswerRe: Selecting a dropdownlist value in gridview edit mode Pin
eyeseetee8-Jul-08 23:59
eyeseetee8-Jul-08 23:59 
GeneralRe: Selecting a dropdownlist value in gridview edit mode Pin
Brendan Vogt9-Jul-08 0:26
Brendan Vogt9-Jul-08 0:26 
GeneralRe: Selecting a dropdownlist value in gridview edit mode Pin
eyeseetee9-Jul-08 0:38
eyeseetee9-Jul-08 0:38 
QuestionHow to make query string as read only. Pin
BalasubramanianK8-Jul-08 21:40
BalasubramanianK8-Jul-08 21:40 
AnswerRe: How to make query string as read only. Pin
eyeseetee8-Jul-08 22:22
eyeseetee8-Jul-08 22:22 
GeneralRe: How to make query string as read only. Pin
BalasubramanianK8-Jul-08 22:35
BalasubramanianK8-Jul-08 22:35 
GeneralRe: How to make query string as read only. Pin
BalasubramanianK8-Jul-08 22:51
BalasubramanianK8-Jul-08 22:51 
GeneralRe: How to make query string as read only. Pin
eyeseetee8-Jul-08 22:54
eyeseetee8-Jul-08 22:54 
AnswerRe: How to make query string as read only. Pin
N a v a n e e t h8-Jul-08 23:05
N a v a n e e t h8-Jul-08 23:05 
Questionproblem in Active director multiple domain for search user Pin
Piyush Vardhan Singh8-Jul-08 21:36
Piyush Vardhan Singh8-Jul-08 21:36 
QuestionHow to sort string-based numeric data?? Pin
Nada Adel8-Jul-08 21:10
Nada Adel8-Jul-08 21:10 
AnswerRe: How to sort string-based numeric data?? Pin
eyeseetee8-Jul-08 21:25
eyeseetee8-Jul-08 21:25 
GeneralRe: How to sort string-based numeric data?? Pin
Nada Adel8-Jul-08 21:30
Nada Adel8-Jul-08 21:30 
GeneralRe: How to sort string-based numeric data?? Pin
eyeseetee8-Jul-08 21:39
eyeseetee8-Jul-08 21:39 
GeneralRe: How to sort string-based numeric data?? Pin
eyeseetee8-Jul-08 22:25
eyeseetee8-Jul-08 22:25 

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.