Hi! I have tried to understand grid basics by following the demos in the website but i can't get the selection right. I'm trying to select an item by selecting a row (i'm not sure that is possible), and i even tried to creat a column (GridButtonColumn) where i set the button as image button and the imageurl for the image i want but i can't get it right, cause it is always appearing a checkbox instead of the image and, althought it selectes the row it does not selects the item in the row (i put a breakpoint in the grid_SelectedItemChanged and it doesn't do anything).
I also tried to do this as an gridtemplatecolumn and it makes appear the image i want but every time i click on it, instead of selecting the row and the item, it gives me an error witch i don't really know whatit means.
Code for the gridButtoncolumn (and grid):
code for the gridtemplatecolumn:
One more thing, i only know vb.net and not very much. I can handle html so if possible and the solution calls for code i would appreciate for it to be in vb.net, if is as to be in c# or javascript so be it.
Thanks,
FEST
I also tried to do this as an gridtemplatecolumn and it makes appear the image i want but every time i click on it, instead of selecting the row and the item, it gives me an error witch i don't really know whatit means.
Code for the gridButtoncolumn (and grid):
<
telerik:RadGrid
runat
=
"server"
style
=
"z-index: 1; left: 10px; top: 450px; position: absolute"
CellSpacing
=
"0"
DataSourceID
=
"processos"
GridLines
=
"None"
ID
=
"rg_processos"
AutoGenerateColumns
=
"False"
>
<
headercontextmenu
cssclass
=
"GridContextMenu GridContextMenu_Default"
>
</
headercontextmenu
>
<
mastertableview
datasourceid
=
"processos"
>
<
commanditemsettings
exporttopdftext
=
"Export to PDF"
/>
<
rowindicatorcolumn
filtercontrolalttext
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
/>
</
rowindicatorcolumn
>
<
expandcollapsecolumn
filtercontrolalttext
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
/>
</
expandcollapsecolumn
>
<
Columns
>
<
telerik:GridClientSelectColumn
ButtonType
=
"ImageButton"
FilterControlAltText
=
"Filter column1 column"
ImageUrl
=
"~/images/select_16_mouse.png"
Text
=
"Seleccionar"
UniqueName
=
"column1"
>
</
telerik:GridClientSelectColumn
>
<
telerik:GridBoundColumn
DataField
=
"Sinistrado_ID"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter Sinistrado_ID column"
HeaderText
=
"Sinistrado_ID"
SortExpression
=
"Sinistrado_ID"
UniqueName
=
"Sinistrado_ID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Data_sinistro"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter Data_sinistro column"
HeaderText
=
"Data_sinistro"
SortExpression
=
"Data_sinistro"
UniqueName
=
"Data_sinistro"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Nome"
FilterControlAltText
=
"Filter Nome column"
HeaderText
=
"Criado/Alterado"
SortExpression
=
"Nome"
UniqueName
=
"Nome"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"quando"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter quando column"
HeaderText
=
"Criado/Alterado"
SortExpression
=
"quando"
UniqueName
=
"quando"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
editformsettings
>
<
editcolumn
filtercontrolalttext
=
"Filter EditCommandColumn column"
>
</
editcolumn
>
</
editformsettings
>
</
mastertableview
>
<
clientsettings
>
<
selecting
allowrowselect
=
"True"
/>
</
clientsettings
>
<
filtermenu
enableimagesprites
=
"False"
>
</
filtermenu
>
</
telerik:RadGrid
>
code for the gridtemplatecolumn:
<
Columns
>
<
telerik:GridTemplateColumn
ItemStyle-VerticalAlign
=
"Middle"
>
<
ItemTemplate
>
<
asp:ImageButton
runat
=
"server"
ImageUrl
=
"~/images/select_16_mouse.png"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridClientSelectColumn
ButtonType
=
"ImageButton"
FilterControlAltText
=
"Filter column1 column"
ImageUrl
=
"~/images/select_16_mouse.png"
Text
=
"Seleccionar"
UniqueName
=
"column1"
>
</
telerik:GridClientSelectColumn
>
<
telerik:GridBoundColumn
DataField
=
"Sinistrado_ID"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter Sinistrado_ID column"
HeaderText
=
"Sinistrado_ID"
SortExpression
=
"Sinistrado_ID"
UniqueName
=
"Sinistrado_ID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Data_sinistro"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter Data_sinistro column"
HeaderText
=
"Data_sinistro"
SortExpression
=
"Data_sinistro"
UniqueName
=
"Data_sinistro"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Nome"
FilterControlAltText
=
"Filter Nome column"
HeaderText
=
"Criado/Alterado"
SortExpression
=
"Nome"
UniqueName
=
"Nome"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"quando"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter quando column"
HeaderText
=
"Criado/Alterado"
SortExpression
=
"quando"
UniqueName
=
"quando"
>
</
telerik:GridBoundColumn
>
</
Columns
>
One more thing, i only know vb.net and not very much. I can handle html so if possible and the solution calls for code i would appreciate for it to be in vb.net, if is as to be in c# or javascript so be it.
Thanks,
FEST