Click here to Skip to main content
15,890,741 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: TextBox OnChange Event Not Firing Pin
Not Active27-Jan-10 2:08
mentorNot Active27-Jan-10 2:08 
Questionselectedvalue in gridview dropdown Pin
arkiboys26-Jan-10 10:13
arkiboys26-Jan-10 10:13 
AnswerRe: selectedvalue in gridview dropdown Pin
Pranay Rana26-Jan-10 17:31
professionalPranay Rana26-Jan-10 17:31 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys26-Jan-10 18:13
arkiboys26-Jan-10 18:13 
GeneralRe: selectedvalue in gridview dropdown Pin
Pranay Rana26-Jan-10 18:30
professionalPranay Rana26-Jan-10 18:30 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys26-Jan-10 22:20
arkiboys26-Jan-10 22:20 
GeneralRe: selectedvalue in gridview dropdown Pin
Pranay Rana26-Jan-10 22:33
professionalPranay Rana26-Jan-10 22:33 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys26-Jan-10 22:38
arkiboys26-Jan-10 22:38 
error is:
Cannot implicitly convert type 'int' to 'string'

To help you find the cause here is what I have at present:

protected void grid_RowDataBound(object sender, GridViewRowEventArgs e)
{
//Sources dropdown in gridview...
DropDownList ddlgvSources = (DropDownList)e.Row.FindControl("ddlgvSources");
PopulateSourcesGridView(ddlgvSources);
//ddlSources.SelectedIndex = ddlgvSources.Items.IndexOf(ddlgvSources.Items.FindByValue(DataBinder.Eval(e.Row.DataItem, "SourceName").ToString()));
ddlSources.SelectedValue = ddlgvSources.Items.IndexOf(ddlgvSources.Items.FindByValue(DataBinder.Eval(e.Row.DataItem, "SourceName").ToString()));

}

//populate the dropdown list of the Sources in the GridView...
private void PopulateSourcesGridView(DropDownList ddl)
{
string strSourceID;
string strName;
int intSources;

DataTable dtSources = clsAccess.SourcesGet();
intSources = dtSources.Rows.Count;

ddl.Items.Clear();
for (int i = 0; i < intSources; i++)
{
strSourceID = dtSources.Rows[i]["SourceID"].ToString();
strName = dtSources.Rows[i]["SourceName"].ToString();

ddl.Items.Add(new ListItem(strName, strSourceID));
}
}
//////////////////////////////////
<EditItemTemplate>
<asp:DropDownList ID="ddlgvSources" runat="server" SelectedValue='<%# Eval("SourceName") %>'>
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("SourceName") %>'></asp:Label>
</ItemTemplate>
GeneralRe: selectedvalue in gridview dropdown Pin
Pranay Rana26-Jan-10 23:02
professionalPranay Rana26-Jan-10 23:02 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys26-Jan-10 23:10
arkiboys26-Jan-10 23:10 
GeneralRe: selectedvalue in gridview dropdown Pin
Pranay Rana26-Jan-10 23:14
professionalPranay Rana26-Jan-10 23:14 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys26-Jan-10 23:20
arkiboys26-Jan-10 23:20 
GeneralRe: selectedvalue in gridview dropdown Pin
Pranay Rana26-Jan-10 23:28
professionalPranay Rana26-Jan-10 23:28 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys26-Jan-10 23:56
arkiboys26-Jan-10 23:56 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys27-Jan-10 0:18
arkiboys27-Jan-10 0:18 
GeneralRe: selectedvalue in gridview dropdown Pin
arkiboys27-Jan-10 21:44
arkiboys27-Jan-10 21:44 
QuestionGridView Pin
arkiboys26-Jan-10 4:50
arkiboys26-Jan-10 4:50 
AnswerRe: GridView Pin
Not Active26-Jan-10 5:22
mentorNot Active26-Jan-10 5:22 
GeneralRe: GridView Pin
arkiboys26-Jan-10 10:07
arkiboys26-Jan-10 10:07 
Questiondropdowncontrol in Gridview asp.net 3.5 [modified] Pin
arkiboys26-Jan-10 3:32
arkiboys26-Jan-10 3:32 
AnswerRe: dropdowncontrol in Gridview asp.net 3.5 Pin
arkiboys26-Jan-10 5:09
arkiboys26-Jan-10 5:09 
Questionwebsite template Pin
AndyInUK26-Jan-10 2:05
AndyInUK26-Jan-10 2:05 
AnswerRe: website template Pin
Not Active26-Jan-10 5:19
mentorNot Active26-Jan-10 5:19 
AnswerRe: website template Pin
Matt Cavanagh26-Jan-10 6:47
Matt Cavanagh26-Jan-10 6:47 
QuestionPrint Crystal Report in Landscape Pin
Member 236481426-Jan-10 0:20
Member 236481426-Jan-10 0:20 

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.