Click here to Skip to main content
15,916,600 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionInsert Dynamic row in gridview with Dropdownlist [modified] Pin
kimo code8-Jul-08 23:03
kimo code8-Jul-08 23:03 
Questionadd required validator to dynamically created textbox Pin
eyeseetee8-Jul-08 22:31
eyeseetee8-Jul-08 22:31 
AnswerRe: add required validator to dynamically created textbox Pin
Sherin Iranimose8-Jul-08 22:44
Sherin Iranimose8-Jul-08 22:44 
GeneralRe: add required validator to dynamically created textbox Pin
eyeseetee8-Jul-08 22:51
eyeseetee8-Jul-08 22:51 
GeneralRe: add required validator to dynamically created textbox Pin
N a v a n e e t h8-Jul-08 22:54
N a v a n e e t h8-Jul-08 22:54 
GeneralRe: add required validator to dynamically created textbox Pin
eyeseetee8-Jul-08 22:56
eyeseetee8-Jul-08 22:56 
GeneralRe: add required validator to dynamically created textbox Pin
N a v a n e e t h8-Jul-08 23:09
N a v a n e e t h8-Jul-08 23:09 
GeneralRe: add required validator to dynamically created textbox Pin
eyeseetee9-Jul-08 0:03
eyeseetee9-Jul-08 0:03 
GeneralRe: add required validator to dynamically created textbox Pin
N a v a n e e t h9-Jul-08 1:01
N a v a n e e t h9-Jul-08 1:01 
GeneralRe: add required validator to dynamically created textbox Pin
eyeseetee9-Jul-08 2:45
eyeseetee9-Jul-08 2:45 
GeneralRe: add required validator to dynamically created textbox Pin
Imran Khan Pathan9-Jul-08 3:03
Imran Khan Pathan9-Jul-08 3:03 
GeneralRe: add required validator to dynamically created textbox Pin
eyeseetee9-Jul-08 3:09
eyeseetee9-Jul-08 3:09 
GeneralRe: add required validator to dynamically created textbox Pin
Imran Khan Pathan9-Jul-08 3:21
Imran Khan Pathan9-Jul-08 3:21 
Questionrepeating rows in datalist while i click 2nd or 3rd page navigation. Pin
subbu.sk8-Jul-08 22:30
subbu.sk8-Jul-08 22:30 
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 

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.