i have a ComboBox with some items in it (width pf combo cox 162), when i start application and click on the combobox, the drop down expands with width of about 180 px. If i click again on the combobox, the drop down expands but has a correct width of 162 px.
i have used statements like:
this.radComboBox1.DropDownWidth = 162;
or
radComboBox1.DropDownMaxSize = radComboBox1.Size;
or
radComboBox1.DropDownMinSize = radComboBox1.Size;
but still i am getting the same problem.
Can you please suggest me some solution?
DataTable dt = new DataTable();
dt.Columns.Add(
"ID");
dt.Columns.Add(
"FullName");
dt.Columns.Add(
"IsSelected");
DataRow dr = dt.NewRow();
dr[
"ID"] = "1";
dr[
"FullName"] = "Arvind";
dr[
"IsSelected"] = true;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[
"ID"] = "2";
dr[
"FullName"] = "Robin";
dr[
"IsSelected"] = true;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[
"ID"] = "3";
dr[
"FullName"] = "Kumar";
dr[
"IsSelected"] = false;
dt.Rows.Add(dr);
radGvw.DataSource = dt;
While running the application, totally 6 columns are generated. All the three columns are repeated. The columns are displaying in the order ID, FullName, IsSelected, ID, FullName, IsSelected. The IsSelected column type is textbox column in the second time.
I am new to this Telerik control. Please advice.
Regards,
Arvind Robin Kumar.
I currently have a grid with a checkbox column. When the user checks the checkbox I change the background color and that works fine but i'm unable to change the text color on the ValueChanged event of that grid.
| //Row Highlight when selected |
| GridCheckBoxCellElement cbCell = (GridCheckBoxCellElement)sender; |
| cbCell.RowElement.BackColor = System.Drawing.ColorTranslator.FromHtml("#DAFB5E"); |
| cbCell.RowElement.DrawFill = true; |
| cbCell.RowElement.ForeColor = this.radGVTables.ForeColor = Color.Sienna; |
| //I've tried this and it didn't work either. |
| cbCell.RowElement.ForeColor = Color.Sienna; |
Thank you for any help
Private Sub ShowData()
Dim i As Integer
Dim tmpWord As String
Dim tmprelateto As String
Dim itab As Integer
Dim newtab As String
myAdapter.Fill(ds,
"Dictionary")
mytable = ds.Tables(
"Dictionary")
tmprelateto =
""
tmpWord = ""
i = 0
Do
myrow = mytable.Rows.Item(rownumber)
tmpWord = Trim(myrow.Item(
"Word").ToString)
tmprelateto = Trim(myrow.Item(
"relateto").ToString)
If tmprelateto = "" Then
i = i + 1
If i = 2 Then
Exit Do
End If
RichTextBox1.Text = Trim(myrow.Item(
"DefNep").ToString)
RichTextBox2.Text = Trim(myrow.Item(
"DefEng").ToString)
rownumber = rownumber + 1
Else
newtab = Trim(myrow.Item("pref").ToString)
RadTabStrip1.Items.Add(
New TabItem(newtab))
Dim list As New ListBox
Dim rtfbox As New RichTextBox
Dim rtfbox2 As New RichTextBox
For Each ti As TabItem In RadTabStrip1.Items
ti.ContentPanel.Controls.Add(list)
ti.ContentPanel.Controls.Add(rtfbox)
ti.ContentPanel.Controls.Add(rtfbox2)
With list
.Location =
New Point(5, 3)
.Width = 132
.BorderStyle = BorderStyle.None
.Height = 117
If Trim(myrow.Item("Word").ToString) = "" Then
.Items.Add(Trim(myrow.Item("relateto").ToString))
Else
.Items.Add(Trim(myrow.Item(
"Word").ToString))
End If
End With
With rtfbox
.Location =
New Point(141, 3)
.Width = 133
.Height = 117
.BorderStyle = BorderStyle.None
.Text = Trim(myrow.Item(
"DefNep").ToString)
End With
With rtfbox2
.Location =
New Point(278, 3)
.Width = 132
.Height = 117
.BorderStyle = BorderStyle.None
.Text = Trim(myrow.Item(
"DefEng").ToString)
End With
Next
rownumber = rownumber + 1
End If
Loop
End Sub
Database Used above program looks like:
Word relateto pref DefNep DefNep
------- --------- ------ --------- ---------
A Null Null (ए) अंग्रेजी वर्णमालाको पहिलो अक्षर the first letter of the English alphabet
Null A adj. एउटा, कोही, एक कुनै व्यक्ति one, any, some
Null A prep. जब संज्ञामा उपसर्गको जस्तो यो (when used as a prefix before nouns)