6 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 24 Sep 2012, 11:44 AM
Hi,
Try setting AllowFilteringByColumn as true to enable filtering in RadGrid.
aspx:
Also check the following demo.
Grid / Filtering Template Columns
Thanks,
Princy.
Try setting AllowFilteringByColumn as true to enable filtering in RadGrid.
aspx:
<
telerik:RadGrid
ID
=
"RadGrid2"
runat
=
"server"
AutoGenerateColumns
=
"false"
AllowFilteringByColumn
=
"true"
OnNeedDataSource
=
"RadGrid2_NeedDataSource"
onprerender
=
"RadGrid2_PreRender"
>
<
MasterTableView
>
<
Columns
>
. . .
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Grid / Filtering Template Columns
Thanks,
Princy.
0

Swapnil
Top achievements
Rank 1
answered on 24 Sep 2012, 12:14 PM
Hi
what to write on these events
i am now using inbuilt filtering like write click on grid and then by checking allow filtering,
but sometime it works properly some time not
Thanks
what to write on these events
OnNeedDataSource
=
"RadGrid2_NeedDataSource"
onprerender
=
"RadGrid2_PreRender"
i am now using inbuilt filtering like write click on grid and then by checking allow filtering,
but sometime it works properly some time not
Thanks
0
Accepted

Princy
Top achievements
Rank 2
answered on 25 Sep 2012, 04:13 AM
Hi,
I apologize for attaching extra event(Prerender) which doesn't have any relation with this. You can populate the grid in NeedDataSource event as shown below.
C#:
Thanks,
Princy.
I apologize for attaching extra event(Prerender) which doesn't have any relation with this. You can populate the grid in NeedDataSource event as shown below.
C#:
protected
void
RadGrid2_NeedDataSource(
object
sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
SqlConnection con1 =
new
SqlConnection(WebConfigurationManager.ConnectionStrings[
"NorthwindConnectionString3"
].ConnectionString);
SqlCommand cmd =
new
SqlCommand(
"SELECT top 5 * FROM [Orders]"
, con1);
SqlDataAdapter ad =
new
SqlDataAdapter(cmd);
DataSet ds =
new
DataSet();
ad.Fill(ds);
RadGrid2.DataSource = ds;
}
Thanks,
Princy.
0

Swapnil
Top achievements
Rank 1
answered on 25 Sep 2012, 04:20 AM
Thanks Princy.
0

Swapnil
Top achievements
Rank 1
answered on 25 Sep 2012, 04:22 AM
Hi Princy,Can you tell me how can i do insert,update,delete with rad grid?
because i am new to rad controls.
Thanks in Advance.
because i am new to rad controls.
Thanks in Advance.
0

Princy
Top achievements
Rank 2
answered on 26 Sep 2012, 04:37 AM
Hi,
You can perform automatic operations in RadGrid by setting the following.
aspx:
Check the following demo which implements the same.
Grid / Automatic Operations
Thanks,
Princy.
You can perform automatic operations in RadGrid by setting the following.
aspx:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticUpdates
=
"True"
. . . >
</
telerik:RadGrid
>
Grid / Automatic Operations
Thanks,
Princy.