Protected Sub dgPatients_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.WebUI.UltraWebGrid.LayoutEventArgs) Handles dgPatients.InitializeLayout
If Not Page.IsPostBack Then
col.Key = "CheckBox"
col.HeaderText = "Select Products"
e.Layout.Bands(0).Columns.Insert(0, col)
col.Type = ColumnType.CheckBox
col.IsEditable()
col.Width = Unit.Pixel(50)
End If
End Sub
Hi I have one ultragrid which contains checkbox column, I used the following code to disable this column, but it did not work. The checkbox column was grayed but still can check or uncheck the checkbox in the column.
ultraGrid1.DisplayLayout.Bands[0].Columns["checkboxcolumnName"].CellActivation = Activation.Disabled;
I want to gray this column, also could not check or uncheck the checkbox in the column. Could you please help on this? Thanks a lot.
CSS Styles-
.CheckboxHeader_Checked
{
background-image: url(../images/CheckBoxChecked.gif);
}
.CheckboxHeader_Unchecked
background-image: url(../images/CheckBoxUnchecked.gif);
Grid Column should be this way -
<igtbl:UltraGridColumn HTMLEncodeContent="true" BaseColumnName="Covered" DataType="System.Boolean" IsBound="True"
Key="IsChecked" Type="CheckBox" Width="30px">
<HeaderStyle CssClass="CheckboxHeader_Unchecked" CustomRules="Background-repeat:no-repeat"
HorizontalAlign="Left" />
<Header Key="Checked">
<Image AlternateText="Select/Deselect" />
<SelectedStyle CssClass="CheckboxHeader_Unchecked" CustomRules="Background-repeat:no-repeat">
</SelectedStyle>
</Header>
<Footer Key="Checked">
</Footer>
<SelectedHeaderStyle CssClass="CheckboxHeader_Unchecked" CustomRules="Background-repeat:no-repeat">
</SelectedHeaderStyle>
</igtbl:UltraGridColumn>
Hi I tried Allowupadate set to Yes.
It shows enabled. But When I click on check box, I am not able to see the check mark on the box. same thing for all rows.
Any idea.
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
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.
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
Thank you very much again for your help.