Hello All....
i have this code ..
Private Sub GridBarang_CellEndEdit(sender As Object, e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles GridBarang.CellEndEdit
If e.ColumnIndex = 0 Then
If GridBarang.CurrentCell.Value = Nothing Then
MsgBox("test")
Else
Dim strSQL As String
strSQL = Nothing
strSQL = "SELECT KodeBarang, NamaBarang FROM MstBarang WHERE KodeBarang='" & GridBarang.CurrentRow.Cells(0).Value.ToString & "' ORDER BY KodeBarang"
Using conn As New OleDbConnection(str)
conn.Open()
cmd = New OleDbCommand(strSQL, conn)
rd = cmd.ExecuteReader
rd.Read()
If Not rd.HasRows Then
MsgBox("Tidak ada kode tersebut ")
Else
With GridBarang
.CurrentCell.Value = rd.GetString(0)
.CurrentRow.Cells(1).Value = rd.GetString(1)
End With
End If
rd.Close()
conn.Close()
End Using
End If
End If
End Sub
How to prevent add new row when after inserting new data ... and go to column(3) after edited column(0)
Thanks before....
Is it possible to cancel a Drag and Drop Operation like on TreeView?
http://docs.telerik.com/devtools/winforms/treeview/drag-and-drop/cancel-a-drag-and-drop-operation
I'd like to impose some restrictions on drop operation based on from/destination rows.
Thank you.
Leonardo
Hi,
I have a very special question.
Need to do this:
The user changes the "RecurrenceRule" of an appointment. Standard is, that the complete appointment series changes - the past, too. I have to identify the selected date of changing the recurrence and change the appointment from this day to all future occurences. Past must be unchanged. How can we get that?
Please see my examples attached.
I want to select Saturday 27th. Open the recurrence edit dialog. Then change the series to one hour later. Save. The result must be the same as in my screenshot. Is that possible?
Thanks for your help.
Sascha
Hello,
I tried to use RadListView to make component just like user preference.
The idea are:
Then in step 2, I tried to use RadListView to display a list of user preference with checkboxes, drag/ drop feature to support these requiredment
But when I open this RadListView, if there are many preferences (one preference is one column) then RadListView have a scrollbar and have padding bottom too long (attachment #1) although it have space to display items. Then I have to scroll down to view.
My question is, how to remove this long padding?
My video to demonstrate is: https://drive.google.com/file/d/0B-bxiBfBubRgSi1PRVRmWUV2YWs/view?usp=sharing
My code are:
private
RadListView lvUserPreference =
new
RadListView();
// Styles
lvUserPreference.Dock = System.Windows.Forms.DockStyle.Fill;
lvUserPreference.Margin =
new
System.Windows.Forms.Padding(0);
lvUserPreference.Name =
"lvUserPreference"
;
lvUserPreference.ListViewElement.DrawBorder =
false
;
lvUserPreference.ShowCheckBoxes =
true
;
lvUserPreference.ViewType = ListViewType.ListView;
lvUserPreference.AllowDragDrop =
true
;
lvUserPreference.Padding =
new
Padding(20);
lvUserPreference.Margin = Padding.Empty;
lvUserPreference.ItemSpacing = 15;
lvUserPreference.AllowEdit =
false
;
lvUserPreference.AutoScroll =
true
;
lvUserPreference.ListViewElement.DragDropService.PreviewDragStart -= OnPreviewDragStart;
lvUserPreference.ListViewElement.DragDropService.PreviewDragStart += OnPreviewDragStart;
lvUserPreference.ListViewElement.DragDropService.PreviewDragOver -= OnPreviewDragOver;
lvUserPreference.ListViewElement.DragDropService.PreviewDragOver += OnPreviewDragOver;
lvUserPreference.ListViewElement.DragDropService.PreviewDragDrop -= OnPreviewDragDrop;
lvUserPreference.ListViewElement.DragDropService.PreviewDragDrop += OnPreviewDragDrop;
lvUserPreference.VisualItemFormatting += OnVisualItemFormatting;
// Item formatting event
private
void
OnVisualItemFormatting(
object
sender, ListViewVisualItemEventArgs e)
{
e.VisualItem.ToggleElement.Margin =
new
Padding(10);
e.VisualItem.BackColor = ComponentSettings.DefaultBorderColor;
e.VisualItem.GradientStyle = GradientStyles.Solid;
e.VisualItem.Margin =
new
Padding(0);
e.VisualItem.MinSize =
new
Size(200, 30);
e.VisualItem.Font = ComponentSettings.DefaultFont;
var itemAttrId = (
int
)e.VisualItem.Data.Value;
var field = _fields.FirstOrDefault(x => x.AttrId == itemAttrId);
if
(field !=
null
&& (field.IsTreeField || field.IsRequired))
{
e.VisualItem.ToggleElement.Enabled =
false
;
}
else
{
e.VisualItem.ToggleElement.Enabled =
true
;
}
}
Regard,
Paul