Click here to Skip to main content
15,913,939 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Localization doesn't work, please help!!! Pin
jaimachu14-Nov-07 3:52
jaimachu14-Nov-07 3:52 
GeneralRe: Localization doesn't work, please help!!! Pin
Urs Enzler14-Nov-07 3:58
Urs Enzler14-Nov-07 3:58 
GeneralRe: Localization doesn't work, please help!!! Pin
jaimachu16-Nov-07 1:38
jaimachu16-Nov-07 1:38 
GeneralRe: Localization doesn't work, please help!!! Pin
Urs Enzler16-Nov-07 2:11
Urs Enzler16-Nov-07 2:11 
GeneralRe: Localization doesn't work, please help!!! Pin
jaimachu30-Nov-07 0:39
jaimachu30-Nov-07 0:39 
QuestionHow to add Microsoft Word features to .Net application Pin
ugs197813-Nov-07 20:24
ugs197813-Nov-07 20:24 
AnswerRe: How to add Microsoft Word features to .Net application Pin
DigiOz Multimedia14-Nov-07 11:49
DigiOz Multimedia14-Nov-07 11:49 
QuestionAbout RowDataBound Pin
geeta pavate13-Nov-07 20:19
geeta pavate13-Nov-07 20:19 
Below code I have downDownlist in EditItemTemplate of gridview. I want to assign data source to downDownlist while editing the row. RowDataBound is called twice once before DropDownList is loaded and once after that.

Q1: So I need to check condition “Not e.Row.FindControl("DropDownList1") Is Nothing“. Is there any other way to know whether “DropDownList1“is loaded.

Q2: Why RowDataBound is called before DropDownList is loaded

<asp:TemplateField HeaderText="Dept">
<ItemTemplate>
<asp:Label runat="server" ID="Label1" Text='<%#GetDept(Container.DataItem) %>' ></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>

Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound


If GridView1.EditIndex >= 0 And Not e.Row.FindControl("DropDownList1") Is Nothing Then

CType(e.Row.FindControl("DropDownList1"), DropDownList).DataTextField = "DeptName"

CType(e.Row.FindControl("DropDownList1"), DropDownList).DataValueField = "DeptID"

CType(e.Row.FindControl("DropDownList1"), DropDownList).DataSource = ds.Tables(1)

CType(e.Row.FindControl("DropDownList1"), DropDownList).DataBind()

CType(e.Row.FindControl("DropDownList1"), DropDownList).SelectedValue = GridView1.DataKeys(e.Row.RowIndex)(1)

End If

End Sub

Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
GridView1.EditIndex = e.NewEditIndex
BindGridView()
End Sub


Thanks in advance,

Regards,
Geeta Pavate
QuestionTo use or not to use exceptions? Which is the preferred approach? Pin
boinske13-Nov-07 16:22
boinske13-Nov-07 16:22 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
ugs197813-Nov-07 20:34
ugs197813-Nov-07 20:34 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
Urs Enzler13-Nov-07 21:33
Urs Enzler13-Nov-07 21:33 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
Colin Angus Mackay14-Nov-07 23:21
Colin Angus Mackay14-Nov-07 23:21 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
Pete O'Hanlon15-Nov-07 0:16
mvePete O'Hanlon15-Nov-07 0:16 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
mabo4215-Nov-07 6:55
mabo4215-Nov-07 6:55 
AnswerRe: To use or not to use exceptions? Which is the preferred approach? Pin
PIEBALDconsult19-Nov-07 14:04
mvePIEBALDconsult19-Nov-07 14:04 
QuestionMSBuild - Building multiple projects Pin
Simon P Stevens13-Nov-07 5:06
Simon P Stevens13-Nov-07 5:06 
AnswerRe: MSBuild - Building multiple projects Pin
Scott Dorman13-Nov-07 12:45
professionalScott Dorman13-Nov-07 12:45 
GeneralRe: MSBuild - Building multiple projects Pin
Simon P Stevens15-Nov-07 1:39
Simon P Stevens15-Nov-07 1:39 
QuestionForm above another Form, but not TopMost? Pin
AndrewVos13-Nov-07 2:47
AndrewVos13-Nov-07 2:47 
AnswerRe: Form above another Form, but not TopMost? Pin
Luc Pattyn13-Nov-07 3:16
sitebuilderLuc Pattyn13-Nov-07 3:16 
GeneralRe: Form above another Form, but not TopMost? Pin
AndrewVos13-Nov-07 3:20
AndrewVos13-Nov-07 3:20 
QuestionReference of VB6 COM & Activex components in VB.net setup : Need urgent help [modified] Pin
nishkarsh_k12-Nov-07 23:46
nishkarsh_k12-Nov-07 23:46 
AnswerRe: Reference of VB6 COM & Activex components in VB.net setup : Need urgent help Pin
Paul Conrad13-Nov-07 13:01
professionalPaul Conrad13-Nov-07 13:01 
AnswerRe: Reference of VB6 COM & Activex components in VB.net setup : Need urgent help Pin
DigiOz Multimedia13-Nov-07 13:27
DigiOz Multimedia13-Nov-07 13:27 
QuestionLogonUserA API always throws 1326 (Incorrect Username and Password) Pin
Vasudevan Deepak Kumar12-Nov-07 22:48
Vasudevan Deepak Kumar12-Nov-07 22:48 

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.