Hello! I have following code:
this.systemPointsGridView.MasterTemplate.DataSource
=
this.systemTableBindingSource;
...
this.systemTableBindingSource.DataMember
=
"SystemTable";
this.systemTableBindingSource.DataSource
=
this.projectDataSet;
...
projectDataSet is filling somewhere
and then
in order the results to be displayed
I have to write:
systemTableBindingSource.DataSource = projectDataSet;
So, the question is why do I have to reassign dataset to BindingSource
datasource property? I suppose that it should be done automatically, or
there should be method that I must call on binding source in order to
populate control with data.
It seems that I missed something in databinding mechanism...
Thanks in advance.
listBox1.Items.Add(message);
if (listBox1.Items.Count > 100)
{
listBox1.Items.RemoveAt(0);
}
listBox1.SelectedIndex = listBox1.Items.Count - 1;
listBox1.ClearSelected();
I want to use RadListControl because it can handle html syntax.
Please suggest something on this. I can even switch to another control which supports html code.
regards,
Bibek Dawadi
Private
Sub
txtBuscar_TextChanged(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
txtBuscar.TextChanged
wFirstVisibleRow = -1
Me
.gridArticulos.MasterTemplate.Refresh()
If
wFirstVisibleRow > 0
Then
Dim
wposcode
As
String
= gridArticulos.MasterTemplate.Rows(wFirstVisibleRow).Cells(0).Value.ToString
If
wposcode <>
""
Then
Me
.ArticulosSGFBindingSource.Position =
Me
.ArticulosSGFBindingSource.Find(
"CODIGO"
, wposcode)
End
If
End
If
End
Sub
Private
Sub
gridArticulos_CustomFiltering(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.WinControls.UI.GridViewCustomFilteringEventArgs)
Handles
gridArticulos.CustomFiltering
If
String
.IsNullOrEmpty(
Me
.txtBuscar.Text)
Then
e.Visible =
True
For
i
As
Integer
= 0
To
Me
.gridArticulos.ColumnCount - 1
e.Row.Cells(i).Style.Reset()
e.Row.InvalidateRow()
Next
Return
End
If
e.Visible =
False
For
i
As
Integer
= 0
To
Me
.gridArticulos.ColumnCount - 1
If
i <> 2
Then
Dim
text
As
String
= e.Row.Cells(i).Value.ToString()
If
text.IndexOf(
Me
.txtBuscar.Text, 0, StringComparison.InvariantCultureIgnoreCase) >= 0
Then
e.Visible =
True
If
wFirstVisibleRow = -1
Then
wFirstVisibleRow = e.Row.Index
End
If
e.Row.Cells(i).Style.CustomizeFill =
True
e.Row.Cells(i).Style.DrawFill =
True
e.Row.Cells(i).Style.BackColor = Color.FromArgb(201, 252, 254)
Else
e.Row.Cells(i).Style.Reset()
e.Row.InvalidateRow()
End
If
End
If
Next
End
Sub
For
Each
row
As
DataRow
In
ds_sn.Tables(
"sn_tbl_groups"
).Rows
Dim
tag
As
New
radmenuitem(row(1).ToString)
tag.CheckOnClick =
New
EventHandler(
AddressOf
GroupMenuclick)
Me
.btn_SpecificGroup.Items.Add(tag)
Next