Now..the following statement is giving me error: Sys is undefined. var wRequest = new Sys.Net.WebRequest(); I have no clue whats been hapening, i have reinstalled latest ajax toolkit but it is still occuring.
S Rajput
Posts
-
var today = new Date(); is giving me this error: Microsoft JScript runtime error: Object expected -
var today = new Date(); is giving me this error: Microsoft JScript runtime error: Object expectedIt should work because it is a correct code. But what can be the reason for it to be failing? Everytime i try to declare any Date variable it gives me : Microsoft JScript runtime error: Object expected I have tried to reboot my pc still it doesnt work.. Is my Jscript engine corrupted or something?
-
var today = new Date(); is giving me this error: Microsoft JScript runtime error: Object expectedAbsolutely, I am using Visual studio 2008. I tried following code in studio 2005 now but i am getting same error. Not sure why it is occuring? Really strange.. Is there any other way to get todays date in some variable? function Test() { var today = new Date(); alert(today); } <asp:Button ID="Button1" runat="server" OnClientClick="Test();" Text="Button" /><br />
-
var today = new Date(); is giving me this error: Microsoft JScript runtime error: Object expectedI dont know why this statement is giving me error . I have written this in a Javascript file that is attached to my project. I am trying to declare a variable containing todays date. Can Anyone help please?
-
WPF Combobox not navigating to items on key pressThanks,that just gave me an idea of creating an AJax listsearch extender kind of control in WPF. Cheers
-
WPF Combobox not navigating to items on key pressI have removed the function, still its not working. It could be because the combobox contains nearlly 500 rows? Anyhow i am writing the keypress event function to achieve this. Thanks.
-
WPF Combobox not navigating to items on key pressapparently nothing, its an empty function.I believe the combobox should automatically select Marrylands from the list if user presses "M" key??
-
WPF Combobox not navigating to items on key pressHi.. Inside my code the combobox is not responding to key press events.. like if user presses M, combobox should select Marrylands in the dropdownlist like the ASP .net combobox does. Can anyone please help??? <ComboBox HorizontalAlignment="Right" Height="23" Name="cmbPortsFrom" KeyDown="cmbPortsFrom_KeyDown" Width="105" SelectedIndex="0" Grid.Row="2" Grid.Column="0" > <ComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel /> </ItemsPanelTemplate> </ComboBox.ItemsPanel> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Code}" FontSize="15" Height="20"/> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> codebehind: Dim lDataSource2 As ICollection(Of BusinessLayer.Ports) lDataSource2 = mBalObjPorts.getPortData() Me.cmbPortsFrom.ItemsSource = lDataSource2
-
Navigation Window in Xbap partial trust?Hi, Dim window As New NavigationWindow gives me security exception in partial trust mode. If i change my project to full trust, it works. I am trying to navigate to new window on button click event. Is there a way to do so in partial trust mode?? Dim window As New NavigationWindow Dim uri As New Uri("Pages/Wizard.xaml", UriKind.RelativeOrAbsolute) window.Source = uri window.Show()
-
WPF Datagrid?I have the same feeling,there must be a better way of doing it. Thanks for your help though!
-
WPF Datagrid?Just because i thought it will help me in future. If we fetch data from some table in database, into a observable collection. And then display that data in the grid. When the user edits the grid, changes are reflected in observable collection, is there a quick way to commit those changes in the database as well??
-
WPF Datagrid?Excellent,with observablecollection its working. Thanks a ton for guiding me!!! :-D
-
WPF Datagrid?Thanks for reply Christian.This is what i have done, dvMatrix = GetDataSource.DefaultView dgMatrix.ItemsSource = dvMatrix Datasource1 = GetDataSource() So, I am assigning itemsource using GetDataSource method which returns me a datatable. I will store it in a public datatable variable(DataSource1). So inside the btnSave_click event, Dim dt As DataTable Dim dr1 As DataRow dt = Datasource1 'i am using the datatable- DataSource1 Dim jk = dt.Rows.Count For Each dr1 In dt.Rows strFrom = dr1("PortsFrom") strTo = dr1("PortsTo") .... next Problem is, i am still getting original grid content not the modified content. Is there something i need to do inside dgMatrix_RowEditEnding function to update the datasource??
-
WPF Datagrid?Hello, What i am doing is, i am creating a Datatable based on values that user fills up in the form. Further i am assigning that datatable to the WPF datagrid to display the Grid. dgMatrix.ItemsSource = GetDataSource.DefaultView Now, as the user edits the grid and presses the SAVE button under the grid, I would like to save all the rows of the Grid into a new table in the database. Is there a way to loop through each row of the Grid and then inserting each record into the database?? In ASP.net i was using the following function: 'For Each row As GridViewRow In dgMatrix.Rows ' ' Dim checkbox As CheckBox = CType(row.FindControl("cbRows"), CheckBox) ' If checkbox.Checked Then ' Try ' Dim txtFromPorts As TextBox = CType(row.FindControl("txtPortsFrom"), TextBox) ' Dim txtToPorts As TextBox = CType(row.FindControl("txtPortsTo"), TextBox) ' Dim txtFType As TextBox = CType(row.FindControl("txtFareType"), TextBox) ' Dim txtFClass As TextBox = CType(row.FindControl("txtFareClass"), TextBox) ' Dim txtLowGAmt As TextBox = CType(row.FindControl("txtGrossAmtLow"), TextBox) ' Dim txtLowNAmt As TextBox = CType(row.FindControl("txtNettAmtLow"), TextBox) ' Dim txtHighGAmt As TextBox = CType(row.FindControl("txtGrossAmtHigh"), TextBox) ' Dim txtHighNAmt As TextBox = CType(row.FindControl("txtNettAmtHigh"), TextBox) ' Dim txtPeakGAmt As TextBox = CType(row.FindControl("txtGrossAmtPeak"), TextBox) ' Dim txtPeakNAmt As TextBox = CType(row.FindControl("txtNettAmtPeak"), TextBox) ' ' Dim dr As DataRow = dtNew.NewRow ' strFrom = txtFromPorts.Text ' strTo = txtToPorts.Text ' strFareType = txtFType.Text ' If txtFClass.Text.Trim <> "" Then ' strFareClass = txtFClass.Text ' End If ' If txtLowGAmt.Text <> "" Then ' strGrossLow = txtLowGAmt.Text ' End If ' If txtLowNAmt.Text <> "" Then ' strNettLow = txtLowNAmt.Text ' End If ' If txtHighGAmt.Text <> "" Then ' strGrossHigh = txtHighGAmt.Text ' End If
-
Multiselect mode not working for listview control containing a GridviewHi, i am trying to make a WPF listview control that contains a gridview. The problem is when i run the application, at one time user can select just 1 row of the grid. If user selects another row, the previous row selected is un-selected automatically i have tried using cntrl+ mouseclick still i can not select multiple grid view rows. What exactly i want to do is, i would like to display gridview's coloumn(0) value of all the selected rows(concatinating each value) in the some textbox. Can anyone Please help? My code is: <DataTemplate x:Key="FirstCell"> <StackPanel Orientation="Horizontal"> <CheckBox IsChecked="{Binding Path=IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}" > </CheckBox> </StackPanel> </DataTemplate> <ListView ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True" Name="ListView1" Margin="218,83,25,88" ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="ListView1_SelectionChanged" SelectionMode="Multiple"> <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch" /> <EventSetter Event="GotFocus" Handler="Item_GotFocus" /> </Style> </ListView.ItemContainerStyle> <ListView.View > <GridView x:Name="Grid1" > <GridViewColumn Header="Code" Width="70" > <GridViewColumn.CellTemplate> <DataTemplate> <TextBox Text="{Binding Path=Code}" Margin="-6,0,-6,0" x:Name="Codename"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Discription" Width="70" > <GridViewColumn.CellTemplate> <DataTemplate >