Skip to content

Replies

0
Gunasekaran
Gunasekaran answered on May 7, 2008 3:17 AM

Thank you very much for your replay.

I already  solved the problem. im loading grid data in page load and i forget to put is post back = false.

Thanks for giving your suggetion.

Please let me know if you have any javascript function which i can use with web grid. like click event., double click event, hide control, visible control.

How can i open dialog window box when i click on web grid? please provide if you have any javascript code.

thank you very much in advance

have a nice day

0
Gunasekaran
Gunasekaran answered on May 7, 2008 3:12 AM

Hello HS2,

Thank you very much for your wonderfull support. You gave me better support then infragisitc support. I really appriciate.

I already able to solved that problem and now my code working very nice. Im Really happy for it. Thanks again.

Your first code working fine but because of my mistake (Forget to put page.ispostback =false in load time so every time datagrid have new source so old data is loossing).

If you dont mine i also have another issue if you have time then please let me know the answer for that. i already ask to infragisitc and then gave me answer but im not happy with it. this one is not so urgent so take your time no problem.

Quetion 1:

I have web dialog window, i want to hide and show in button click. but i want to use javascript code. i dont know how can i call javascript code from ASP.net code. not in html i want to call from .vb page.

Please provide me the function in java script to hide and show dialog window.

Please provide example code how can i call that function from .vb page.

 

Quetion 2:

I have web grid how can i get record in text box when i click. i have vb code but im looking for javascript code so page will not refresh on everyclick.

This is my Code what im using now planing to use javascript for it.

Protected Sub StatusGrid_Click(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.ClickEventArgs) Handles StatusGrid.Click

If e.Row Is Nothing = False Then

ID.Text = e.Row.Cells(0).GetText.ToString

'id

cmbDelegateTo.SelectedValue = e.Row.Cells(1).GetText.ToString

'Delegate Person

cmbDepartment.SelectedValue = e.Row.Cells(2).GetText.ToString

'Department

cmbDivision.SelectedValue = e.Row.Cells(3).GetText.ToString

'Division

txtStartDate.Value = e.Row.Cells(4).GetText.ToString

'StartDate

txtEndDate1.Value = e.Row.Cells(5).GetText.ToString

'End date

txtComment.Text = e.Row.Cells(6).GetText.ToString

'comments

btnEdit.Enabled =

True

btnDelete.Enabled =

True

e.Row.Selected =

True

Else

btnEdit.Enabled =

False

btnDelete.Enabled =

False

End If

End Sub

 

Thank you very much again for your help.

0
Gunasekaran
Gunasekaran answered on May 6, 2008 3:27 AM

Hello HS2

Thank you very much for your replay.

Im using Infragistic check box column. here you can see the code what im using. Im trying this code but every time im getiing "False" value.

Please guid me if im mistaken any place.

Protected

Sub StatusGrid_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.LayoutEventArgs) Handles StatusGrid.InitializeLayout

If Not Page.IsPostBack ThenDim col As New Infragistics.WebUI.UltraWebGrid.UltraGridColumn()

col.Key =

"CheckBox"

col.DataType =

"String"

 'col.DataType="Boolean"

col.HeaderText = ""

e.Layout.Bands(0).Columns.Insert(0, col)

col.Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox

col.AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes

col.Width = Unit.Pixel(20)

End If

End SubProtected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

'Dim ij As Boolean'Dim i As Integer

'For i = 0 To Me.StatusGrid.Rows.Count

' Me.StatusGrid.DisplayLayout.SelectTypeRowDefault = Infragistics.WebUI.UltraWebGrid.SelectType.Single

' ' Select the row 

' If Me.StatusGrid.DisplayLayout.Rows(i).Selected = True Then

' ij = StatusGrid.DisplayLayout.Rows(i).Cells(0).GetText.ToString

' End If

'Next

Dim blnStatus As Boolean = False

Dim SelRow As StringDim dgdRow As Infragistics.WebUI.UltraWebGrid.UltraGridRow

For Each dgdRow In StatusGrid.Rows

'If dgdRow.Cells(0).Value = 1 Then

'blnStatus = True

' End IfSelRow = dgdRow.Cells.FromKey("CheckBox").Value.ToString()

Next

End Sub

waiting for your replay.

Thanking you

 

0
Gunasekaran
Gunasekaran answered on May 5, 2008 1:10 PM

Thanks for your very fast replay. I used your code but still i can not get selected checkbox value.

For adding check box column im using this code.

If

Not Page.IsPostBack Then

Dim col As New Infragistics.WebUI.UltraWebGrid.UltraGridColumn()

col.Key = "CheckBox"

col.HeaderText =

""

e.Layout.Bands(0).Columns.Insert(0, col)

col.Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox

col.AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes

col.Width = Unit.Pixel(20)

End If

this code working very fine. but for find value for check box its not work. please help me if you have any other solution????

 

Thanking you

0
Gunasekaran
Gunasekaran answered on May 5, 2008 12:09 PM

Hi,

Im also looking for the same thing. I want to add check box and during run time i need to retrive check box value that is selected or not?

If you already found the solution please let me know. waiting for your replay.

Thanks in advance.