My aim is showing product availability in a dropdown by checking the
database issues and let user to change its value...
The Error :
ideefixesatisc.DataTextField = "Stokta Yok"
Object reference not set to an instance of an object.
In my edit item template i have a dropdown like that
//////////////////////////////
My function
Public Function SelectMyIndex(ByVal indexno As Boolean)
Dim ideefixesatisc As New DropDownList
If indexno = True Then
ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Var"
ideefixesatisc.SelectedIndex =
ideefixesatisc.Items.IndexOf(ideefixesatisc.Items. FindByValue(True))
End If
If indexno = False Then
ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Yok"
ideefixesatisc.SelectedIndex =
ideefixesatisc.Items.IndexOf(ideefixesatisc.Items. FindByValue(False))
End If
End Function
<asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%#
SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' >
<asp:ListItem Value ="True" >Stokta Var</asp:ListItem>
<asp:ListItem Value ="False" >Stokta Yok</asp:ListItem>
</asp:DropDownList>
/////////////// 3 4019
Savas,
Did you try it with the same cases for "CIdeefixeSatis". Identifiers as
strings are not a real part of the VBNet code and therefore (mostly) case
sensetive,
By the way, why did you sent this message to the newsgroup languages.csharp,
I don't see any C# code.
Cor
"Savas Ates" <in da clubschreef in bericht
news:er**************@TK2MSFTNGP02.phx.gbl...
My aim is showing product availability in a dropdown by checking the
database issues and let user to change its value...
The Error :
ideefixesatisc.DataTextField = "Stokta Yok"
Object reference not set to an instance of an object.
In my edit item template i have a dropdown like that
//////////////////////////////
My function
Public Function SelectMyIndex(ByVal indexno As Boolean)
Dim ideefixesatisc As New DropDownList
If indexno = True Then
ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Var"
ideefixesatisc.SelectedIndex =
ideefixesatisc.Items.IndexOf(ideefixesatisc.Items. FindByValue(True))
End If
If indexno = False Then
ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Yok"
ideefixesatisc.SelectedIndex =
ideefixesatisc.Items.IndexOf(ideefixesatisc.Items. FindByValue(False))
End If
End Function
<asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%#
SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' >
<asp:ListItem Value ="True" >Stokta Var</asp:ListItem>
<asp:ListItem Value ="False" >Stokta Yok</asp:ListItem>
</asp:DropDownList>
///////////////
Savas,
You use Uper and Lower cases in that identifier mixed up.
Cor
"Savas Ates" <in da clubschreef in bericht
news:uy**************@TK2MSFTNGP02.phx.gbl...
>I didnt understand what you meant ? What you meant by saying "CIdeefixeSatis" case ? How can i solve that problem ?
"Cor Ligthert [MVP]" <no************@planet.nl>, haber iletisinde şunları
yazdı:u2**************@TK2MSFTNGP05.phx.gbl...
>Savas,
Did you try it with the same cases for "CIdeefixeSatis". Identifiers as strings are not a real part of the VBNet code and therefore (mostly) case sensetive,
By the way, why did you sent this message to the newsgroup languages.csharp, I don't see any C# code.
Cor
"Savas Ates" <in da clubschreef in bericht news:er**************@TK2MSFTNGP02.phx.gbl...
>>My aim is showing product availability in a dropdown by checking the database issues and let user to change its value...
The Error : ideefixesatisc.DataTextField = "Stokta Yok" Object reference not set to an instance of an object.
In my edit item template i have a dropdown like that
//////////////////////////////
My function
Public Function SelectMyIndex(ByVal indexno As Boolean)
Dim ideefixesatisc As New DropDownList
If indexno = True Then
ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Var"
ideefixesatisc.SelectedIndex = ideefixesatisc.Items.IndexOf(ideefixesatisc.Item s.FindByValue(True))
End If
If indexno = False Then ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Yok"
ideefixesatisc.SelectedIndex = ideefixesatisc.Items.IndexOf(ideefixesatisc.Item s.FindByValue(False)) End If
End Function <asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%# SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' >
<asp:ListItem Value ="True" >Stokta Var</asp:ListItem> <asp:ListItem Value ="False" >Stokta Yok</asp:ListItem> </asp:DropDownList>
///////////////
I didnt understand what you meant ? What you meant by saying
"CIdeefixeSatis" case ? How can i solve that problem ?
"Cor Ligthert [MVP]" <no************@planet.nl>, haber iletisinde şunları
yazdı:u2**************@TK2MSFTNGP05.phx.gbl...
Savas,
Did you try it with the same cases for "CIdeefixeSatis". Identifiers as
strings are not a real part of the VBNet code and therefore (mostly) case
sensetive,
By the way, why did you sent this message to the newsgroup
languages.csharp, I don't see any C# code.
Cor
"Savas Ates" <in da clubschreef in bericht
news:er**************@TK2MSFTNGP02.phx.gbl...
>My aim is showing product availability in a dropdown by checking the database issues and let user to change its value...
The Error : ideefixesatisc.DataTextField = "Stokta Yok" Object reference not set to an instance of an object.
In my edit item template i have a dropdown like that
//////////////////////////////
My function
Public Function SelectMyIndex(ByVal indexno As Boolean)
Dim ideefixesatisc As New DropDownList
If indexno = True Then
ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Var"
ideefixesatisc.SelectedIndex = ideefixesatisc.Items.IndexOf(ideefixesatisc.Items .FindByValue(True))
End If
If indexno = False Then ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList)
ideefixesatisc.DataTextField = "Stokta Yok"
ideefixesatisc.SelectedIndex = ideefixesatisc.Items.IndexOf(ideefixesatisc.Items .FindByValue(False)) End If
End Function <asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%# SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' >
<asp:ListItem Value ="True" >Stokta Var</asp:ListItem> <asp:ListItem Value ="False" >Stokta Yok</asp:ListItem> </asp:DropDownList>
/////////////// This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gene McCrory |
last post by:
Is it possible to have a CustomValidator against two controls in an
EditItemTemplate on a DataGrid?
Case: Have a business rule that states if ATextBox starts with
"ACertainValue" then BTextBox...
|
by: VB Programmer |
last post by:
I have a datagrid with a dropdownlist in it. As I understand it, the
ItemTemplate section represents the cell when not in edit mode and the
EditItemTemplate section represents the cell when in...
|
by: yamne |
last post by:
I have a problem.
When I click in edit datagrid button I show two listbox and two button.
I use two button to move data between two listbox.
My problem is that I can't call the listbox in the...
|
by: George Durzi |
last post by:
When my datagrid is in edit mode, one of my columns is edited using a drop
down list.
I'm able to bind the DropDownList to a DataSource when in edit mode.
HOWEVER, I can't preset the...
|
by: NH |
last post by:
How can I only display the textbox I have in an EditItemTemplate based on the
value in another cell in the row?
i.e I only want users to edit one of the cells based on the value in another...
|
by: srini.venkatesan |
last post by:
I am trying to access a control from edititemtemplate in itemdatabound
event, but I get a run time null reference exception.
Class file :
In Datagrid_update I am able to access with no issues....
|
by: Steve Hershoff |
last post by:
Hi everyone,
I have a DataGrid with several TemplateColumns. One of these columns has an
EditItemTemplate that contains an ASP.Net DropDownList. I'm catching this
DropDownList's...
|
by: dotneto |
last post by:
Hi, I have a gridview with some templatecolumns, I need to retrieve the value from a textbos inside a edititemtemplate in the rowupdating event. I can get other controls using findcontrol method in...
|
by: vineetbindal |
last post by:
HI All,
I have a details view in which i have a template column which contains a item template which contains a label(lblUser).
i am displaying some values on the label using
...
|
by: pankajsingh5k |
last post by:
Hi guys,
These question is for all the experts...
Please help me before my brain explodes
The problem is again with the formview control..
I have a formview and i have to use it that...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |